diff --git a/luascripts/wolfadmin/admin/censor.lua b/luascripts/wolfadmin/admin/censor.lua index 1e6e34e..7e762d1 100644 --- a/luascripts/wolfadmin/admin/censor.lua +++ b/luascripts/wolfadmin/admin/censor.lua @@ -112,6 +112,10 @@ function censor.clear() end function censor.onClientConnectAttempt(clientId, firstTime, isBot) + if auth.isPlayerAllowed(clientId, auth.PERM_NOCENSOR) then + return + end + local clientInfo = et.trap_GetUserinfo(clientId) local censored, censoredName = censor.filterName(et.Info_ValueForKey(clientInfo, "name")) @@ -130,6 +134,10 @@ function censor.onClientConnectAttempt(clientId, firstTime, isBot) end function censor.onClientNameChange(clientId, oldName, newName) + if auth.isPlayerAllowed(clientId, auth.PERM_NOCENSOR) then + return + end + local censored, censoredName = censor.filterName(newName) if censored then diff --git a/luascripts/wolfadmin/commands/client/say.lua b/luascripts/wolfadmin/commands/client/say.lua index 72e1ee4..c79763a 100644 --- a/luascripts/wolfadmin/commands/client/say.lua +++ b/luascripts/wolfadmin/commands/client/say.lua @@ -17,6 +17,8 @@ local censor = wolfa_requireModule("admin.censor") +local auth = wolfa_requireModule("auth.auth") + local commands = wolfa_requireModule("commands.commands") local players = wolfa_requireModule("players.players") @@ -42,14 +44,16 @@ function commandSay(clientId, command, ...) return true end - local censored, message = censor.filterMessage(...) + if not auth.isPlayerAllowed(clientId, auth.PERM_NOCENSOR) then + local censored, message = censor.filterMessage(...) - if censored and settings.get("g_censorMode") ~= 0 then - censor.punishClient(clientId) + if censored and settings.get("g_censorMode") ~= 0 then + censor.punishClient(clientId) - et.G_Say(clientId, util.getChatFromCommand(command), message) + et.G_Say(clientId, util.getChatFromCommand(command), message) - return true + return true + end end if settings.get("fs_game") == "legacy" then