Code: Select all
proc modes {nick host hand chan mode target} {
global botnick
if {($mode == "+M")} {
lappend tmode [unixtime]
if {$tmode => "1190655265"} {;# clock scan for 10 mins
[lreplace $tmode 0 XX]
}
}
Code: Select all
proc modes {nick host hand chan mode target} {
global botnick
if {($mode == "+M")} {
lappend tmode [unixtime]
if {$tmode => "1190655265"} {;# clock scan for 10 mins
[lreplace $tmode 0 XX]
}
}
Code: Select all
set initialTime [unixtime]
proc modes {nick host hand chan mode target} {
global initialTime
set mins [expr {([unixtime]-$initialTime)/60}]
if {$mins > 10} {
# more than 10 mins passed, reset time
set initialTime [unixtime]
} {
# else, 10 mins still did not pass.
}
}