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.

set kicknick $nick (where $nick is {Rex})

Old posts that have not been replied to for several years.
Locked
R
Rex

set kicknick $nick (where $nick is {Rex})

Post by Rex »

Hi,

If there is a user in a channel with the nickname {Rex}, is there anyway to store the nickname as a variable, without loosing the { and }?

Heres my situation...

{Rex} is being abusive, and a voice in a channel uses !kick {Rex} via our bot. I use:

proc public_kick {nick uhost handle channel arg} {

where [lindex $arg 0] will be {Rex}

but if i store [lindex $arg 0] as $kicknick, it only holds Rex and not {Rex}. I can get away with using [lindex $arg 0] throughout the proc but if i pass it as a parameter to another proc, the same problem arises.


Rex
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

See the thread regarding lists in the FAQ forum.

All data being sent to a proc in eggdrop, is sent as a string.

COmmands like lindex operate by taking a list as input.

As such, you need to convert the string, into a list, before it can be used properly.

Somthing like [lindex [split $arg] 0]
User avatar
arcane
Master
Posts: 280
Joined: Thu Jan 30, 2003 9:18 am
Location: Germany
Contact:

Post by arcane »

you will have to split $arg first. as written in the faq-forum ^^

edit:
err..sorry, can be deleted.
Locked