diff --git a/luascripts/wolfadmin/commands/admin/ban.lua b/luascripts/wolfadmin/commands/admin/ban.lua index 2723fd8..1a397cd 100644 --- a/luascripts/wolfadmin/commands/admin/ban.lua +++ b/luascripts/wolfadmin/commands/admin/ban.lua @@ -78,18 +78,20 @@ function commandBan(clientId, command, victim, ...) return true end - bans.add(cmdClient, clientId, duration, reason) - if settings.get("g_playerHistory") ~= 0 then history.add(cmdClient, clientId, "ban", reason) end + local durationText = "permanently" + if duration then - et.trap_SendConsoleCommand(et.EXEC_APPEND, "cchat -1 \"^dban: ^7"..et.gentity_get(cmdClient, "pers.netname").." ^9has been banned for "..duration.." seconds\";") - else - et.trap_SendConsoleCommand(et.EXEC_APPEND, "cchat -1 \"^dban: ^7"..et.gentity_get(cmdClient, "pers.netname").." ^9has been banned permanently\";") + durationText = "for "..duration.." seconds" end + et.trap_SendConsoleCommand(et.EXEC_APPEND, "cchat -1 \"^dban: ^7"..et.gentity_get(cmdClient, "pers.netname").." ^9has been banned "..durationText.."\";") + + bans.add(cmdClient, clientId, duration, reason) + return true end commands.addadmin("ban", commandBan, auth.PERM_BAN, "ban a player with an optional duration and reason", "^9[^3name|slot#^9] ^9(^3duration^9) ^9(^3reason^9)", nil, (settings.get("g_standalone") == 0)) diff --git a/luascripts/wolfadmin/commands/admin/kick.lua b/luascripts/wolfadmin/commands/admin/kick.lua index 94a3736..3418bca 100644 --- a/luascripts/wolfadmin/commands/admin/kick.lua +++ b/luascripts/wolfadmin/commands/admin/kick.lua @@ -70,12 +70,14 @@ function commandKick(clientId, command, victim, ...) return true end - admin.kickPlayer(cmdClient, clientId, reason) - if settings.get("g_playerHistory") ~= 0 then history.add(cmdClient, clientId, "kick", reason) end + et.trap_SendConsoleCommand(et.EXEC_APPEND, "cchat -1 \"^dkick: ^7"..et.gentity_get(cmdClient, "pers.netname").." ^9has been kicked\";") + + admin.kickPlayer(cmdClient, clientId, reason) + return true end commands.addadmin("kick", commandKick, auth.PERM_KICK, "kick a player with an optional reason", "^9[^3name|slot#^9] ^9(^3reason^9)", nil, (settings.get("g_standalone") == 0))