From 9ad03589a443fd56fb513d57f88875747b48c505 Mon Sep 17 00:00:00 2001 From: Ben Kurtovic Date: Sun, 10 Mar 2013 16:34:53 -0400 Subject: [PATCH] Make default !access behavior more reasonable. --- earwigbot/commands/access.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/earwigbot/commands/access.py b/earwigbot/commands/access.py index 0ca75c1..f738b21 100644 --- a/earwigbot/commands/access.py +++ b/earwigbot/commands/access.py @@ -30,11 +30,8 @@ class Access(Command): commands = ["access", "permission", "permissions", "perm", "perms"] def process(self, data): - if not data.args: - self.reply(data, "Subcommands are self, list, add, remove.") - return permdb = self.config.irc["permissions"] - if data.args[0] == "self": + if not data.args or data.args[0] == "self": self.do_self(data, permdb) elif data.args[0] == "list": self.do_list(data, permdb) @@ -42,9 +39,11 @@ class Access(Command): self.do_add(data, permdb) elif data.args[0] == "remove": self.do_remove(data, permdb) + elif data.args[0] == "help": + self.reply(data, "Subcommands are self, list, add, and remove.") else: - msg = "Unknown subcommand \x0303{0}\x0F.".format(data.args[0]) - self.reply(data, msg) + msg = "Unknown subcommand \x0303{0}\x0F. Subcommands are self, list, add, remove." + self.reply(data, msg.format(data.args[0])) def do_self(self, data, permdb): if permdb.is_owner(data):