diff options
author | mathieui <mathieui@mathieui.net> | 2014-04-05 18:03:35 +0200 |
---|---|---|
committer | mathieui <mathieui@mathieui.net> | 2014-04-05 18:03:44 +0200 |
commit | 077699d55d007d36f72b023e6bc743d3e2d8205e (patch) | |
tree | 3ca715d2d9754cef37677658988cf7a31e32a713 /src/core | |
parent | 8def5609d925c89004c906d67a7e1d3028706f32 (diff) | |
download | poezio-077699d55d007d36f72b023e6bc743d3e2d8205e.tar.gz poezio-077699d55d007d36f72b023e6bc743d3e2d8205e.tar.bz2 poezio-077699d55d007d36f72b023e6bc743d3e2d8205e.tar.xz poezio-077699d55d007d36f72b023e6bc743d3e2d8205e.zip |
Revert "Remove the pubsub-related stuff from the main branch"pubsub
This reverts commit 8def5609d925c89004c906d67a7e1d3028706f32.
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/commands.py | 17 | ||||
-rw-r--r-- | src/core/core.py | 1 |
2 files changed, 18 insertions, 0 deletions
diff --git a/src/core/commands.py b/src/core/commands.py index 5be95207..fb8dc2eb 100644 --- a/src/core/commands.py +++ b/src/core/commands.py @@ -20,6 +20,7 @@ import bookmark import common import fixes import pep +import pubsub import tabs import theming from common import safeJID @@ -763,6 +764,22 @@ def command_bind(self, arg): else: self.information('%s is now unbound' % args[0], 'Info') +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 command_rawxml(self, arg): """ /rawxml <xml stanza> diff --git a/src/core/core.py b/src/core/core.py index 9ae68c55..2ef6642d 100644 --- a/src/core/core.py +++ b/src/core/core.py @@ -1681,6 +1681,7 @@ class Core(object): command_invitations = commands.command_invitations command_quit = commands.command_quit command_bind = commands.command_bind + command_pubsub = commands.command_pubsub command_rawxml = commands.command_rawxml command_load = commands.command_load command_unload = commands.command_unload |