コード例 #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)