diff options
Diffstat (limited to 'plugins/admin.py')
-rw-r--r-- | plugins/admin.py | 40 |
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) |