'execClientCommand' script command
Known fact, you can send string from server to client to be executed as console command using setClientDvar, openMenuNoMouse (openMenu), dvar and custom menu. But you have to add this custom menu to mod before use. So I think it'll be good to have such functionality without involving menu stuff.
Pros:
- Can be used on servers without mods;
- No hud flickering when using (for example, LMB -> "+melee").
Cons:
- Must hook message dispatcher on client to parse custom command (like it made with "disconnect", "statusResponse" etc.);
- Input string must be parsed on client to remove any harmful commands.
I can handle server part but not client. So if anybody is interesed, I can make other branch in server for you to be able to test.
Up!
@callofduty4x/dev I have added branch "iss173". Any help with CL_ConnectionlessPacket on client appreciated.
About harmful commands, there are two ways: black/whitelist. I prefer blacklist because now modders can execute really anything.
as of now i can only think of "connect" and "bind" that needs to be blocked. what else could be harmful? i'm sure there is more .. opening it even through a blacklist seems dangerous to me currently.
vstr as it allows to execute any command as string:
self setClientDvar("execute", "connect my.shitty.server");
self execClientCommand("vstr execute");
yeah i'm aware that's possible. we certainly won't put that out in the wild.