| View previous topic :: View next topic |
| Author |
Message |
BoaR Halfop
Joined: 20 Jul 2007 Posts: 48
|
Posted: Sat Aug 04, 2007 10:42 am Post subject: Trigger problem after rehash |
|
|
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 |
|
 |
nml375 Revered One
Joined: 04 Aug 2006 Posts: 2857
|
Posted: Sat Aug 04, 2007 10:52 am Post subject: |
|
|
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 |
|
 |
BoaR Halfop
Joined: 20 Jul 2007 Posts: 48
|
Posted: Sat Aug 04, 2007 3:23 pm Post subject: |
|
|
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 |
|
 |
|