This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Ping reply changer error

Help for those learning Tcl or writing their own scripts.
Post Reply
User avatar
Getodacul
Voice
Posts: 20
Joined: Thu Jun 07, 2007 2:32 pm

Ping reply changer error

Post by Getodacul »

# CTCP Ping Reply Changer
bind dcc n ctcp ctcp
set reply "-2secs"
unbind ctcp -|- PING *ctcp:PING
bind ctcp -|- PING edit_ping
proc edit_ping {nick host hand dest keyword text} {
global reply
putserv "NOTICE $nick :\001PING $reply"}
#unbind ctcp -|- PING edit_ping #useless line
putlog "CTCP Ping Reply Changer Loaded"
What it's wrong with this script?
Stript working.... but if i rehash the bot, if script is already loaded, eggdrop die and get this error:
[00:38] no such binding
while executing
"unbind ctcp -|- PING *ctcp:PING"
(file "scripts/pingreply.tcl" line 7)
invoked from within
"source scripts/pingreply.tcl"
(file "eggdrop.conf" line 99)
[00:38] * CONFIG FILE NOT LOADED (NOT FOUND, OR ERROR)
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

Obviously, the script's trying to unbind an unbound bind. My suggestion is to use a different script, if you still want to use this script then you can avoid the crash by surrounding the vulnerable command with catch {}.

Code: Select all

catch {unbind ctcp -|- PING *ctcp:PING}
Post Reply