From 010e02e3296c092d6365efb3d4fe81b4ea4c20eb Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Fri, 17 Jul 2009 19:12:11 +0200 Subject: [PATCH] handle reson when we ban a jid. --- src/groupchat_control.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/groupchat_control.py b/src/groupchat_control.py index aabbad838..8d9fdb355 100644 --- a/src/groupchat_control.py +++ b/src/groupchat_control.py @@ -1606,6 +1606,12 @@ class GroupchatControl(ChatControlBase): 'info') self.clear(self.msg_textview) elif message_array[0].split()[0].find('@') > 0: + message_splited = message_array[0].split(' ', 1) + jid = message_splited[0] + if len(message_splited) == 2: + reason = message_splited[1] + else: + reason = 'None' gajim.connections[self.account].gc_set_affiliation(self.room_jid, message_array[0].split()[0], 'outcast', reason) self.clear(self.msg_textview)