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.

Command to Add Channel over Botnet

Help for those learning Tcl or writing their own scripts.
Post Reply
T
Tom65789
Voice
Posts: 6
Joined: Fri May 18, 2007 4:53 pm

Command to Add Channel over Botnet

Post by Tom65789 »

hi, just wondering what the syntax was or how you make a random bot add a channel to its list from a hub bot because in one of my scripts i have:

Code: Select all

set bot [lindex [bots] [rand [llength [bots]]]]
But not sure where to go from here and how to do the equivalent of the following on a normal bot

Code: Select all

channel add #chan
User avatar
YooHoo
Owner
Posts: 939
Joined: Thu Feb 13, 2003 10:07 pm
Location: Redwood Coast

Post by YooHoo »

maybe i am unclear what exactly you are trying to do...have the leaf get a random channel from the hub then join it? I don't understand why you would want to do this via tcl, instead of using the share module...could you be more specific in what it is you wanna accomplish, please?
T
Tom65789
Voice
Posts: 6
Joined: Fri May 18, 2007 4:53 pm

Post by Tom65789 »

ok, i have one hub bot and 5 leafs.

On the hub i have a script which i want to be able to msg it something like !add #channel (this bit i have got) then it will randomly select one of the leaf bots to add that channel to the channel list of that leaf bot. (though i dont have the syntax/code which makes the bot that was selected to add that channel to its channel list)

Does this need to be in another script or can it be done from the same script which contains the !add #channel proc which selects the bot randomly using the code above which then after it randomly selects a bot tells the leafbot that was randomly selected to add that channel to its list.

Really hard to explain but im trying
User avatar
YooHoo
Owner
Posts: 939
Joined: Thu Feb 13, 2003 10:07 pm
Location: Redwood Coast

Post by YooHoo »

Tom65789 wrote:Does this need to be in another script or can it be done from the same script which contains the !add #channel proc which selects the bot randomly using the code above which then after it randomly selects a bot tells the leafbot that was randomly selected to add that channel to its list.
to answer the main question, you already had the command correct, channel add #blah, and no, it doesn't need to be a seperate script at all. In fact, I think it would be a rather good idea to keep that procedure together with your 'main' tcl.
T
Tom65789
Voice
Posts: 6
Joined: Fri May 18, 2007 4:53 pm

Post by Tom65789 »

but using channel add #channel makes the bot using the script join, and not one of the random leaf bots it selects. how do you make another bot on the botnet add that channel?
Post Reply