diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2011-01-30 16:41:12 +0100 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2011-01-30 16:41:12 +0100 |
commit | f8701d1ada5401988c0406388a3879fd9ed87ca1 (patch) | |
tree | 0d9ffc66441eb8fd506071a1cdeff295860c47ea /module | |
parent | cleanup code (diff) | |
download | pyload-f8701d1ada5401988c0406388a3879fd9ed87ca1.tar.xz |
closed #223
Diffstat (limited to 'module')
-rw-r--r-- | module/plugins/hooks/XMPPInterface.py | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/module/plugins/hooks/XMPPInterface.py b/module/plugins/hooks/XMPPInterface.py index 6c6141a73..a05d956d5 100644 --- a/module/plugins/hooks/XMPPInterface.py +++ b/module/plugins/hooks/XMPPInterface.py @@ -121,9 +121,9 @@ class XMPPInterface(IRCInterface, JabberClient): body=stanza.get_body() t=stanza.get_type() self.log.debug(u'pyLoad XMPP: Message from %s received.' % (unicode(stanza.get_from(),))) - self.log.debug(u'pyLoad XMPP: Body: %s' % body) + self.log.debug(u'pyLoad XMPP: Body: %s Subject: %s Type: %s' % (body,subject,t)) - if stanza.get_type()=="headline": + if t=="headline": # 'headline' messages should never be replied to return True if subject: @@ -144,11 +144,14 @@ class XMPPInterface(IRCInterface, JabberClient): trigger = "pass" args = None - - temp = body.split() - trigger = temp[0] - if len(temp) > 1: - args = temp[1:] + + try: + temp = body.split() + trigger = temp[0] + if len(temp) > 1: + args = temp[1:] + except: + pass handler = getattr(self, "event_%s" % trigger, self.event_pass) try: |