diff options
| author | Joe Ludwig <[email protected]> | 2013-09-02 11:39:10 -0700 |
|---|---|---|
| committer | Joe Ludwig <[email protected]> | 2013-09-02 11:39:10 -0700 |
| commit | a0c29e7dd67abb15c74c85f07741784877edfdcd (patch) | |
| tree | 35bd6b4580afa14648895b0f321d33a712a5d0fa /sp/src/game/server/client.cpp | |
| parent | Added bloom shader and screenspace effect helpers as examples for the SDK. (diff) | |
| download | source-sdk-2013-a0c29e7dd67abb15c74c85f07741784877edfdcd.tar.xz source-sdk-2013-a0c29e7dd67abb15c74c85f07741784877edfdcd.zip | |
General:
* Fixed a variety of server browser issues with mods based on this SDK
* Fixed many warnings on various platforms
* Added source code for fgdlib and raytrace
* Updated many source files with the latest shared source from TF2.
OSX:
* Added support for Xcode 4.6
* Switched OSX builds to use Xcode instead of makefiles
* Moved libs from src/lib/osx32 to src/lib/public/osx32 or src/lib/common/osx32 to match windows better.
Linux:
* Moved libs from src/lib/linux32 to src/lib/public/linux32 or src/lib/common/linux32 to match windows better.
Diffstat (limited to 'sp/src/game/server/client.cpp')
| -rw-r--r-- | sp/src/game/server/client.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/sp/src/game/server/client.cpp b/sp/src/game/server/client.cpp index 2fd87cfe..39905046 100644 --- a/sp/src/game/server/client.cpp +++ b/sp/src/game/server/client.cpp @@ -798,6 +798,24 @@ CON_COMMAND( give, "Give item to player.\n\tArguments: <item_name>" ) Q_strncpy( item_to_give, args[1], sizeof( item_to_give ) );
Q_strlower( item_to_give );
+ // Don't allow regular users to create point_servercommand entities for the same reason as blocking ent_fire
+ if ( !Q_stricmp( item_to_give, "point_servercommand" ) )
+ {
+ if ( engine->IsDedicatedServer() )
+ {
+ // We allow people with disabled autokick to do it, because they already have rcon.
+ if ( pPlayer->IsAutoKickDisabled() == false )
+ return;
+ }
+ else if ( gpGlobals->maxClients > 1 )
+ {
+ // On listen servers with more than 1 player, only allow the host to create point_servercommand.
+ CBasePlayer *pHostPlayer = UTIL_GetListenServerHost();
+ if ( pPlayer != pHostPlayer )
+ return;
+ }
+ }
+
// Dirty hack to avoid suit playing it's pickup sound
if ( !Q_stricmp( item_to_give, "item_suit" ) )
{
|