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 

Trigger problem after rehash

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


Joined: 20 Jul 2007
Posts: 48

PostPosted: Sat Aug 04, 2007 10:42 am    Post subject: Trigger problem after rehash Reply with quote

whenever i change the trigger on the script and rehash, the old trigger is still active and so is the new trigger, how can i fix this so that it wont answer on the old trigger after rehash and will only answer to the new one ?

thanks
Back to top
View user's profile Send private message
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Sat Aug 04, 2007 10:52 am    Post subject: Reply with quote

For it to work with a .rehash, you'd have to include some code to unbind the old bindings. Syntax is quite similar to bind: unbind <type> <flags> <keyword/mask> <proc-name>

One option might be to use .restart instead, as this pretty much wipes the whole tcl environment, including settings, bindings, etc.
_________________
NML_375, idling at #eggdrop@IrcNET
Back to top
View user's profile Send private message
BoaR
Halfop


Joined: 20 Jul 2007
Posts: 48

PostPosted: Sat Aug 04, 2007 3:23 pm    Post subject: Reply with quote

yeah but i dont want to .restart all the time i do testing.. like adding/removing codes on the script since i dont know tcl i pretty much just test i cant have it right on the first try.

this code:

Code:
bind evnt - prerehash ::MyScript::uninstall
proc ::MyScript::uninstall { args } {
    foreach bind [binds *:*] {
        foreach {a b c d e} $bind break
        unbind $a $b $c $e
    }
}

http://eggdrop.azatom.info/wiki/Tcl:Automatic_uninstall_scripts

made by bot ping time out..

my binds are
msg:<name>
pub:<name>
dcc:<name>

do i have to change a b c d e for my binds names ?
Back to top
View user's profile Send private message
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