summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/game/g_admin.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/game/g_admin.c b/src/game/g_admin.c
index b696cc9..ecb53cd 100644
--- a/src/game/g_admin.c
+++ b/src/game/g_admin.c
@@ -10547,7 +10547,7 @@ qboolean G_admin_curse(gentity_t *ent, int skiparg)
adminCurses_t *curses;
if (G_SayArgc() < 2 + skiparg) {
- ADMP("^3!curse: ^7usage: !curse [target] ([option] [value])\n");
+ ADMP("^3!curse: ^7usage: !curse [target] ([option] [value]) or !curse -reset\n");
return qfalse;
}
@@ -10557,7 +10557,7 @@ qboolean G_admin_curse(gentity_t *ent, int skiparg)
for (i = 0; i < level.maxclients; i++)
memset(&level.clients[i].curses, 0, sizeof(adminCurses_t));
- G_AdminsPrintf("^3!curses: ^7reset by %s\n",
+ G_AdminsPrintf("^3!curse: ^7reset by %s\n",
ent ? G_admin_adminPrintName(ent) : "console");
return qtrue;
}
@@ -10611,7 +10611,18 @@ qboolean G_admin_curse(gentity_t *ent, int skiparg)
return qfalse;
}
- if (!admin_higher(ent, target)) {
+ if (g_cheats.integer)
+ goto skip_protection;
+
+ if (G_admin_permission(target, ADMF_IMMUTABLE) ||
+ (g_adminCurses.integer < 2 &&
+ G_admin_permission(target, ADMF_IMMUNITY))) {
+ ADMP("^3!curse: ^7the player is protected by the Pope\n");
+ return qfalse;
+ }
+
+skip_protection:
+ if (ent != target && !admin_higher(ent, target)) {
ADMP("^3!curse: ^7sorry, but your intended victim has a higher admin level than you\n");
return qfalse;
}