From aa8fb99e32987c4da8871607fa94d70577c39495 Mon Sep 17 00:00:00 2001 From: William Heimbigner Date: Wed, 13 Jan 2016 21:55:24 -0700 Subject: Prevent changing/deleting flags of users with d --- config-default/commands.xml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/config-default/commands.xml b/config-default/commands.xml index 527e1c1..26d34a3 100644 --- a/config-default/commands.xml +++ b/config-default/commands.xml @@ -377,6 +377,11 @@ $conn->privmsg($event->replyto, "I'm assuming you mean " . $nick . "'s nickserv account, " . lc $::sn{$nick}->{account} . '.'); $nick = lc $::sn{$nick}->{account}; } + if (defined($::users->{person}->{$nick}) && + defined($::users->{person}->{$nick}->{flags}) && + ($::users->{person}->{$nick}->{flags} =~ /d/)) { + return $conn->privmsg($event->replyto, "Users with the 'd' flag are untouchable. Edit the config file manually."); + } if ($flags !~ /s/i) { use Apache::Htpasswd; use Apache::Htgroup; my $o_Htpasswd = new Apache::Htpasswd({passwdFile => $::settings->{web}->{userfile}, UseMD5 => 1}); @@ -393,6 +398,11 @@ {person}->{$nick}) && + defined($::users->{person}->{$nick}->{flags}) && + ($::users->{person}->{$nick}->{flags} =~ /d/)) { + return $conn->privmsg($event->replyto, "Users with the 'd' flag are untouchable. Edit the config file manually."); + } delete($::users->{person}->{$nick}); ASM::XML->writeUsers(); use Apache::Htpasswd; use Apache::Htgroup; -- cgit v1.2.3