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 

Marky Color Uno

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases
View previous topic :: View next topic  
Author Message
SaPrOuZy
Halfop


Joined: 24 Mar 2004
Posts: 75
Location: Lebanon

PostPosted: Tue Jun 12, 2007 5:50 am    Post subject: Marky Color Uno Reply with quote

hey guys,

there's a problem in marky's color uno, where the script chokes on players with nicks containing { }.
Anyone has this fixed, or is willing to work on fixing it? am not finding much time to do that.

Thanks
Back to top
View user's profile Send private message
rosc2112
Revered One


Joined: 19 Feb 2006
Posts: 1454
Location: Northeast Pennsylvania

PostPosted: Tue Jun 12, 2007 9:20 am    Post subject: Reply with quote

You have to [split] and [join] the nick in each of the procs... Personally, I just ban stupid nickchars in my channels..
Back to top
View user's profile Send private message
SaPrOuZy
Halfop


Joined: 24 Mar 2004
Posts: 75
Location: Lebanon

PostPosted: Tue Jun 12, 2007 9:27 am    Post subject: Reply with quote

i actually modified it in the following way:

Code:
if {[string match "*\{*" $nick] || [string match "*\}*" $nick] } {
       unontc $nick "Sorry $nick - you cannot join uno with this nick please use a nick that does not contain \002\{\}\002."
       return 0
 }


at least till someone does what i don't feel like doing lol
Back to top
View user's profile Send private message
speechles
Revered One


Joined: 26 Aug 2006
Posts: 1398
Location: emerald triangle, california (coastal redwoods)

PostPosted: Thu Jun 14, 2007 8:13 pm    Post subject: Reply with quote

The problem is the script uses lots of variables within quotes, and doesn't use the curly braces to suppress interpreter from getting choked on special characters.. I experienced similar issues hacking the google script so I'm fairly certain this causes it. Every place where $nick is referenced within quotes you will have to encapsulate it. $nick -> ${nick}

line 246, for example:
Code:
# choke on special chars
unochanmsg "stopped by \00310$nick!$uhost\003"
# stop choking
unochanmsg "stopped by \00310${nick}!$uhost\003"
Back to top
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Thu Jun 14, 2007 9:13 pm    Post subject: Reply with quote

You have to state what "chokes" mean, is it a Tcl error? if so then you have to paste the errorInfo to detect where the error occurred.

How to write eggdrop scripts that won't choke on special characters
_________________
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 -> Script Support & Releases 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