Changeset 8454 for trunk

Show
Ignore:
Timestamp:
08/06/07 13:45:29 (16 months ago)
Author:
asterix
Message:

fix /say command. fixes #3336

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/chat_control.py

    r8445 r8454  
    555555 
    556556        def send_message(self, message, keyID = '', type = 'chat', chatstate = None, 
    557         msg_id = None, composing_xep = None, resource = None): 
     557        msg_id = None, composing_xep = None, resource = None, 
     558        process_command = True): 
    558559                '''Send the given message to the active tab. Doesn't return None if error 
    559560                ''' 
     
    561562                        return 1 
    562563 
    563  
    564                 if not self._process_command(message): 
     564                if not process_command or not self._process_command(message): 
    565565                        ret = MessageControl.send_message(self, message, keyID, type = type, 
    566566                                chatstate = chatstate, msg_id = msg_id, 
     
    12851285                        return 
    12861286 
     1287                # Do we need to process command for the message ? 
     1288                process_command = True 
    12871289                if message.startswith('/say'): 
    12881290                        message = message[5:] 
     1291                        process_command = False 
    12891292 
    12901293                # refresh timers 
     
    13301333                                 
    13311334                if not ChatControlBase.send_message(self, message, keyID, type = 'chat', 
    1332                 chatstate = chatstate_to_send, composing_xep = composing_xep): 
     1335                chatstate = chatstate_to_send, composing_xep = composing_xep, 
     1336                process_command = process_command): 
    13331337                        self.print_conversation(message, self.contact.jid, 
    13341338                                encrypted = encrypted)