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.

Issue with command trigger script. [Solved]

Help for those learning Tcl or writing their own scripts.
Post Reply
j
jeremie
Voice
Posts: 9
Joined: Thu Aug 30, 2007 3:35 pm

Issue with command trigger script. [Solved]

Post by jeremie »

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.
s
smash
Halfop
Posts: 45
Joined: Mon Jul 31, 2006 12:33 pm

Post by smash »

change the tigger for the other bot. :wink:
quakenet #fraguk www.fraguk.com
hosting 113 scripts @ this time!
User avatar
iamdeath
Master
Posts: 323
Joined: Fri Feb 11, 2005 2:32 pm
Location: *HeLL*
Contact:

Post by iamdeath »

Modify your script with this line:

Code: Select all

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*...
j
jeremie
Voice
Posts: 9
Joined: Thu Aug 30, 2007 3:35 pm

Solved

Post by jeremie »

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.

:)
Post Reply