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.

Commands and nicknames as $ARG

Old posts that have not been replied to for several years.
Locked
V
Vosje

Post by Vosje »

I have a problem with nicks that use charraccters like | { } etc
If i callup it as a $arg(ument) then the bot remove (don't see) the (like -aname will be -aname) and the bot don't see them
if i do \-aname then he see the user but
if i send the $arg trou a pther proc then the name is -aname agian. How can i solve this problem or is there a patch for this
(normaly in a string will used as 02 (Bold Code) or 03xx,xx (Color Code) in a TCL)

Thax already for thous hwo can help me
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

I don't understand, can you provide an example where this happens.
V
Vosje

Post by Vosje »

Oke here a example :
I try to ban a user -ybr|d (Sorry Hybrid i used your name :-)
but this is what happens:

<Vosje> Here i go:
<Vosje> bw chanban #test -ybr|d
<BW> -ybr|d «« Name i give???
<BW> -ybr|d must be de nick i give? and sent trou (below). This is the ban host *!*@*
<BW> Testmask *!*@* lengt of mask 5 the nickname that returns in this block -ybr|d
<BW> - FN Oper Script - I have banned -ybr|d from Channel #test.

<Vosje> Here i go part 2:
<Vosje> bw chanban #test \-\ybr|d
<BW> -ybr|d «« Name i give???
<BW> -ybr|d must be de nick i give? and sent trou (below). This is the ban host *!*@*
<BW> Testmask *!*testuser@96.122.0.* lengt of mask 5 the nickname that returns in this block -ybr|d
<BW> - FN Oper Script - I have banned -ybr|d from Channel #test.

<Vosje> Here i go part 3:
<Vosje> bw chanban #test \\-\\ybr|d
<BW> \-\ybr|d «« Name i give???
<BW> \-\ybr|d must be de nick i give? and sent trou (below). This is the ban host *!*@*
<BW> Testmask *!*@* lengt of mask 5 the nickname that returns in this block -ybr|d
<BW> - FN Oper Script - I have banned -ybr|d from Channel #test.
<Vosje> *** -ybr|d was kicked by BWorld (Your Bannen by Server on this channel.)

This is wat i mean with my Problem
I hope you can folow me
Else you must look on the server where i'm.

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

Post by ppslim »

Can you paste a link to your script, so we can see what is wrong within it.
V
Vosje

Post by Vosje »

http://lafemmeclan.dyn.dhs.org:8081/dow ... xtcmd2.tcl

It's not the hole Script
but only the proccesses i do with that command
It the hole script are passwords. I'm new here so i don't know how ppl are here
(Sorry but that's secure work :-))
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

The basic problem is the way you handle incoming strings.

In proc call_fncommands, you are treating the text string $arg as a list.

You should convert the string to a list before accessing it with list commands.

So change commands like
set arg1 [lindex $arg 1]
to
set arg1 [lindex [split $arg] 1]
It is also potentialy dangerous not to do this when sending the user input through the timer commands.

Before sending these strings to other commands, use the list command to make them safe. This will also preserve the -ryd based formatting you require.

You should read over http://www.suninet.nl/tclguide/tclguide.html for some good information on how to deal with text like this.
V
Vosje

Post by Vosje »

Well thx for the site (there are more nfo that i need to make my scritps usefull

and i will test the Quote's you give me tomore ... it's here 23:30 now.. and i'm go to bed....

Many thx, you help me alot :smile:
V
Vosje

Post by Vosje »

ppslim:
Thanks a lot, I have used the [split] and the
  • option to save the $arg(uments) and it works now... :

    <Vosje> !testnicksend -ybr|d send
    <BW> -ybr|d -- -ybr|d
    <BW> after sending: -ybr|d -- -ybr|d

    Many thx to you for your fast help.

    Regards
    Vosje
Locked