示例#1
0
文件: irc.py 项目: P-Product/err
 def on_pubmsg(self, c, e):
     msg = Message(e.arguments[0])
     msg.setFrom(e.target)
     msg.setTo(self.callback.jid)
     msg.setMuckNick(e.source.split('!')[0])  # FIXME find the real nick in the channel
     msg.setType('groupchat')
     self.callback.callback_message(self, msg)
示例#2
0
文件: irc.py 项目: will-kanjoya/err
 def on_pubmsg(self, c, e):
     msg = Message(e.arguments[0])
     msg.setFrom(e.target)
     msg.setTo(self.callback.jid)
     msg.setMuckNick(e.source.split('!')[0])  # FIXME find the real nick in the channel
     msg.setType('groupchat')
     self.callback.callback_message(self, msg)
示例#3
0
文件: xmpp.py 项目: P-Product/err
 def incoming_message(self, xmppmsg):
     msg = Message(xmppmsg['body'])
     msg.setFrom(xmppmsg['from'].bare)
     msg.setTo(xmppmsg['to'].bare)
     msg.setType(xmppmsg['type'])
     msg.setMuckNick(xmppmsg['mucnick'])
     msg.setDelayed(bool(xmppmsg['delay']._get_attr('stamp')))  # this is a bug in sleekxmpp it should be ['from']
     self.callback_message(self.conn, msg)
示例#4
0
文件: xmpp.py 项目: avallark/err
 def incoming_message(self, xmppmsg):
     """Callback for message events"""
     msg = Message(xmppmsg['body'])
     if 'html' in xmppmsg.keys():
         msg.setHTML(xmppmsg['html'])
     msg.setFrom(xmppmsg['from'].full)
     msg.setTo(xmppmsg['to'].full)
     msg.setType(xmppmsg['type'])
     msg.setMuckNick(xmppmsg['mucnick'])
     msg.setDelayed(bool(xmppmsg['delay']._get_attr('stamp')))  # this is a bug in sleekxmpp it should be ['from']
     self.callback_message(self.conn, msg)
示例#5
0
文件: xmpp.py 项目: tjardick/err
 def incoming_message(self, xmppmsg):
     """Callback for message events"""
     msg = Message(xmppmsg['body'])
     if 'html' in xmppmsg.keys():
         msg.setHTML(xmppmsg['html'])
     msg.setFrom(xmppmsg['from'].full)
     msg.setTo(xmppmsg['to'].full)
     msg.setType(xmppmsg['type'])
     msg.setMuckNick(xmppmsg['mucnick'])
     msg.setDelayed(bool(xmppmsg['delay']._get_attr(
         'stamp')))  # this is a bug in sleekxmpp it should be ['from']
     self.callback_message(self.conn, msg)