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.

Special Characters in set nick.

Help for those learning Tcl or writing their own scripts.
Post Reply
User avatar
CoMMy
Halfop
Posts: 99
Joined: Thu Jul 24, 2003 1:03 am
Location: Cyprus

Special Characters in set nick.

Post by CoMMy »

Hi,

Im trying to use {[]} characters in a nickname. But because those codes are TCL Operators eggdrop things its a command.

Please help me out,

Thanks
(c) CoMMy (c)
Resistance is Futile!!
We Are The Borg!!
User avatar
De Kus
Revered One
Posts: 1361
Joined: Sun Dec 15, 2002 11:41 am
Location: Germany

Post by De Kus »

there is no problem about such nicks. Only when the content of $nick gets evalated you have to worry about it. In most times split and list are your friends. In care cases like in a calculator you can string map them with escapes.

Give us some code, if you are unsure how to properly escape them without escaping them too much.
De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens...
User avatar
CoMMy
Halfop
Posts: 99
Joined: Thu Jul 24, 2003 1:03 am
Location: Cyprus

Post by CoMMy »

Basically its this.

set nick "{[MyNick]}"

(Set in the eggdrops config file).

Thanks
(c) CoMMy (c)
Resistance is Futile!!
We Are The Borg!!
User avatar
De Kus
Revered One
Posts: 1361
Joined: Sun Dec 15, 2002 11:41 am
Location: Germany

Post by De Kus »

CoMMy wrote:set nick "{[MyNick]}"
use instead

Code: Select all

set nick {{[MyNick]}} 
strings within "" are substituted but within {} only blackslashing of { and } is neccessary (even line breaks will be included).

Alternately, if you must keep substitution, you can escape [] with \[\].
Last edited by De Kus on Sun Apr 02, 2006 12:10 pm, edited 3 times in total.
De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens...
User avatar
CoMMy
Halfop
Posts: 99
Joined: Thu Jul 24, 2003 1:03 am
Location: Cyprus

Post by CoMMy »

I'll try it man,

Thanks for fast reply
(c) CoMMy (c)
Resistance is Futile!!
We Are The Borg!!
Post Reply