Commands: Fix TB when someone executes an unknown command.

This commit is contained in:
Tomasz Melcer 2006-12-16 23:30:07 +00:00
parent b902d06eaa
commit 2e16b3a590
1 changed files with 6 additions and 0 deletions

View File

@ -204,6 +204,12 @@ class ConnectionCommands:
sessionid = cmd.getAttr('sessionid')
if sessionid is None:
# we start a new command session... only if we are visible for the jid
# and command exist
if node not in self.__commands.keys():
self.connection.send(
xmpp.Error(iq_obj, xmpp.NS_STANZAS+' item-not-found'))
raise xmpp.NodeProcessed
newcmd = self.__commands[node]
if not newcmd.isVisibleFor(self.isSameJID(jid)):
return