Greetings all,
I'm trying to grab ident@host for a user not in the bot chan. Is there an easy way to do this, or is a raw bind my only option?
Thanks,
--red
Code: Select all
putserv "WHO $nick"
Code: Select all
bind raw - 352 get:uhost
proc get:uhost {from key arg} {
set arg [split $arg]
set uhost [lindex $arg 2]@[lindex $arg 3]
#do your stuff here
}
doc/tcl-commands.doc wrote: (17) RAW (stackable)
bind raw <flags> <keyword> <proc>
procname <from> <keyword> <text>
Description: previous versions of Eggdrop required a special compile
option to enable this binding, but it's now standard. The keyword
is either a numeric, like "368", or a keyword, such as "PRIVMSG".
from will be the server name or the source user (depending on
the keyword); flags are ignored. The order of the arguments is
identical to the order that the IRC server sends to the bot. The
pre-processing only splits it apart enough to determine the
keyword. If the proc returns 1, Eggdrop will not process the line
any further (this could cause unexpected behavior in some cases).
Module: server
Code: Select all
putserv "WHO $nick %nuht,22"
bind raw - 354 get:uhost
proc get:uhost {from key arg} {
if {[lindex [split $arg] 1] == "22"} {
set hostname "[lindex [split $arg] 2]@[lindex [split $arg] 3]"
set nickname "[lindex [split $arg] 4]"
# do stuff here
}
}