[EXTENSION][Any?] PointDetour
5 Attachment(s)
This would not have been possible at all without Dr!fter (Or Dr. !fter, as I'm sure no one calls him).
What is this? This is a simple detour of PointServerCommand::InsertCommand, which allows you to block, modify or listen to point_servercommand entities firing (and get the command they're running). Why would you write this? Well, I've been wanting to do this for a while for VIPMod (L. Duke used convars instead of the actual brush entities :(). But recently it was made clear to my community by a mapper that they're ultimately in control. How? Through the use of this one horrible entity called point_servercommand. With this, they can change your server rcon password, set a server password, change the map, change timeleft, do whatever they want. The same can be done with clients using point_clientcommand, and that's coming to this extension Soon™. Voogru warned people in the past about randomly running maps (or so I vaguely recall), but it still happens often so that's why this is here. What does this do? See What is this?. But if you're an end user, this allows for plugin developers to hook the firing of point_servercommand. THIS CRASHES MY WINDOWS SERVER. Welp, Sorry. Since Valve doesn't release Symbols for Windows, I can't ever support it. With this being said, thanks to Dr!fter, there's a THIS CRASHES MY LINUX SERVER :( Oh no! Tragic! Please post a stack trace in the thread. Special Thanks to: Drifter - Holding my hand through a lot of this. Psychonic - Suggesting a Hack, then providing a less hacky way :P Asherkin - I learned a lot from ZombieFix, which appears to be based off of SDKHooks. Sammy-ROCK! - Learned about Forwards from CSS Speed Mod. |
Re: [EXTENSION][Any?] PointDetour
Example:
PHP Code:
Quote:
|
Re: [EXTENSION][Any?] PointDetour
Nice job! I always thought these entities needed some kind of whitelist for their commands. This will do nicely.
Quote:
|
Re: [EXTENSION][Any?] PointDetour
Quote:
It's slow, and the ServerCommand native exists for that purpose. |
Re: [EXTENSION][Any?] PointDetour
Quote:
|
Re: [EXTENSION][Any?] PointDetour
I tested windows it works fine :). Only problem you should add the block to the include that forces the extension to load :P I had to create an autoload file or else it wouldnt load (You can look for this in dhooks include or sdkhooks include). But after it loaded it worked, and nice job!
Also, ventrilo used to call me "Doctor Fter" Until i added a phonetic :P Edit: as for the "ANY?" Im almost 100% positive that any orangebox-valve game yes. After that its very likely the others work too, but not as sure :P. I doubt that function changes much if at all between games. |
Re: [EXTENSION][Any?] PointDetour
I appreciate your job.
Thx! |
Re: [EXTENSION][Any?] PointDetour
Quote:
The include is going to change! Plugin_Stop = Don't fire. Plugin_Handled = Null the String, the output will still fire. Plugin_Changed <= Continue. Quote:
|
Re: [EXTENSION][Any?] PointDetour
Quote:
I would just make Continue fire else block. Since Nulling it wont make any difference since it would just pass an empty string to ServerCommand :P |
Re: [EXTENSION][Any?] PointDetour
Quote:
const it is! |
Re: [EXTENSION][Any?] PointDetour
Updated OP with a proper inc and changed back to const.
Return > Plugin_Continue to block the ServerCommand. Huge thanks again to Dr!fter for the Windows build! |
Re: [EXTENSION][Any?] PointDetour
This will definitely be useful at some point, thank you for this :bacon!:
Yours sincerely Impact |
Re: [EXTENSION][Any?] PointDetour
Out of curiousity, can multiple commands be executed from the same entity at the same time?
Example: Code:
point_servercommand -> say Enjoy the map!;say Haha;quit |
Re: [EXTENSION][Any?] PointDetour
Quote:
|
Re: [EXTENSION][Any?] PointDetour
Quote:
Quote:
|
Re: [EXTENSION][Any?] PointDetour
Quote:
Quote:
|
Re: [EXTENSION][Any?] PointDetour
Unable to load extension "PointDetour" what's wrong?
|
Re: [EXTENSION][Any?] PointDetour
Quote:
|
Re: [EXTENSION][Any?] PointDetour
Unfortunately this extension requires a specific Windows sig for every game. Would you be willing to take a different approach to achieve the same thing?
This method borrows gamedata from SDK Tools to hook AcceptInput for every point_*command entity that gets created: http://pastebin.com/JWUAYWmh I'm not sure yet if it'll require separate engine builds, but you wouldn't have to do much updating (if any) after the first release. |
Re: [EXTENSION][Any?] PointDetour
Quote:
|
Re: [EXTENSION][Any?] PointDetour
I needed this one for a short test. The windows signatures are outdated. at least in css.
Code:
"Games" |
Re: [EXTENSION][Any?] PointDetour
Y u not use global filter in stripper source and nuke all point servercommands?
I suppose they could always create one with an entity maker/template. Could filter that too. Honestly, it is stupid that valve refuses to make a startup switch or even a cvar to disable them. |
Re: [EXTENSION][Any?] PointDetour
Could anyone provide a updated signature for csgo?
|
Re: [EXTENSION][Any?] PointDetour
] sm_rcon sm exts list
[SM] Displaying 15 extensions: [01] Automatic Updater (1.6.3-dev+4588): Updates SourceMod gamedata files [02] Webternet (1.6.3-dev+4588): Extension for interacting with URLs [03] TF2Items (1.5.3): TF2 Item Modifier [04] TF2 Tools (1.6.3-dev+4588): TF2 extended functionality [05] BinTools (1.6.3-dev+4588): Low-level C/C++ Calling API [06] SDK Hooks (1.6.3-dev+4588): Source SDK Hooks [07] SDK Tools (1.6.3-dev+4588): Source SDK Tools [08] Regex (1.6.3-dev+4588): Provides regex natives for plugins [09] Socket (3.0.1): Socket extension for SourceMod [10] Top Menus (1.6.3-dev+4588): Creates sorted nested menus [11] Client Preferences (1.6.3-dev+4588): Saves client preference settings [12] MySQL-DBI (1.6.3-dev+4588): MySQL driver implementation for DBI [13] SteamTools (0.8.3): SteamWorks for SourceMod. [14] SQLite (1.6.3-dev+4588): SQLite Driver [15] <FAILED> file "PointDetour.ext.so": /lib/i386-linux-gnu/i686/cmov/libm.so.6: version `GLIBC_2.15' not found (required by bin/libvstdlib.so) :( Weird though.. I'm sure i have at least GLIBC_2.15 or higher, otherwise i couldn't run this server FIXED / SOLVED i copied a version of libm.so.6 that it would accept to the directory where srcds_* is located, then i hard restarted the server. |
Re: [EXTENSION][Any?] PointDetour
Quote:
|
Re: [EXTENSION][Any?] PointDetour
1 Attachment(s)
This extension crashes the server if point_servercommand is sent a Command with no parameter.
Edit: Added fixed version with compiled version for TF2 linux. |
Re: [EXTENSION][Any?] PointDetour
If someone decides to add support and recompile this extension for L4D2, here's the gamedata:
PHP Code:
|
All times are GMT -4. The time now is 00:12. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.