summaryrefslogtreecommitdiff
path: root/src/tabs.py
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2013-05-17 11:53:32 +0200
committermathieui <mathieui@mathieui.net>2013-05-17 11:53:32 +0200
commit69af684494566afa31b47f25bd4c71fe12bcdc30 (patch)
treeb46d8f5a07372b999943c15f5f4080297a807f85 /src/tabs.py
parentee8de89f9e082966dc5ca808e6e09769a05ca8e1 (diff)
downloadpoezio-69af684494566afa31b47f25bd4c71fe12bcdc30.tar.gz
poezio-69af684494566afa31b47f25bd4c71fe12bcdc30.tar.bz2
poezio-69af684494566afa31b47f25bd4c71fe12bcdc30.tar.xz
poezio-69af684494566afa31b47f25bd4c71fe12bcdc30.zip
Fix a traceback on /role completion if the tab is not connected
(also add outcast to the completed roles)
Diffstat (limited to 'src/tabs.py')
-rw-r--r--src/tabs.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/tabs.py b/src/tabs.py
index 4ea64171..8501f348 100644
--- a/src/tabs.py
+++ b/src/tabs.py
@@ -874,7 +874,8 @@ class MucTab(ChatTab):
n += 1
if n == 2:
userlist = [user.nick for user in self.users]
- userlist.remove(self.own_nick)
+ if self.own_nick in userlist:
+ userlist.remove(self.own_nick)
return the_input.auto_completion(userlist, '')
elif n == 3:
possible_roles = ['none', 'visitor', 'participant', 'moderator']
@@ -897,7 +898,7 @@ class MucTab(ChatTab):
userlist.extend(jidlist)
return the_input.auto_completion(userlist, '')
elif n == 3:
- possible_affiliations = ['none', 'member', 'admin', 'owner']
+ possible_affiliations = ['none', 'member', 'admin', 'owner', 'outcast']
return the_input.auto_completion(possible_affiliations, '')
def scroll_user_list_up(self):