From 7b05adc67809768223f08395b9b4a9f8e1536e8e Mon Sep 17 00:00:00 2001 From: Stephan Erb Date: Wed, 13 Jun 2007 19:16:57 +0000 Subject: [PATCH] Do not handle unknow commands as messages. --- src/chat_control.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/chat_control.py b/src/chat_control.py index 3e98753dc..cc0221c5c 100644 --- a/src/chat_control.py +++ b/src/chat_control.py @@ -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):