summaryrefslogtreecommitdiff
path: root/src/core.py
diff options
context:
space:
mode:
authorFlorent Le Coz <louiz@louiz.org>2011-06-20 03:19:37 +0200
committerFlorent Le Coz <louiz@louiz.org>2011-06-20 03:19:37 +0200
commitca0b4af3647b935adbe8b6c0dcb30764507ed083 (patch)
tree7f84b080009723a77b3b5ec524a1da8cb74c13ad /src/core.py
parent3c120b3aa23456c0a0d2ca8c7edff2f51772ddf7 (diff)
downloadpoezio-ca0b4af3647b935adbe8b6c0dcb30764507ed083.tar.gz
poezio-ca0b4af3647b935adbe8b6c0dcb30764507ed083.tar.bz2
poezio-ca0b4af3647b935adbe8b6c0dcb30764507ed083.tar.xz
poezio-ca0b4af3647b935adbe8b6c0dcb30764507ed083.zip
First pubsub browser iteration: can list root nodes, create an item and receive items
Diffstat (limited to 'src/core.py')
-rw-r--r--src/core.py18
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