Skip to content

Commit 15549ab

Browse files
committed
modules/nickserv/ns_drop: Staff accounts cannot be dropped
1 parent 1ba2894 commit 15549ab

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

modules/nickserv/ns_drop.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,18 @@ class CommandNSDrop final
6666
return;
6767
}
6868

69+
// PREVENT users with NOEXPIRE from dropping their accounts -siniStar
70+
if (na->HasExt("NS_NO_EXPIRE") && !is_mine)
71+
{
72+
source.Reply(_("\002%s\002 cannot be dropped. For more information, see IRC4Fun Staff."), na->nick.c_str());
73+
return;
74+
}
75+
if (na->HasExt("NS_NO_EXPIRE") && is_mine)
76+
{
77+
source.Reply(_("\002%s\002 cannot be dropped. You will need a Services Root to drop your account for you."), na->nick.c_str());
78+
return;
79+
}
80+
6981
auto *code = dropcode.Get(na);
7082
if (params.size() < 2 || ((!code || !code->equals_ci(params[1])) && (!source.HasPriv("nickserv/drop/override") || params[1] != "OVERRIDE")))
7183
{

0 commit comments

Comments
 (0)