diff options
author | mathieui <mathieui@mathieui.net> | 2012-04-18 00:11:58 +0200 |
---|---|---|
committer | mathieui <mathieui@mathieui.net> | 2012-04-18 00:11:58 +0200 |
commit | 13a9811cf6768a0819d6157468f07619ee4ca22b (patch) | |
tree | dead13b77f8a20a934127914b8dd5d2f548be03c /src | |
parent | d049ea753497a255e0554e37c4c81e15541ed08f (diff) | |
download | poezio-13a9811cf6768a0819d6157468f07619ee4ca22b.tar.gz poezio-13a9811cf6768a0819d6157468f07619ee4ca22b.tar.bz2 poezio-13a9811cf6768a0819d6157468f07619ee4ca22b.tar.xz poezio-13a9811cf6768a0819d6157468f07619ee4ca22b.zip |
Do not split on command_recolor as it is unneeded
Diffstat (limited to 'src')
-rw-r--r-- | src/tabs.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/tabs.py b/src/tabs.py index 9f67ab29..d0ade8f5 100644 --- a/src/tabs.py +++ b/src/tabs.py @@ -740,9 +740,10 @@ class MucTab(ChatTab): def command_recolor(self, arg): """ + /recolor [random] Re-assign color to the participants of the room """ - args = common.shell_split(arg) + arg = arg.strip() compare_users = lambda x: x.last_talked users = list(self.users) sorted_users = sorted(users, key=compare_users, reverse=True) @@ -752,9 +753,8 @@ class MucTab(ChatTab): sorted_users.remove(user) user.color = get_theme().COLOR_OWN_NICK colors = list(get_theme().LIST_COLOR_NICKNAMES) - if len(args) >= 1: - if args[0] == 'random': - random.shuffle(colors) + if arg and arg == 'random': + random.shuffle(colors) for i, user in enumerate(sorted_users): user.color = colors[i % len(colors)] self.text_win.rebuild_everything(self._text_buffer) |