diff options
Diffstat (limited to 'src/core.py')
-rw-r--r-- | src/core.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/core.py b/src/core.py index 3f24fb1b..6db97919 100644 --- a/src/core.py +++ b/src/core.py @@ -40,6 +40,7 @@ import multiuserchat as muc import tabs import xhtml +import pubsub import windows import connection import timed_events @@ -129,6 +130,7 @@ class Core(object): 'version': (self.command_version, _('Usage: /version <jid>\nVersion: get the software version of the given JID (usually its XMPP client and Operating System)'), None), 'reconnect': (self.command_reconnect, _('Usage: /connect\nConnect: disconnect from the remote server if you are currently connected and then connect to it again'), None), 'server_cycle': (self.command_server_cycle, _('Usage: /server_cycle [domain] [message]\nServer Cycle: disconnect and reconnects in all the rooms in domain.'), None), + 'pubsub': (self.command_pubsub, _('Usage: /pubsub <domain>\nPubsub: Open a pubsub browser on the given domain'), None), } self.key_func = { @@ -1369,6 +1371,22 @@ class Core(object): tab.get_room().joined = False self.command_join(tab.get_name()) + def command_pubsub(self, args): + """ + Opens a pubsub browser on the given domain + """ + args = common.shell_split(args) + if len(args) != 1: + return self.command_help('pubsub') + domain = args[0] + tab = self.get_tab_by_name('%s@@pubsubbrowser' % (domain,), pubsub.PubsubBrowserTab) + if tab: + self.command_win('%s' % tab.nb) + else: + new_tab = pubsub.PubsubBrowserTab(domain) + self.add_tab(new_tab, True) + self.refresh_window() + def go_to_room_number(self): """ Read 2 more chars and go to the tab |