Added missing checks for history saving
This commit is contained in:
parent
cd701f187b
commit
511b663f2a
|
@ -83,7 +83,10 @@ function commandMute(clientId, command, victim, ...)
|
||||||
end
|
end
|
||||||
|
|
||||||
mutes.add(cmdClient, clientId, players.MUTE_CHAT + players.MUTE_VOICE, duration, reason)
|
mutes.add(cmdClient, clientId, players.MUTE_CHAT + players.MUTE_VOICE, duration, reason)
|
||||||
history.add(cmdClient, clientId, "mute", 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\";")
|
et.trap_SendConsoleCommand(et.EXEC_APPEND, "cchat -1 \"^dmute: ^7"..et.gentity_get(cmdClient, "pers.netname").." ^9has been muted for "..duration.." seconds\";")
|
||||||
|
|
||||||
|
|
|
@ -25,6 +25,7 @@ local commands = wolfa_requireModule("commands.commands")
|
||||||
local players = wolfa_requireModule("players.players")
|
local players = wolfa_requireModule("players.players")
|
||||||
|
|
||||||
local util = wolfa_requireModule("util.util")
|
local util = wolfa_requireModule("util.util")
|
||||||
|
local settings = wolfa_requireModule("util.settings")
|
||||||
|
|
||||||
function commandVoiceMute(clientId, command, victim, ...)
|
function commandVoiceMute(clientId, command, victim, ...)
|
||||||
local cmdClient
|
local cmdClient
|
||||||
|
@ -82,7 +83,10 @@ function commandVoiceMute(clientId, command, victim, ...)
|
||||||
end
|
end
|
||||||
|
|
||||||
mutes.add(cmdClient, clientId, players.MUTE_VOICE, duration, reason)
|
mutes.add(cmdClient, clientId, players.MUTE_VOICE, duration, reason)
|
||||||
history.add(cmdClient, clientId, "vmute", 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\";")
|
et.trap_SendConsoleCommand(et.EXEC_APPEND, "cchat -1 \"^dvmute: ^7"..et.gentity_get(cmdClient, "pers.netname").." ^9has been voicemuted for "..duration.." seconds\";")
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue