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.

Got problem with user nicknames using [] brackets

Old posts that have not been replied to for several years.
Locked
C
Caribou
Voice
Posts: 28
Joined: Thu Apr 15, 2004 12:51 pm
Location: France

Got problem with user nicknames using [] brackets

Post by Caribou »

Hello, im beginner to TCL scripting and im currently coding my own script, translation from mirc script.

Im almost done but i found out i got problems with people using [] brackets in their nickname, like [leet] .. it is just totally messing my script :(

and yes i tried to search before posting, i only found some help for [expr] double evaluate.. i tried to use {} like {$nick} to prevent double evaluation but it didn't worked, i tried some commands on my bot with [die] as nickname, eggdrop disconnecting with some of them (commands) lol :lol:

yeah i found thats funny, easy way to mess a bot :lol:

but i wanna protect my script from this, how can i stop my script from evaluating a $nick as a command ? i don't wanna trim those [] by the way, i guess there is another way..

Thanks for any help, sorry for my weird english :mrgreen:
Last edited by Caribou on Thu Apr 15, 2004 7:53 pm, edited 1 time in total.
d
dollar
Op
Posts: 178
Joined: Tue Oct 28, 2003 3:47 pm
Location: Netherlands

Post by dollar »

Either use regsub to escape the ['s and ]'s, or try and make your script use strings/lists in a good way.
dollar (or something similar) at:
#eggdrop / #tcl - undernet
#egghelp / #tcl / #eggtcl - efnet
#eggdrop.support / #tcl - quakenet
#eggdrop - ircnet
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

Have a look at this page.
Once the game is over, the king and the pawn go back in the same box.
C
Caribou
Voice
Posts: 28
Joined: Thu Apr 15, 2004 12:51 pm
Location: France

Post by Caribou »

Thanks for helping me guys, i corrected everything in my script, and tested out, now i guess there is no way to abuse and mess everything with name like " [nickname] " , and other special character aren't allowed on servers (i think lol) :)

I used your link caesar for correcting Utimers

and i used regsub for correcting my Regexp dollar

so thanks both of you ;)
Locked