Allow gaps in relay numbering
This commit is contained in:
17
core/bot.py
17
core/bot.py
@@ -16,7 +16,7 @@ from twisted.words.protocols.irc import (
|
||||
|
||||
import main
|
||||
from core.relay import sendRelayNotification
|
||||
from modules import chankeep, counters, monitor, regproc, userinfo
|
||||
from modules import chankeep, counters, helpers, monitor, regproc, userinfo
|
||||
from utils.dedup import dedup
|
||||
from utils.logging.debug import debug
|
||||
from utils.logging.log import error, log, warn
|
||||
@@ -458,11 +458,16 @@ class IRCBot(IRCClient):
|
||||
def recheckList(self):
|
||||
allRelays = chankeep.allRelaysActive(self.net)
|
||||
if allRelays:
|
||||
name = self.net + "1"
|
||||
if main.IRCPool[name].wantList is True:
|
||||
main.IRCPool[name].list(nocheck=True)
|
||||
debug("Asking for a list for %s after final relay %i connected" % (self.net, self.num))
|
||||
if self.num == 1: # Only one instance should do a list
|
||||
debug(f"All relays active for {self.net}")
|
||||
first_relay = helpers.get_first_relay(self.net)
|
||||
if first_relay:
|
||||
if first_relay.wantList is True:
|
||||
first_relay.list(nocheck=True)
|
||||
debug("Asking for a list for %s after final relay %i connected" % (self.net, self.num))
|
||||
# name = self.net + "1"
|
||||
|
||||
# if self.num == 1: # Only one instance should do a list
|
||||
if helpers.is_first_relay(self.net, self.num):
|
||||
if self.chanlimit:
|
||||
if allRelays:
|
||||
self.list()
|
||||
|
||||
Reference in New Issue
Block a user