how I can get the username of that nick plz thanks.[/b]Eggy is ~eggy@host.us * Eggdrop
Eggy on +#tcl
Eggy using *.undernet.org The Undernet Underworld
Eggy is logged in as Eggdrop
Eggy End of /WHOIS list.
how I can get the username of that nick plz thanks.[/b]Eggy is ~eggy@host.us * Eggdrop
Eggy on +#tcl
Eggy using *.undernet.org The Undernet Underworld
Eggy is logged in as Eggdrop
Eggy End of /WHOIS list.
Code: Select all
bind join - * vip
proc vip { nick uhost hand chan } {
bind raw - 307 Username:check
puthelp "whois $nick"
}
proc Username:check {from kw text} {
set nick [lindex $arg 1]
set vip [lindex $text 4]
set startuser [lsearch -glob [split $vip] as*]; incr startuser
set username [join [lrange [split $vip] $startuser end]]
putlog "Username for $nick = $username"
return 0
}
putlog "whois.tcl chargé"
Code: Select all
bind pub - !undernetwhois unetwhois
proc unetwhois {nick uhost handle chan text} {
global workingchan
set workingchan $chan
bind raw - 330 330proc
bind raw - 318 318proc
putserv "whois [lindex [split $text] 0]"
}
proc 330proc {from keyword text} {
global workingchan loggedinas
set loggedinas [lindex [split $text] 2]
putserv "privmsg $workingchan : That user is logged in as $loggedinas"
unbind raw -|- 330 330proc
}
proc 318proc {from keyword text} {
global workingchan
putserv "privmsg $workingchan : [lrange [split $text] 2 end]"
unbind raw -|- 318 318proc
unbind raw -|- 330 330proc
}