summaryrefslogtreecommitdiff
path: root/plugins/admin.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/admin.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/admin.py')
-rw-r--r--plugins/admin.py40
1 files changed, 26 insertions, 14 deletions
diff --git a/plugins/admin.py b/plugins/admin.py
index cb9ee37b..0f61007b 100644
--- a/plugins/admin.py
+++ b/plugins/admin.py
@@ -13,28 +13,40 @@ class Plugin(BasePlugin):
/noaffiliation
"""
def init(self):
- for role in ['visitor', 'participant' , 'moderator']:
+ for role in ('visitor', 'participant' , 'moderator'):
self.add_tab_command(MucTab, role, self.role(role),
- '/%s <nick>\n%s: Set the role of a nick to %s.' %
- (role, role.capitalize(), role), self.complete_nick)
+ help='Set the role of a nick to %s' % role,
+ usage= '<nick>',
+ short='Set the role to %s' % role,
+ completion=self.complete_nick)
- for aff in ['member', 'owner', 'admin']:
+ for aff in ('member', 'owner', 'admin'):
self.add_tab_command(MucTab, aff, self.affiliation(aff),
- '/%s <nick>\n%s: set the affiliation of a nick to %s' %
- (aff, aff.capitalize(), aff), self.complete_nick)
+ usage='<nick>',
+ help='Set the affiliation of a nick to %s' % aff,
+ short='Set the affiliation to %s' % aff,
+ completion=self.complete_nick)
self.add_tab_command(MucTab, 'noaffiliation', self.affiliation('none'),
- '/noaffiliation <nick>\nNoAffiliation: set the affiliation of a nick to none.',
- self.complete_nick)
+ usage='<nick>',
+ help='Set the affiliation of a nick to none.',
+ short='Set the affiliation to none.',
+ completion=self.complete_nick)
self.add_tab_command(MucTab, 'voice', self.affiliation('member'),
- '/voice <nick>\nVoice: set the affiliation of a nick to member.',
- self.complete_nick)
+ usage='<nick>',
+ help='Set the affiliation of a nick to member.',
+ short='Set the affiliation to member.',
+ completion=self.complete_nick)
self.add_tab_command(MucTab, 'op', self.role('moderator'),
- '/op <nick>\nOp: set the role of a nick to moderator.',
- self.complete_nick)
+ usage='<nick>',
+ help='Set the role of a nick to moderator.',
+ short='Set the role to moderator.',
+ completion=self.complete_nick)
self.add_tab_command(MucTab, 'mute', self.role('visitor'),
- '/mute <nick>\nMute: set the role of a nick to visitor.',
- self.complete_nick)
+ usage='<nick>',
+ help='Set the role of a nick to visitor.',
+ short='Set the role to visitor.',
+ completion=self.complete_nick)
def role(self, role):
return lambda args: self.core.current_tab().command_role(args+' '+role)