summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/game/g_admin.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/game/g_admin.c b/src/game/g_admin.c
index 93c1d54..cb42e31 100644
--- a/src/game/g_admin.c
+++ b/src/game/g_admin.c
@@ -10620,8 +10620,11 @@ 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!curse: ^7reset by %s\n",
- ent ? G_admin_adminPrintName(ent) : "console");
+ if (ent) {
+ G_AdminsPrintf("^3!curse: ^7reset by %s\n",
+ G_admin_adminPrintName(ent));
+ }
+
return qtrue;
}
@@ -10676,7 +10679,7 @@ qboolean G_admin_curse(gentity_t *ent, int skiparg)
return qfalse;
}
- if (g_cheats.integer)
+ if (g_cheats.integer || !ent)
goto skip_protection;
if (G_admin_permission(target, ADMF_IMMUTABLE) ||
@@ -10715,9 +10718,12 @@ skip_protection:
return qfalse;
}
- G_AdminsPrintf("^3!curse: ^7%s^7 cursed %s^7 with %s = %f\n",
- ent ? G_admin_adminPrintName(ent) : "console",
- target->client->pers.netname, arg_option, value);
+ if (ent) {
+ G_AdminsPrintf("^3!curse: ^7%s^7 cursed %s^7 with %s = %f\n",
+ G_admin_adminPrintName(ent),
+ target->client->pers.netname, arg_option, value);
+ }
+
return qtrue;
}