Tokenize IRC data as soon as it comes out of IRCServer
This commit is contained in:
parent
cb25f70418
commit
f7eae1a978
2 changed files with 6 additions and 6 deletions
|
@ -24,12 +24,11 @@ class Module(ModuleManager.BaseModule):
|
|||
|
||||
@utils.hook("raw.received")
|
||||
def handle_raw(self, event):
|
||||
line = utils.irc.parse_line(event["line"])
|
||||
if "batch" in line.tags and line.tags["batch"] in event[
|
||||
"server"].batches:
|
||||
server.batches[tag["batch"]].lines.append(line)
|
||||
if ("batch" in event["line"].tags and
|
||||
event["line"].tags["batch"] in event["server"].batches):
|
||||
server.batches[tag["batch"]].lines.append(event["line"])
|
||||
else:
|
||||
self._handle(event["server"], line)
|
||||
self._handle(event["server"], event["line"])
|
||||
|
||||
@utils.hook("raw.send")
|
||||
def handle_send(self, event):
|
||||
|
|
|
@ -207,7 +207,8 @@ class Server(IRCObject.Object):
|
|||
return
|
||||
|
||||
self.bot.log.debug("%s (raw recv) | %s", [str(self), line])
|
||||
self.events.on("raw.received").call_unsafe(server=self, line=line)
|
||||
self.events.on("raw.received").call_unsafe(server=self,
|
||||
line=utils.irc.parse_line(line))
|
||||
self.check_users()
|
||||
def check_users(self):
|
||||
for user in self.new_users:
|
||||
|
|
Loading…
Reference in a new issue