diff options
Diffstat (limited to 'src/core/commands.py')
-rw-r--r-- | src/core/commands.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/core/commands.py b/src/core/commands.py index 8b753b18..0815a80e 100644 --- a/src/core/commands.py +++ b/src/core/commands.py @@ -815,6 +815,18 @@ def command_quit(self, arg=''): self.reset_curses() sys.exit() +def command_destroy_room(self, arg=''): + """ + /destroy_room [JID] + """ + room = safeJID(arg).bare + if room: + muc.destroy_room(self.xmpp, room) + elif isinstance(self.current_tab(), tabs.MucTab) and not arg: + muc.destroy_room(self.xmpp, self.current_tab().general_jid) + else: + self.information(_('Invalid JID: "%s"') % arg, _('Error')) + def command_bind(self, arg): """ Bind a key. |