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: Select all
proc botsilent {} {
if { [onchan "Bot_A" "#game"] || [onchan "Bot_A_Backup" "#game"] } {
putserv "PRIVMSG #game :!trivia"
}
}