Heres the part of my script that matters for this question
Code: Select all
bind msg - @add adduser
proc adduser { nick uhost hand args } {
global usernick
global authname
set usernick $nick
whois:nick $nick
set up $authname
set wfile [open $userlist a+]
puts $wfile $up
close $wfile
}
proc whois:nick { target } {
global whois
global usernick
set target $usernick
putquick "WHOIS $target $target"
set ::whoistarget $target
bind RAW - 330 whois:auth
}
proc whois:auth { from keyword arguments } {
global authname
set target $::whoistarget
set authname [lindex [split $arguments] 2]
unbind RAW - 330 whois:auth
}
Note: I removed some unimportant stuff from the code like msgs.