summaryrefslogtreecommitdiff
path: root/plugins/ping.py
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2013-03-01 19:25:31 +0100
committermathieui <mathieui@mathieui.net>2013-03-01 19:25:31 +0100
commite1956533a6e04d7ba2afdbc841b48804a84120b3 (patch)
treefc2e61bacc68adc9d0c5382a4797018db1223eab /plugins/ping.py
parent43c93a0a1b84c87b587174c49753b036f42672cd (diff)
downloadpoezio-e1956533a6e04d7ba2afdbc841b48804a84120b3.tar.gz
poezio-e1956533a6e04d7ba2afdbc841b48804a84120b3.tar.bz2
poezio-e1956533a6e04d7ba2afdbc841b48804a84120b3.tar.xz
poezio-e1956533a6e04d7ba2afdbc841b48804a84120b3.zip
Fix #2231 (update the plugins to use the new help system)
And fix some imprecisions/mistakes in the help.
Diffstat (limited to 'plugins/ping.py')
-rw-r--r--plugins/ping.py20
1 files changed, 16 insertions, 4 deletions
diff --git a/plugins/ping.py b/plugins/ping.py
index fdecd8e0..22401a25 100644
--- a/plugins/ping.py
+++ b/plugins/ping.py
@@ -8,10 +8,22 @@ import tabs
class Plugin(BasePlugin):
def init(self):
self.core.xmpp.register_plugin('xep_0199')
- self.add_command('ping', self.command_ping, '/ping <jid>\nPing: Send a XMPP ping to jid (see XEP-0199).', self.completion_ping)
- self.add_tab_command(tabs.MucTab, 'ping', self.command_muc_ping, '/ping <jid or nick>\nPing: Send a XMPP ping to jid or nick (see XEP-0199)', self.completion_muc_ping)
- self.add_tab_command(tabs.PrivateTab, 'ping', self.command_private_ping, '/ping\nPing: Send a XMPP ping to the current interlocutor (see XEP-0199)')
- self.add_tab_command(tabs.ConversationTab, 'ping', self.command_private_ping, '/ping\nPing: Send a XMPP ping to the current interlocutor (see XEP-0199)', self.completion_ping)
+ self.add_command('ping', self.command_ping,
+ usage='<jid>',
+ help='Send a XMPP ping to jid (see XEP-0199).',
+ short='Send a ping',
+ completion=self.completion_ping)
+ self.add_tab_command(tabs.MucTab, 'ping', self.command_muc_ping,
+ usage='<jid|nick>',
+ help='Send a XMPP ping to jid or nick (see XEP-0199).',
+ short='Send a ping.',
+ completion=self.completion_muc_ping)
+ for _class in (tabs.PrivateTab, tabs.ConversationTab):
+ self.add_tab_command(_class, 'ping', self.command_private_ping,
+ usage='[jid]',
+ help='Send a XMPP ping to the current interlocutor or the given JID.',
+ short='Send a ping',
+ completion=self.completion_ping)
def command_ping(self, arg):
if not arg: