예제 #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)