changeset 2158:22a7080b4ac5

Don't process commands with no jid and issue a warning. That's a proper fix.
author Karol 'grzywacz' Nowak <grzywacz@sul.uni.lodz.pl>
date Mon, 18 Jun 2007 03:30:58 +0200
parents c3bf2fa18b9a
children a8941968efa1
files jabberbot/xmppbot.py
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/jabberbot/xmppbot.py	Mon Jun 18 03:21:38 2007 +0200
+++ b/jabberbot/xmppbot.py	Mon Jun 18 03:30:58 2007 +0200
@@ -173,6 +173,11 @@
         @param ignore_dnd: if command results in user interaction, should DnD be ignored?
         
         """
+        
+        if not command.jid:
+            self.log("Received a command with empty jid, looks like a bug!")
+            return
+        
         # Handle normal notifications
         if isinstance(command, cmd.NotificationCommand):
             jid = JID(node_or_jid=command.jid)