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 

Question about onchan and netsplits

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


Joined: 05 Jan 2008
Posts: 10

PostPosted: Sat Dec 06, 2008 12:33 pm    Post subject: Question about onchan and netsplits Reply with quote

Does onchan see nicks which are absent due to a netsplit?

I have a trivia bot ("Bot_A" with an alternate nick "Bot_A_Backup"), and another bot ("Bot_B"), which is on the channel to do other things. Sometimes Bot_A stalls and it nice to have Bot_B force a restart. It issues a restart command when Bot_A has been silent for 3 minutes.

I do not, however, want Bot_B issuing restarts if Bot_A has disappeared due to a netsplit or for some other reason. I am using following code, but Bot B is issuing a restart during netsplits, when neither Bot_A nor Bot_A_Backup is on the channel.

If onchan is not seeing the absent nicks, then am I making some stupid error here?

Code:
proc botsilent {} {
   if { [onchan "Bot_A" "#game"] || [onchan "Bot_A_Backup" "#game"] } {
      putserv "PRIVMSG #game :!trivia"
   }   
}
Back to top
View user's profile Send private message
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Sat Dec 06, 2008 1:39 pm    Post subject: Reply with quote

onchan does indeed "see" netsplit'd nicks. You'll have to add an additional check for split'd nicks (see the onchansplit command for this, documented in the tcl-commands.doc file accompanying your eggdrop)
_________________
NML_375, idling at #eggdrop@IrcNET
Back to top
View user's profile Send private message
silenus
Voice


Joined: 05 Jan 2008
Posts: 10

PostPosted: Sat Dec 06, 2008 2:14 pm    Post subject: Reply with quote

Many thanks nml375 - I am just starting on writing these scripts - I had not noticed that command.
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