diff options
| author | 2018-08-30 11:13:26 +0100 | |
|---|---|---|
| committer | 2018-08-30 11:13:26 +0100 | |
| commit | 49cc4d8d7b126e35b2a69da8875d9fc74f5df984 (patch) | |
| tree | 5fd7f65c4ae2c64f0b2f0e5205f2cda2b2b94a2d | |
| parent | default events on IRCLineHandler should use original_line, not line (diff) | |
| signature | ||
Add help and usage for commands in channel_op.py
| -rw-r--r-- | modules/channel_op.py | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/modules/channel_op.py b/modules/channel_op.py index 4dc53b28..608e95c8 100644 --- a/modules/channel_op.py +++ b/modules/channel_op.py @@ -6,30 +6,39 @@ class Module(object): self.bot = bot bot.events.on("received").on("command").on("kick", "k" ).hook(self.kick, channel_only=True, require_mode="o", - min_args=1) + min_args=1, help="Kick a user from the channel", + usage="<nickname> [reason]") bot.events.on("received").on("command").on("ban" ).hook(self.ban, channel_only=True, require_mode="o", - min_args=1) + min_args=1, help="Ban a user/hostmask from the channel", + usage="<nickname/hostmask>") bot.events.on("received").on("command").on("unban" ).hook(self.unban, channel_only=True, require_mode="o", - min_args=1) + min_args=1, help="Unban a user/hostmask from the channel", + usage="<nickname/hostmask>") bot.events.on("received").on("command").on("kickban", "kb" ).hook(self.kickban, channel_only=True, require_mode="o", - min_args=1) + min_args=1, help="Kickban a user from the channel", + usage="<nickanme> [reason]") bot.events.on("received").on("command").on("op" - ).hook(self.op, channel_only=True, require_mode="o") + ).hook(self.op, channel_only=True, require_mode="o", + help="Give +o to a user", usage="[nickname]") bot.events.on("received").on("command").on("deop" - ).hook(self.deop, channel_only=True, require_mode="o") + ).hook(self.deop, channel_only=True, require_mode="o" + help="Take +o from a user", usage="[nickname]") bot.events.on("received").on("command").on("voice" - ).hook(self.voice, channel_only=True, require_mode="o") + ).hook(self.voice, channel_only=True, require_mode="o", + help="Give +v to a user", usage="[nickname]") bot.events.on("received").on("command").on("devoice" - ).hook(self.devoice, channel_only=True, require_mode="o") + ).hook(self.devoice, channel_only=True, require_mode="o", + help="Take +v from a user", usage="[nickname]") - bot.events.on("received").on("message").on("channel").hook(self.highlight_spam) + bot.events.on("received").on("message").on("channel").hook( + self.highlight_spam) bot.events.on("postboot").on("configure").on( "channelset").assure_call(setting="highlight-spam-threshold", |
