This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

ctcp fingering a nick and parsing the reply

Old posts that have not been replied to for several years.
Locked
User avatar
z_one
Master
Posts: 269
Joined: Mon Jan 14, 2002 8:00 pm
Location: Canada

ctcp fingering a nick and parsing the reply

Post by z_one »

How can one "finger" a nick as it joins the chan (ctcp <nick> finger) and then parse the ctcp reply to see if it contains the string "hello" for example ?
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

Code: Select all

bind join - * ctcp:join:chk
proc ctcp:join:chk {nick host hand chan} {
  puthelp "PRIVMSG $nick :\001FINGER\001"
}

bind ctcr - FINGER ctcp:reply:chk
proc ctcp:reply:chk {nick uh hand dest key arg} {
  if {[string match -nocase "*hello*" $arg]} {
    IT MATCHES - DO CODE HERE
  }
}
User avatar
z_one
Master
Posts: 269
Joined: Mon Jan 14, 2002 8:00 pm
Location: Canada

Post by z_one »

Thx :)
Locked