| View previous topic :: View next topic |
| Author |
Message |
jeremie Voice
Joined: 30 Aug 2007 Posts: 9
|
Posted: Thu Aug 30, 2007 3:54 pm Post subject: Issue with command trigger script. [Solved] |
|
|
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 |
|
| Back to top |
|
 |
smash Halfop
Joined: 31 Jul 2006 Posts: 45
|
Posted: Thu Aug 30, 2007 6:18 pm Post subject: |
|
|
change the tigger for the other bot.  _________________ quakenet #fraguk www.fraguk.com
hosting 113 scripts @ this time! |
|
| Back to top |
|
 |
iamdeath Master

Joined: 11 Feb 2005 Posts: 323 Location: *HeLL*
|
Posted: Thu Aug 30, 2007 10:33 pm Post subject: |
|
|
Modify your script with this line:
| Code: | 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. _________________ |AmDeAtH @ Undernet
Death is only the *Beginning*... |
|
| Back to top |
|
 |
jeremie Voice
Joined: 30 Aug 2007 Posts: 9
|
Posted: Fri Aug 31, 2007 5:12 am Post subject: Solved |
|
|
Thank you iamdeath.
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.
 |
|
| Back to top |
|
 |
|