Add subparse method in context, that use server parser

This commit is contained in:
nemunaire 2016-01-12 18:09:01 +01:00
commit 277d55d521
2 changed files with 10 additions and 0 deletions

View file

@ -268,3 +268,8 @@ class IRC(SocketServer):
mes = msg.to_bot_message(self)
if mes is not None:
yield mes
def subparse(self, orig, cnt):
msg = IRCMessage(("@time=%s :%s!user@host.com PRIVMSG %s :%s" % (orig.date.strftime("%Y-%m-%dT%H:%M:%S.%fZ"), orig.frm, ",".join(orig.to), cnt)).encode(self.encoding), self.encoding)
return msg.to_bot_message(self)