Implement counting keyword events and a unified buffers system for when the master channel is unavailable
This commit is contained in:
@@ -160,6 +160,10 @@ class IRCBot(IRCClient):
|
||||
self.channels.append(channel)
|
||||
self.who(channel).addCallback(self.got_who)
|
||||
count.event(self.name, "selfjoin")
|
||||
if self.name == config["Master"][0] and channel == config["Master"][1]:
|
||||
for i in range(len(masterbuf)):
|
||||
self.msg(channel, masterbuf.pop(0))
|
||||
saveConf("masterbuf")
|
||||
|
||||
def left(self, channel):
|
||||
if channel in self.channels:
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
from json import load, dump, loads
|
||||
|
||||
from utils.loaders.command_loader import loadCommands
|
||||
from utils.logging.log import *
|
||||
|
||||
@@ -12,11 +13,9 @@ filemap = {
|
||||
"help": ["help.json", "command help"],
|
||||
"wholist": ["wholist.json", "WHO lists"],
|
||||
"counters": ["counters.json", "counters file"],
|
||||
"masterbuf": ["masterbuf.json", "master buffer"],
|
||||
}
|
||||
|
||||
numbers = "0123456789"
|
||||
|
||||
listener = None
|
||||
connections = {}
|
||||
IRCPool = {}
|
||||
ReactorPool = {}
|
||||
|
||||
Reference in New Issue
Block a user