私が取り組んでいるこのスクリプトがあります:
bind pub ga !kick pub_do_kick
proc pub_do_kick {nick uhost hand chan arg} {
# create a sub-proc to delay
proc delay {} { return }
# timer already running?
if {[utimerexists delay] == ""} {
# timer is not active, perform something
global botnick
set who [lindex $arg 0]
set why [lrange $arg 1 end]
if {![onchan $who $chan]} {
putserv "PRIVMSG $chan :$who isnt on $chan"
return 1
}
if {[string tolower $who] == [string tolower $botnick]} {
putserv "KICK $chan $nick :You fail"
return 1
}
if {$who == ""} {
putserv "PRIVMSG $chan :Usage: !k <nick to kick>"
return 1
}
if {$who == $nick} {
putserv "PRIVMSG $chan :You fail $nick?"
return 1
}
if {[matchattr $who +n]} {
putserv "KICK $chan $nick :You fail"
return 1
}
putserv "KICK $chan $who :$why"
return 1
# starting timer to prevent flooding next time
utimer 1200 delay
} else {
# timer is already active
putserv "KICK $chan $nick :You've already kicked someone"
}
}
putlog "Kick loaded"
ただし、utimer ではまったく起動しません。ユーザーは、チャンネルから誰かを追い出すことができます。私は何を間違えましたか?
私はこれを読みました: http://tclhelp.net/unb/39 2番目のスクリプトに基づいています。
ありがとう