| View previous topic :: View next topic |
| Author |
Message |
silenus Voice
Joined: 05 Jan 2008 Posts: 10
|
Posted: Sat Dec 06, 2008 12:33 pm Post subject: Question about onchan and netsplits |
|
|
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 |
|
 |
nml375 Revered One
Joined: 04 Aug 2006 Posts: 2857
|
Posted: Sat Dec 06, 2008 1:39 pm Post subject: |
|
|
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 |
|
 |
silenus Voice
Joined: 05 Jan 2008 Posts: 10
|
Posted: Sat Dec 06, 2008 2:14 pm Post subject: |
|
|
| Many thanks nml375 - I am just starting on writing these scripts - I had not noticed that command. |
|
| Back to top |
|
 |
|