From 069627b6207388f0a12c756b1efe8a1ad5fa9c60 Mon Sep 17 00:00:00 2001 From: Greyscale Date: Thu, 25 Jun 2009 23:00:57 -0700 Subject: [PATCH] Added logging for ZSpawn and ZTele Fixed minor translation typo. --- .../translations/zombiereloaded.phrases.txt | 10 +++++----- src/zr/log.h.inc | 4 +++- src/zr/log.inc | 16 ++++++++++++++++ src/zr/zspawn.inc | 3 +++ src/zr/ztele.inc | 3 +++ 5 files changed, 30 insertions(+), 6 deletions(-) diff --git a/cstrike/addons/sourcemod/translations/zombiereloaded.phrases.txt b/cstrike/addons/sourcemod/translations/zombiereloaded.phrases.txt index 7492692..1fdefd4 100644 --- a/cstrike/addons/sourcemod/translations/zombiereloaded.phrases.txt +++ b/cstrike/addons/sourcemod/translations/zombiereloaded.phrases.txt @@ -814,7 +814,7 @@ "en" "Zombie Management" } - "ZAdmin main force zspawn " + "ZAdmin main force zspawn" { "en" "Force ZSpawn" } @@ -913,13 +913,13 @@ "ZSpawn command force successful" { "#format" "{1:s}" - "en" "Player {1} was successfully ZSpawned." + "en" "Player {1} was successfully spawned." } "ZSpawn command force unsuccessful" { "#format" "{1:s}" - "en" "Player {1} couldn't be ZSpawned." + "en" "Player {1} couldn't be spawned." } // =========================== @@ -987,13 +987,13 @@ "ZTele command force successful" { "#format" "{1:s}" - "en" "Player {1} was successfully ZTele'd." + "en" "Player {1} was successfully teleported." } "ZTele command force unsuccessful" { "#format" "{1:s}" - "en" "Player {1} couldn't be ZTele'd." + "en" "Player {1} couldn't be teleported." } // =========================== diff --git a/src/zr/log.h.inc b/src/zr/log.h.inc index c363d11..b6ce517 100644 --- a/src/zr/log.h.inc +++ b/src/zr/log.h.inc @@ -84,7 +84,9 @@ enum LogModules bool:LogModule_Tools, bool:LogModule_Volfeatures, bool:LogModule_Weapons, - bool:LogModule_Weaponrestrict + bool:LogModule_Weaponrestrict, + bool:LogModule_ZSpawn, + bool:LogModule_ZTele, } /** diff --git a/src/zr/log.inc b/src/zr/log.inc index a473908..8ab6d71 100644 --- a/src/zr/log.inc +++ b/src/zr/log.inc @@ -119,6 +119,14 @@ LogGetModuleNameString(String:buffer[], maxlen, LogModules:module, bool:shortNam { return shortName ? strcopy(buffer, maxlen, "weaponrestrict") : strcopy(buffer, maxlen, "Weapon Restrictions"); } + case LogModule_ZSpawn: + { + return shortName ? strcopy(buffer, maxlen, "zspawn") : strcopy(buffer, maxlen, "ZSpawn"); + } + case LogModule_ZTele: + { + return shortName ? strcopy(buffer, maxlen, "ztele") : strcopy(buffer, maxlen, "ZTele"); + } } // Module mismatch. @@ -198,6 +206,14 @@ LogModules:LogGetModule(const String:moduleName[]) { return LogModule_Weaponrestrict; } + else if (StrEqual(moduleName, "zspawn", false)) + { + return LogModule_ZSpawn; + } + else if (StrEqual(moduleName, "ztele", false)) + { + return LogModule_ZTele; + } // No match. return LogModule_Invalid; diff --git a/src/zr/zspawn.inc b/src/zr/zspawn.inc index bb51ef8..ab6e2a2 100644 --- a/src/zr/zspawn.inc +++ b/src/zr/zspawn.inc @@ -398,6 +398,9 @@ public Action:ZSpawnForceCommand(client, argc) } } + // Log action to game events. + LogEvent(false, LogType_Normal, LOG_GAME_EVENTS, LogModule_ZSpawn, "Force ZSpawn", "Admin \"%L\" forced player(s) to spawn. (zr_zspawn_force)", client); + return Plugin_Handled; } diff --git a/src/zr/ztele.inc b/src/zr/ztele.inc index af9b7dd..d2362c0 100644 --- a/src/zr/ztele.inc +++ b/src/zr/ztele.inc @@ -342,6 +342,9 @@ public Action:ZTeleForceCommand(client, argc) } } + // Log action to game events. + LogEvent(false, LogType_Normal, LOG_GAME_EVENTS, LogModule_ZTele, "Force ZTele", "Admin \"%L\" forced player(s) to teleport to spawn. (zr_ztele_force)", client); + return Plugin_Handled; }