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.

on NICK msg

Old posts that have not been replied to for several years.
Locked
V
VERSACE
Voice
Posts: 4
Joined: Thu Sep 08, 2005 9:25 am

on NICK msg

Post by VERSACE »

how can i make an eggdrop msg "VERSACE" when it gets into the nickname "armani" ?
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

don't double-post, you are long-dead anyway

oh well

Code: Select all

bind nick - "% armani" foo
proc foo {nick args} {
   if [isbotnick $nick] {putserv "privmsg versace :got the sucker!"}
}
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

I was wondering, on a nick change wouldn't $botnick be the new nick?
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

I believe not, but there is only one way to find out :) I'll take a look at the source though, as far as I can remember eggdrop triggers the binds first and only then updates its internal structures
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

well it turns out to be somewhat tricky but it still works the way I thought it works

the thing is that both server.mod and irc.mod add H_raw built-ins for handling NICK messages, but check_tcl_nick() is called by the irc.mod handler only; however, server.mod's built-in is added before irc.mod's since irc.mod requires server.mod to be loaded first; that means server.mod's handler is called after irc.mod's handler because of the the singly-linked list mechanism of bind lists; which actually means that botnick update (done by server.mod's handler) happens after triggering Tcl [bind nick] proc

this applies to lots of other similar stuff too
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

Interresting, thanx for the info :D
Locked