Raised This Month: $51 Target: $400
 12% 

Trying to block server command...


Post New Thread Closed Thread   
 
Thread Tools Display Modes
Author Message
lowheartrate
Member
Join Date: Apr 2015
Location: United States, New York
Old 04-20-2017 , 20:00   Trying to block server command...
#1

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;
}
__________________

Last edited by lowheartrate; 04-20-2017 at 22:35.
lowheartrate is offline
Chaosxk
Veteran Member
Join Date: Aug 2010
Location: Westeros
Old 04-20-2017 , 20:43   Re: Trying to block server command...
#2

We're not allowed to hook onto "sm".

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

Probably to prevent servers from blocking public information.
__________________
Chaosxk is offline
nosoop
Veteran Member
Join Date: Aug 2014
Old 04-20-2017 , 20:45   Re: Trying to block server command...
#3

Quote:
Originally Posted by asherkin View Post
That information being public is intentional, and not configurable.
Quote:
Originally Posted by BAILOPAN View Post
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.
__________________
I do TF2, TF2 servers, and TF2 plugins.
I don't do DMs over Discord -- PM me on the forums regarding inquiries.
AlliedModders Releases / Github / TF2 Server / Donate (BTC / BCH / coffee)

Last edited by nosoop; 04-20-2017 at 20:46.
nosoop is offline
Closed Thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 16:46.


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