egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

on NICK msg

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    egghelp.org community Forum Index -> Archive
View previous topic :: View next topic  
Author Message
VERSACE
Voice


Joined: 08 Sep 2005
Posts: 4

PostPosted: Sun Sep 11, 2005 1:39 am    Post subject: on NICK msg Reply with quote

how can i make an eggdrop msg "VERSACE" when it gets into the nickname "armani" ?
Back to top
View user's profile Send private message
demond
Revered One


Joined: 12 Jun 2004
Posts: 3073
Location: San Francisco, CA

PostPosted: Sun Sep 11, 2005 2:00 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Sun Sep 11, 2005 10:23 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
demond
Revered One


Joined: 12 Jun 2004
Posts: 3073
Location: San Francisco, CA

PostPosted: Sun Sep 11, 2005 12:22 pm    Post subject: Reply with quote

I believe not, but there is only one way to find out Smile 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
View user's profile Send private message Visit poster's website
demond
Revered One


Joined: 12 Jun 2004
Posts: 3073
Location: San Francisco, CA

PostPosted: Sun Sep 11, 2005 4:42 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Mon Sep 12, 2005 9:40 am    Post subject: Reply with quote

Interresting, thanx for the info Very Happy
_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    egghelp.org community Forum Index -> Archive All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber