aboutsummaryrefslogtreecommitdiffstats
path: root/root_commands.c
diff options
context:
space:
mode:
authorDennis Kaarsemaker <dennis@kaarsemaker.net>2016-02-22 21:25:39 +0100
committerDennis Kaarsemaker <dennis@kaarsemaker.net>2016-03-23 07:44:13 +0100
commit446a23ea39184c5fe43cd40706bb683b89534e2e (patch)
treec2a3933f4f962071174225c3bb86b3884927fd15 /root_commands.c
parente41ba05c0a9002b30e9e2475f56fd207e856a9f8 (diff)
Add a setting to disable 'account add'
In a locked down bitlbee instance it is useful to disable the 'account add' command.
Diffstat (limited to 'root_commands.c')
-rw-r--r--root_commands.c5
1 files changed, 5 insertions, 0 deletions
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) {