bind join * * registered:join
bind raw - 307 registered:match
bind raw - 311 registered:first
bind raw - 318 registered:last
proc registered:join {nick uhost hand chan} {
if {[isbotnick $nick]} return
puthelp "WHOIS $nick"
}
proc registered:first {from key text} {
global registered
set user [lindex [split $text] 1]
set registered($user) 0
}
proc registered:match {from key text} {
global registered
set user [lindex [split $text] 1]
set registered($user) 1
# user has identified for this nick
# use $user to do whatever you need with it
}
proc registered:last {from key text} {
global registered
set user [lindex [split $text] 1]
if {!$registered($user)} {
# user didn't identified for this nick
# use $user to do whatever you need with it
}
# don't remove the following line
array unset registered $user
}
As always, I haven't tested this, but should work. If it doesn't then let me know.
Edit: fixed.
Last edited by caesar on Thu Oct 20, 2011 6:27 am, edited 1 time in total.
Once the game is over, the king and the pawn go back in the same box.