Implement configurable chanlimit and add more fields about LIST output to Redis
This commit is contained in:
@@ -61,6 +61,7 @@ class IRCBot(IRCClient):
|
||||
self.name = net + str(num)
|
||||
alias = main.alias[num]
|
||||
relay = main.network[self.net].relays[num]
|
||||
self.netinst = main.network[self.net]
|
||||
self.nickname = alias["nick"]
|
||||
self.realname = alias["realname"]
|
||||
self.username = alias["nick"].lower() + "/" + relay["net"]
|
||||
@@ -518,6 +519,12 @@ class IRCBot(IRCClient):
|
||||
warn("Invalid chanlimit: %s" % chanlimit)
|
||||
if self.chanlimit == 0:
|
||||
self.chanlimit = 200 # don't take the piss if it's not limited
|
||||
net_inst_chanlimit = self.netinst.chanlimit
|
||||
if net_inst_chanlimit:
|
||||
if self.chanlimit > net_inst_chanlimit:
|
||||
self.chanlimit = net_inst_chanlimit
|
||||
warn(f"Chanlimit on {self.net} too high, setting to {self.chanlimit}")
|
||||
|
||||
if not regproc.needToRegister(self.net): # if we need to register, only recheck on auth confirmation
|
||||
self.recheckList()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user