AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Trash (https://forums.alliedmods.net/forumdisplay.php?f=22)
-   -   Trying to block server command... (https://forums.alliedmods.net/showthread.php?t=296437)

lowheartrate 04-20-2017 20:00

Trying to block server command...
 
I am using the scripting reference here as I am very new to coding sourcemod plugins. What I am trying to do is block players from using sm plugins in the server so they don't know what plugins are being used in the server but when I put the plugin in the server I can still access the command just fine.
Code:

#include <sourcemod>

public void OnPluginStart()
{
        RegServerCmd("sm plugins", Command_Sm_Plugins);
}

public Action Command_Sm_Plugins(int args)
{
        return Plugin_Handled;
}


Chaosxk 04-20-2017 20:43

Re: Trying to block server command...
 
We're not allowed to hook onto "sm".

https://github.com/alliedmodders/sou...sole.cpp#L1215

Probably to prevent servers from blocking public information.

nosoop 04-20-2017 20:45

Re: Trying to block server command...
 
Quote:

Originally Posted by asherkin (Post 2108728)
That information being public is intentional, and not configurable.

Quote:

Originally Posted by BAILOPAN (Post 935216)
SourceMod gets first-chance for internal commands so that code won't work.

I think players have a right to know how a server differs from a stock server. "meta list" and "sm plugins" won't go away.

You are free to compile your own builds of SourceMod with the listing functionality removed (see other posts in the discussions quoted and above post).
Other than that, I don't think you'll find any good help on this.


All times are GMT -4. The time now is 10:55.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.