bind raw * notice tsnotice
proc tsnotice {from keyword arg} {
if {[string match "*Client connecting on port*" $arg]} {
if {[info exists gr]} {
set gr [lindex $arg 9]
utimer 10 [list set gr [lrange $gr 1 end]]
return 0
}
if {[llength $gr] > "1"} {
append gr " [lindex $arg 9]"
utimer 10 [list set gr [lrange $gr 1 end]]
if {[llength $gr] >= "10"} {
foreach nck $gr {
putquick "privmsg SaW: nicks : $nck"
}
unset $gr
}
}
}
}
i want to bot msg me if 10 joins in 10 seconds, but it didnt work..
i try to see $gr each after joins from dcc with type .set gr
but the answer is:
bot: [15:40] #SaW# set gr
bot: Currently:
gr is a localspace variable (only exists within the instance of the proc when it is invoked).
Simply put, as soon as your proc exits, it will forget all about any and all variables used within it. You'll have to use globalspace variables for them to persist. either adress them as ::varname (such as "set ::gr somevalue" and "foreach nck $::gr"), or use the global-command