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.

bot binds

Old posts that have not been replied to for several years.
Locked
User avatar
ReaLz
Op
Posts: 121
Joined: Sat Oct 19, 2002 5:33 am
Location: Athens, Greece

bot binds

Post by ReaLz »

I want one of my bots to inform the central bot of the channel when kickbans a person,
I have put this one on the bot that kicks for advertising (in the adver.tcl):
putbot botnick "tsnoinv $nick"

and this one in the tcl script that I want to make to inform the central bot for bans:

proc tsnoinv_prc {bot com args} {
global botnick
set args [lindex $args 0]
set nick [lindex $args 1]
set subcom [lindex $args 0]
putlog "botnick2: Banned $nick in #oulir (Channel/Site advertising)"
}

and it shows this one when the other bot kickbans a person:
<botnick> [10:34] botnick2: Banned in #oulir (Channel/Site advertising)

it doesn't show the nickname, what's wrong?!
«A fantastic spaghetti is a spaghetti that does not exist»
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

This is becuase of your use with the lindex command.

There is no need to be using the "args" variable, and will save you from using "set args [lindex $args 0]".

Replace all occurances of args, with arg.

Second, note the way you have used "lindex" on the "set nick" line. You have used a index of 1. All index numbers start from 0, and run to LENGTH-1.
Locked