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 

Nick Binds triggering multiple times?

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
StarLion
Voice


Joined: 20 Dec 2005
Posts: 16

PostPosted: Thu Dec 25, 2008 7:09 pm    Post subject: Nick Binds triggering multiple times? Reply with quote

I have a command bound to nick (IE: Nickname changes) on all channels.

Whenever someone changes nicknames, this script triggers - once for every single channel the person and bot share.

Is there a way to limit this to a single execution per nick change?
Back to top
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Thu Dec 25, 2008 8:00 pm    Post subject: Reply with quote

Code:
bind nick - * nick:change

proc nick:change {nick uhost hand chan newnick} {
 global nickchange
 if {[info exists nickchange([string tolower $nick])]} {
  return 0
 }
 # do whatever you want
 set nickchange([string tolower $nick]) 1
 utimer 5 [list unset nickchange([string tolower $nick])]
}

_________________
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:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help 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