| View previous topic :: View next topic |
| Author |
Message |
Tom65789 Voice
Joined: 18 May 2007 Posts: 6
|
Posted: Fri May 18, 2007 4:57 pm Post subject: Command to Add Channel over Botnet |
|
|
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: | | 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
|
|
| Back to top |
|
 |
YooHoo Owner

Joined: 13 Feb 2003 Posts: 939 Location: Redwood Coast
|
Posted: Fri May 18, 2007 6:31 pm Post subject: |
|
|
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? _________________
Johoho's TCL for beginners
 |
|
| Back to top |
|
 |
Tom65789 Voice
Joined: 18 May 2007 Posts: 6
|
Posted: Fri May 18, 2007 6:37 pm Post subject: |
|
|
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 |
|
| Back to top |
|
 |
YooHoo Owner

Joined: 13 Feb 2003 Posts: 939 Location: Redwood Coast
|
Posted: Fri May 18, 2007 8:14 pm Post subject: |
|
|
| 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. _________________
Johoho's TCL for beginners
 |
|
| Back to top |
|
 |
Tom65789 Voice
Joined: 18 May 2007 Posts: 6
|
Posted: Sat May 19, 2007 4:12 am Post subject: |
|
|
| 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? |
|
| Back to top |
|
 |
|