egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Issue with command trigger script. [Solved]

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
jeremie
Voice


Joined: 30 Aug 2007
Posts: 9

PostPosted: Thu Aug 30, 2007 3:54 pm    Post subject: Issue with command trigger script. [Solved] Reply with quote

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
View user's profile Send private message
smash
Halfop


Joined: 31 Jul 2006
Posts: 45

PostPosted: Thu Aug 30, 2007 6:18 pm    Post subject: Reply with quote

change the tigger for the other bot. Wink
_________________
quakenet #fraguk www.fraguk.com
hosting 113 scripts @ this time!
Back to top
View user's profile Send private message
iamdeath
Master


Joined: 11 Feb 2005
Posts: 323
Location: *HeLL*

PostPosted: Thu Aug 30, 2007 10:33 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
jeremie
Voice


Joined: 30 Aug 2007
Posts: 9

PostPosted: Fri Aug 31, 2007 5:12 am    Post subject: Solved Reply with quote

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.

Smile
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber