summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2012-03-10 23:43:19 +0100
committermathieui <mathieui@mathieui.net>2012-03-13 21:31:36 +0100
commit5ce8105ec697938bb1b40744b47f299c74727f9c (patch)
tree0145c9494fdafb180ede5e2bfd879035c58ac393 /src
parent27a7bfc92ce96af5ae08e2edd78a146287997c85 (diff)
downloadpoezio-5ce8105ec697938bb1b40744b47f299c74727f9c.tar.gz
poezio-5ce8105ec697938bb1b40744b47f299c74727f9c.tar.bz2
poezio-5ce8105ec697938bb1b40744b47f299c74727f9c.tar.xz
poezio-5ce8105ec697938bb1b40744b47f299c74727f9c.zip
Fix /affiliation
Diffstat (limited to 'src')
-rw-r--r--src/tabs.py13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/tabs.py b/src/tabs.py
index 7a77a0f4..afe77274 100644
--- a/src/tabs.py
+++ b/src/tabs.py
@@ -946,19 +946,18 @@ class MucTab(ChatTab):
"""
/affiliation <nick> <role>
Changes the affiliation of an user
- roles can be: none, visitor, participant, moderator
+ affiliations can be: outcast, none, member, admin, owner
"""
args = common.shell_split(arg)
if len(args) < 2:
- self.core.command_help('role')
+ self.core.command_help('affiliation')
return
- nick, affiliation = args[0],args[1]
- if len(args) > 2:
- reason = ' '.join(args[2:])
- else:
- reason = ''
+ nick, affiliation = args[0], args[1].lower()
if not self.joined:
return
+ if affiliation not in ('outcast', 'none', 'member', 'admin', 'owner'):
+ self.core.command_help('affiliation')
+ return
if nick in [user.nick for user in self.users]:
res = muc.set_user_affiliation(self.core.xmpp, self.get_name(), affiliation, nick=nick)
else: