I have a script that replys with a message to a given command on channel.
The script works without a problem but I want to add it to two or more bots so the reply can be still given if one or more of the bots are offline.
When I added it to a second bot both bots replied.
Is there a way that I can make only one of my bots relpy to the command and still have the script running on more than one bot for when one bot goes offline?
Last edited by jeremie on Mon Sep 24, 2007 11:12 am, edited 1 time in total.
set mybot1 "YourFirstBot"
if {[onchan $mybot1 $chan]} { return )
What it is going to do is, it will check if your bot is already on the channel then it will not continue, if your bot is offline then it will go thruogh the whole script.
I put the set mybot1 "YourFirstBot" in the conf.
Added mybot1 to Global and inserted if {[onchan $mybot1 $chan]} { return ) after changing the ) to } .
It worked because "MySecondBot" didn't reply and in a channel where "YourFirstBot" was missing "MySecondBot" replied.