Added missing checks for history saving

This commit is contained in:
Timo Smit 2019-01-17 16:56:02 +01:00
parent cd701f187b
commit 511b663f2a
2 changed files with 9 additions and 2 deletions

View File

@ -83,7 +83,10 @@ function commandMute(clientId, command, victim, ...)
end
mutes.add(cmdClient, clientId, players.MUTE_CHAT + players.MUTE_VOICE, duration, reason)
if settings.get("g_playerHistory") ~= 0 then
history.add(cmdClient, clientId, "mute", reason)
end
et.trap_SendConsoleCommand(et.EXEC_APPEND, "cchat -1 \"^dmute: ^7"..et.gentity_get(cmdClient, "pers.netname").." ^9has been muted for "..duration.." seconds\";")

View File

@ -25,6 +25,7 @@ local commands = wolfa_requireModule("commands.commands")
local players = wolfa_requireModule("players.players")
local util = wolfa_requireModule("util.util")
local settings = wolfa_requireModule("util.settings")
function commandVoiceMute(clientId, command, victim, ...)
local cmdClient
@ -82,7 +83,10 @@ function commandVoiceMute(clientId, command, victim, ...)
end
mutes.add(cmdClient, clientId, players.MUTE_VOICE, duration, reason)
if settings.get("g_playerHistory") ~= 0 then
history.add(cmdClient, clientId, "vmute", reason)
end
et.trap_SendConsoleCommand(et.EXEC_APPEND, "cchat -1 \"^dvmute: ^7"..et.gentity_get(cmdClient, "pers.netname").." ^9has been voicemuted for "..duration.." seconds\";")