summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-01-30 16:41:12 +0100
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-01-30 16:41:12 +0100
commitf8701d1ada5401988c0406388a3879fd9ed87ca1 (patch)
tree0d9ffc66441eb8fd506071a1cdeff295860c47ea
parentcleanup code (diff)
downloadpyload-f8701d1ada5401988c0406388a3879fd9ed87ca1.tar.xz
closed #223
-rw-r--r--module/plugins/hooks/XMPPInterface.py17
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: