From e41ba05c0a9002b30e9e2475f56fd207e856a9f8 Mon Sep 17 00:00:00 2001 From: Dennis Kaarsemaker Date: Mon, 22 Feb 2016 22:26:15 +0100 Subject: Allow individual settings to be locked down This allows a site admin who pregenerates configs to mark certain settings as untouchable, ensuring that users cannot mess up their settings too badly. --- root_commands.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'root_commands.c') diff --git a/root_commands.c b/root_commands.c index f9c6e8e9..80873c79 100644 --- a/root_commands.c +++ b/root_commands.c @@ -339,6 +339,10 @@ static int cmd_set_real(irc_t *irc, char **cmd, set_t **head, cmd_set_checkflags set_t *s = set_find(head, set_name); int st; + if (s && s->flags & SET_LOCKED) { + irc_rootmsg(irc, "This setting can not be changed"); + return 0; + } if (s && checkflags && checkflags(irc, s) == 0) { return 0; } -- cgit v1.2.3