View Single Post
Author Message
KyleS
SourceMod Plugin Approver
Join Date: Jul 2009
Location: Segmentation Fault.
Old 05-03-2012 , 01:11   [EXTENSION][Any?] PointDetour
Reply With Quote #1

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 untested Windows Build, and gamedata to go with it. If it works, great! I can't ever support this, though.

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

Asherkin - I learned a lot from ZombieFix, which appears to be based off of SDKHooks.
Sammy-ROCK! - Learned about Forwards from CSS Speed Mod.
Attached Files
File Type: txt PSCDetour.txt (447 Bytes, 505 views)
File Type: gz iscdetour1.0.1.tar.gz (64.5 KB, 581 views)
File Type: so PointDetour.ext.so (22.4 KB, 400 views)
File Type: dll PointDetour.ext.dll (70.0 KB, 427 views)
File Type: inc pscd.inc (2.2 KB, 435 views)

Last edited by KyleS; 05-03-2012 at 21:21. Reason: New build.
KyleS is offline