diff options
author | mathieui <mathieui@mathieui.net> | 2014-04-26 14:05:28 +0200 |
---|---|---|
committer | mathieui <mathieui@mathieui.net> | 2014-04-26 14:05:28 +0200 |
commit | 1f0ff4f0c30f5326e1b36ff03ebf83ac85239e89 (patch) | |
tree | 77aa90b2a0a7b3a8fec744b7c45f817ccd593e62 /src/core/core.py | |
parent | 4c4e2083a6f4cab94b5cf63620e7a1be66c82817 (diff) | |
download | poezio-1f0ff4f0c30f5326e1b36ff03ebf83ac85239e89.tar.gz poezio-1f0ff4f0c30f5326e1b36ff03ebf83ac85239e89.tar.bz2 poezio-1f0ff4f0c30f5326e1b36ff03ebf83ac85239e89.tar.xz poezio-1f0ff4f0c30f5326e1b36ff03ebf83ac85239e89.zip |
Fix #2444 (implement room destroy)
- destroy the current room if no parameter
- destroy the room given as a parameter if any
- no reason or alt room because it would be ambiguous in a command
(implementation ideas welcome)
Diffstat (limited to 'src/core/core.py')
-rw-r--r-- | src/core/core.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/core/core.py b/src/core/core.py index 1fe00d2d..5313e89d 100644 --- a/src/core/core.py +++ b/src/core/core.py @@ -1639,6 +1639,13 @@ class Core(object): "tab."), shortdesc=_('Move a tab.'), completion=self.completion_move_tab) + self.register_command('destroy_room', self.command_destroy_room, + usage=_('[room JID]'), + desc=_('Try to destroy the room [room JID], or the current' + ' tab if it is a multi-user chat and [room JID] is ' + 'not given.'), + shortdesc=_('Destroy a room.'), + completion=None) self.register_command('show', self.command_status, usage=_('<availability> [status message]'), desc=_("Sets your availability and (optionally) your status " @@ -1856,6 +1863,7 @@ class Core(object): command_bookmark_local = commands.command_bookmark_local command_bookmark = commands.command_bookmark command_bookmarks = commands.command_bookmarks + command_destroy_room = commands.command_destroy_room command_remove_bookmark = commands.command_remove_bookmark command_set = commands.command_set command_server_cycle = commands.command_server_cycle |