Ulysses
Ulysses Stuff => General Chat & Help and Support => Topic started by: blackfire88 on October 05, 2011, 07:56:30 PM
-
I've noticed some commands cannot be run on players, like gmod_cleanup, disconnect, and other things.
I looked in the module file and found nothing blocking those commands, yet other lua files can run them anyway.
-
What exactly are you asking?
ULX blocks no commands.
Gmod server code itself monitors for certain commands using RunConsoleCommand and doesn't allow them to run.
See list of blocked at bottom of page here -
G.RunConsoleCommand (http://wiki.garrysmod.com/favicon.ico) (http://wiki.garrysmod.com/?title=G.RunConsoleCommand)
Cexec uses runconsolecommand on the player, so, doesn't allow those commands.
What specific commands are you saying are allowed by lua, and what files are you mentioning.
-
gmod_cleanup and disconnect. Both of those work with other lua scripts, but when using !cexec it doesnt have any effect.
-
What other scripts?
-
Just any lua script. If i try to use !cexec to run "disconnect" on a player, it wont work. If I try to run disconnect on a player with another lua script, they will be disconnected.
This is the same for a few other commands. Such as: kill, disconnect, gmod_cleanup, and a few others.
-
Blackfire, mind posting a sample of said 'any lua script'?
We'd really like to see it.
It's possible we may actually learn something.
If not learn something, then be able to explain how it works.
-
Oops i just realised something. Could you move this post to the SVN forum.
-
Also here is an example:
for k,v in pairs(player.GetAll()) do
v:ConCommand("disconnect")
end
That will make everyone disconnect.
But typeing "!cexec * disconnect" will not work.
-
I'm not ignoring this! I just haven't had time to get around to it yet. I checked the code, and we're using the same function so there's really no reason why it would work in one script but not ours... at least if you chat execute the command. Using the command in console goes through an additional "garry-check", but chatted commands go directly to the server unmolested.
-
So is it fixed?
-
Garry's Mod blocks the following commands from being run on players.
"con_enable"
"sv_cheats",
"_restart",
"exec",
"condump",
"connect",
"bind",
"BindToggle",
"alias",
"ent_fire",
"ent_setname",
"sensitivity",
"name",
"r_aspect",
"quit",
"exit",
"lua_run",
"lua_run_cl",
"lua_open",
"lua_cookieclear",
"lua_showerrors_cl",
"lua_showerrors_sv",
"lua_openscript",
"lua_openscript_cl",
"lua_redownload",
"sent_reload",
"sent_reload_cl",
"swep_reload",
"swep_reload_cl",
"gamemode_reload",
"gamemode_reload_cl",
"con_logfile",
"clear",
"rcon_password",
"test_RandomChance",
"plugin_load",
So the answer to your question is, that it was never broken.