Add subparse method in context, that use server parser
This commit is contained in:
parent
d705d351c0
commit
277d55d521
2 changed files with 10 additions and 0 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue