Add config option for WHO loop interval

This commit is contained in:
Mark Veidemanis 2018-07-28 22:02:40 +01:00
parent 23617cae53
commit 9e3ae677e1
2 changed files with 5 additions and 2 deletions

View File

@ -25,12 +25,15 @@
"Tweaks": { "Tweaks": {
"ZNC": { "ZNC": {
"Prefix": "*" "Prefix": "*"
},
"Delays": {
"WhoLoop": 60
} }
}, },
"Default": { "Default": {
"host": null, "host": null,
"port": null, "port": null,
"protocol": null, "protocol": "ssl",
"bind": null, "bind": null,
"timeout": 30, "timeout": 30,
"maxdelay": 360, "maxdelay": 360,

View File

@ -247,7 +247,7 @@ class IRCBot(IRCClient):
main.saveConf("masterbuf") main.saveConf("masterbuf")
lc = LoopingCall(self.getWho, channel) lc = LoopingCall(self.getWho, channel)
self._getWho[channel] = lc self._getWho[channel] = lc
lc.start(60) lc.start(main.config["Tweaks"]["Delays"]["WhoLoop"])
def left(self, channel, message): def left(self, channel, message):
if channel in self.channels: if channel in self.channels: