Do not handle unknow commands as messages.

This commit is contained in:
Stephan Erb 2007-06-13 19:16:57 +00:00
parent 2aeeeaa896
commit 7b05adc678
1 changed files with 9 additions and 2 deletions

View File

@ -1204,10 +1204,17 @@ class ChatControl(ChatControlBase):
self.get_command_help(command)
self.clear(self.msg_textview)
return True
elif command == 'ping' and not len(message_array):
gajim.connections[self.account].sendPing(self.contact)
elif command == 'ping':
if not len(message_array):
gajim.connections[self.account].sendPing(self.contact)
else:
self.get_command_help(command)
self.clear(self.msg_textview)
return True
else:
self.print_conversation(_('No such command: /%s (if you want to send '
'this, prefix it with /say)') % command, 'info')
return True
return False
def get_command_help(self, command):