| View previous topic :: View next topic |
| Author |
Message |
VERSACE Voice
Joined: 08 Sep 2005 Posts: 4
|
Posted: Sun Sep 11, 2005 1:39 am Post subject: on NICK msg |
|
|
| how can i make an eggdrop msg "VERSACE" when it gets into the nickname "armani" ? |
|
| Back to top |
|
 |
demond Revered One

Joined: 12 Jun 2004 Posts: 3073 Location: San Francisco, CA
|
Posted: Sun Sep 11, 2005 2:00 am Post subject: |
|
|
don't double-post, you are long-dead anyway
oh well
| Code: |
bind nick - "% armani" foo
proc foo {nick args} {
if [isbotnick $nick] {putserv "privmsg versace :got the sucker!"}
}
|
|
|
| Back to top |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
Posted: Sun Sep 11, 2005 10:23 am Post subject: |
|
|
I was wondering, on a nick change wouldn't $botnick be the new nick? _________________ Follow me on GitHub
- Opposing
Public Tcl scripts |
|
| Back to top |
|
 |
demond Revered One

Joined: 12 Jun 2004 Posts: 3073 Location: San Francisco, CA
|
Posted: Sun Sep 11, 2005 12:22 pm Post subject: |
|
|
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 |
|
| Back to top |
|
 |
demond Revered One

Joined: 12 Jun 2004 Posts: 3073 Location: San Francisco, CA
|
Posted: Sun Sep 11, 2005 4:42 pm Post subject: |
|
|
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 |
|
| Back to top |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
|
| Back to top |
|
 |
|