diff options
author | louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13> | 2011-01-04 03:05:49 +0000 |
---|---|---|
committer | louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13> | 2011-01-04 03:05:49 +0000 |
commit | ea7fe6bb966c59a38ce7079475daf6f155fafb18 (patch) | |
tree | ab565f03314def46746c51986796e78ea688ba89 /src/tabs.py | |
parent | a1b609e0c4e0ba3a4f027eaafc666d98842094f8 (diff) | |
download | poezio-ea7fe6bb966c59a38ce7079475daf6f155fafb18.tar.gz poezio-ea7fe6bb966c59a38ce7079475daf6f155fafb18.tar.bz2 poezio-ea7fe6bb966c59a38ce7079475daf6f155fafb18.tar.xz poezio-ea7fe6bb966c59a38ce7079475daf6f155fafb18.zip |
/cycle command
Diffstat (limited to 'src/tabs.py')
-rw-r--r-- | src/tabs.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/tabs.py b/src/tabs.py index b8fe9d84..30baf33a 100644 --- a/src/tabs.py +++ b/src/tabs.py @@ -364,6 +364,7 @@ class MucTab(ChatTab): self.commands['part'] = (self.command_part, _("Usage: /part [message]\n Part: disconnect from a room. You can specify an optional message."), None) self.commands['nick'] = (self.command_nick, _("Usage: /nick <nickname>\nNick: Change your nickname in the current room"), None) self.commands['recolor'] = (self.command_recolor, _('Usage: /recolor\nRecolor: Re-assign a color to all participants of the current room, based on the last time they talked. Use this if the participants currently talking have too many identical colors.'), None) + self.commands['cycle'] = (self.command_cycle, _('Usage: /cycle [message]\nCycle: Leaves the current room and rejoin it immediately'), None) self.resize() def scroll_user_list_up(self): @@ -374,6 +375,13 @@ class MucTab(ChatTab): self.user_win.scroll_down() self.core.refresh_window() + def command_cycle(self, arg): + # TODO use the argument as the exit message + if self.get_room().joined: + muc.leave_groupchat(self.core.xmpp, self.get_name(), self.get_room().own_nick, "") + self.get_room().joined = False + self.core.command_join('/') + def command_recolor(self, arg): """ Re-assign color to the participants of the room |