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.
Old posts that have not been replied to for several years.
R
Rex
Post
by Rex » Sat Mar 22, 2003 7:18 am
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
ppslim
Revered One
Posts: 3914 Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England
Post
by ppslim » Sat Mar 22, 2003 8:11 am
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]
arcane
Master
Posts: 280 Joined: Thu Jan 30, 2003 9:18 am
Location: Germany
Contact:
Post
by arcane » Sat Mar 22, 2003 8:17 am
you will have to split $arg first. as written in the faq-forum ^^
edit:
err..sorry, can be deleted.