From 446a23ea39184c5fe43cd40706bb683b89534e2e Mon Sep 17 00:00:00 2001 From: Dennis Kaarsemaker Date: Mon, 22 Feb 2016 21:25:39 +0100 Subject: Add a setting to disable 'account add' In a locked down bitlbee instance it is useful to disable the 'account add' command. --- root_commands.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'root_commands.c') diff --git a/root_commands.c b/root_commands.c index 80873c79..0f024345 100644 --- a/root_commands.c +++ b/root_commands.c @@ -416,6 +416,11 @@ static void cmd_account(irc_t *irc, char **cmd) MIN_ARGS(3); + if (!global.conf->allow_account_add) { + irc_rootmsg(irc, "This server does not allow adding new accounts"); + return; + } + if (cmd[4] == NULL) { for (a = irc->b->accounts; a; a = a->next) { if (strcmp(a->pass, PASSWORD_PENDING) == 0) { -- cgit v1.2.3