From 74f761f39eb2ea1d640bdfa362321a18ce14782b Mon Sep 17 00:00:00 2001 From: Timo Smit Date: Sun, 12 Feb 2017 13:33:02 +0100 Subject: [PATCH] Added check to disable logging functionality --- luamods/wolfadmin/util/logs.lua | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/luamods/wolfadmin/util/logs.lua b/luamods/wolfadmin/util/logs.lua index ae727c5..8ff947c 100644 --- a/luamods/wolfadmin/util/logs.lua +++ b/luamods/wolfadmin/util/logs.lua @@ -17,12 +17,15 @@ local players = require (wolfa_getLuaPath()..".players.players") -local files = require (wolfa_getLuaPath()..".util.files") local settings = require (wolfa_getLuaPath()..".util.settings") local logs = {} function logs.writeChat(clientId, type, ...) + if settings.get("g_logChat") == "" then + return + end + local fileDescriptor, fileLength = et.trap_FS_FOpenFile(settings.get("g_logChat"), et.FS_APPEND) local logLine @@ -45,6 +48,10 @@ function logs.writeChat(clientId, type, ...) end function logs.writeAdmin(clientId, command, victimId, ...) + if settings.get("g_logAdmin") == "" then + return + end + local fileDescriptor, fileLength = et.trap_FS_FOpenFile(settings.get("g_logAdmin"), et.FS_APPEND) local logLine