mirror of
https://github.com/etlegacy/wolfadmin.git
synced 2024-11-21 20:01:18 +00:00
Correctly enable commands on legacy
This commit is contained in:
parent
a253e00d15
commit
2bd45363e5
3 changed files with 6 additions and 5 deletions
|
@ -26,4 +26,4 @@ function commandShuffleSR(clientId, command)
|
||||||
|
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
commands.addadmin("shufflesr", commandShuffleSR, auth.PERM_SHUFFLE, "shuffle the teams by Skill Rating to try and even them", nil, nil, (settings.get("fs_game") == "legacy"))
|
commands.addadmin("shufflesr", commandShuffleSR, auth.PERM_SHUFFLE, "shuffle the teams by Skill Rating to try and even them", nil, nil, (settings.get("fs_game") ~= "legacy"))
|
||||||
|
|
|
@ -91,5 +91,5 @@ function commandPersonalMessage(clientId, command, target, ...)
|
||||||
|
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
commands.addclient("pm", commandPersonalMessage, "", "[^2name^7|^2slot#^7] [^2message^7]", true, (settings.get("fs_game") == "legacy"))
|
commands.addclient("pm", commandPersonalMessage, "", "[^2name^7|^2slot#^7] [^2message^7]", true, (settings.get("fs_game") ~= "legacy"))
|
||||||
commands.addclient("m", commandPersonalMessage, "", "[^2name^7|^2slot#^7] [^2message^7]", true, (settings.get("fs_game") == "legacy"))
|
commands.addclient("m", commandPersonalMessage, "", "[^2name^7|^2slot#^7] [^2message^7]", true, (settings.get("fs_game") ~= "legacy"))
|
||||||
|
|
|
@ -19,11 +19,12 @@ local commands = wolfa_requireModule("commands.commands")
|
||||||
|
|
||||||
local util = wolfa_requireModule("util.util")
|
local util = wolfa_requireModule("util.util")
|
||||||
|
|
||||||
function commandClientCPM(command, clientId, text)
|
function commandClientCPM(command, clientId, text, type)
|
||||||
local clientId = tonumber(clientId)
|
local clientId = tonumber(clientId)
|
||||||
|
local type = tonumber(type) and tonumber(type) or 4
|
||||||
|
|
||||||
if clientId and clientId ~= -1337 then -- -1337 because -1 is a magic number/broadcasted to all clients
|
if clientId and clientId ~= -1337 then -- -1337 because -1 is a magic number/broadcasted to all clients
|
||||||
et.trap_SendServerCommand(clientId, "cpm \""..text.."\";")
|
et.trap_SendServerCommand(clientId, "cpm \""..text.."\" "..type..";")
|
||||||
elseif clientId then
|
elseif clientId then
|
||||||
et.G_Print(util.removeColors(text).."\n")
|
et.G_Print(util.removeColors(text).."\n")
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue