From 49cc4d8d7b126e35b2a69da8875d9fc74f5df984 Mon Sep 17 00:00:00 2001 From: jesopo Date: Thu, 30 Aug 2018 11:13:26 +0100 Subject: Add help and usage for commands in channel_op.py --- modules/channel_op.py | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) (limited to 'modules') 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=" [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="") 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="") 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=" [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", -- cgit v1.3.1-10-gc9f91