Commands: Fix TB when someone executes an unknown command.
This commit is contained in:
parent
b902d06eaa
commit
2e16b3a590
|
@ -204,6 +204,12 @@ class ConnectionCommands:
|
||||||
sessionid = cmd.getAttr('sessionid')
|
sessionid = cmd.getAttr('sessionid')
|
||||||
if sessionid is None:
|
if sessionid is None:
|
||||||
# we start a new command session... only if we are visible for the jid
|
# 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]
|
newcmd = self.__commands[node]
|
||||||
if not newcmd.isVisibleFor(self.isSameJID(jid)):
|
if not newcmd.isVisibleFor(self.isSameJID(jid)):
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in New Issue