[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! |
All times are GMT -4. The time now is 23:31. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.