forked from Bero83/eggdrop-TCL
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathoperver.tcl
42 lines (33 loc) · 1.18 KB
/
operver.tcl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# $Id: operVersion.tcl,v1.OH 17/12/2016 02:26:13am GMT +13 (NZ-DST) istok Exp $
# Set the global trigger you wish to use (default: !)
set operVerTrig "!"
# Set channel you wish to relay the version info to (default: #services)
set operVerReply "#services"
### ----- NO NEED TO EDIT ----- ###
set operVershion "v1.OH"
proc getOperVer {} {
global operVerTrig
return $operVerTrig
}
bind raw - NOTICE operVersion:proc
bind ctcr - VERSION operVersion:reply
proc operVersion:proc {from keyword text} {
global operVertemp
if {[string match -nocase "*Client connecting on*" $text]} {
set operVertemp(who) [lindex [split $text] 9]
putquick "PRIVMSG $operVertemp(who) :\001VERSION\001"
return 0
}
if {[string match -nocase "*Client connecting at*" $text]} {
set operVertemp(who) [lindex [split $text] 8]
putquick "PRIVMSG $operVertemp(who) :\001VERSION\001"
return 0
}
}
proc operVersion:reply {nick uhost hand dest key vers} {
global operVertemp operVerReply
foreach operVerline $vers {
putserv "PRIVMSG $operVerReply :$operVertemp(who) is using: [join [lrange [split $operVerline] 0 end]]"
}
}
putlog ".:LOADED:. - operVersion - .:$operVershion:."