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 

Ping reply changer error

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


Joined: 07 Jun 2007
Posts: 20

PostPosted: Fri Nov 21, 2008 12:43 pm    Post subject: Ping reply changer error Reply with quote

Quote:
# 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)
Back to top
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Fri Nov 21, 2008 6:44 pm    Post subject: Reply with quote

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:
catch {unbind ctcp -|- PING *ctcp:PING}

_________________
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