Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Disable autoteam command
Browse files Browse the repository at this point in the history
leighmacdonald committed Nov 18, 2023
1 parent e282629 commit 2a3e13d
Showing 3 changed files with 18 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sourcemod/scripting/gbans.sp
Original file line number Diff line number Diff line change
@@ -12,6 +12,7 @@
#include <system2> // system2 extension

#include "gbans/auth.sp"
#include "gbans/balance.sp"
#include "gbans/ban.sp"
#include "gbans/commands.sp"
#include "gbans/common.sp"
@@ -55,6 +56,7 @@ public void onPluginStartCore()
gServerKey = CreateConVar("gb_core_server_key", "", "GBans server key used to authenticate with the service");

gHideConnections = CreateConVar("gb_hide_connections", "1", "Dont show the disconnect message to users", _, true, 0.0, true, 1.0);
gDisableAutoTeam = CreateConVar("gb_disable_autoteam", "1", "Dont allow the use of autoteam command", _, true, 0.0, true, 1.0);

AutoExecConfig(true, "gbans");

@@ -63,6 +65,7 @@ public void onPluginStartCore()
RegConsoleCmd("gb_mod", onCmdMod, "Ping a moderator");
RegConsoleCmd("mod", onCmdMod, "Ping a moderator");
RegConsoleCmd("report", onCmdReport, "Report a player");
RegConsoleCmd("autoteam", onCmdAutoTeamAction, "Disabled");

RegAdminCmd("gb_ban", onAdminCmdBan, ADMFLAG_BAN);
RegAdminCmd("gb_reauth", onAdminCmdReauth, ADMFLAG_ROOT);
12 changes: 12 additions & 0 deletions sourcemod/scripting/gbans/balance.sp
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#pragma semicolon 1
#pragma tabsize 4
#pragma newdecls required

public Action onCmdAutoTeamAction(int clientId, int argc)
{
if (gDisableAutoTeam.BoolValue) {
return Plugin_Handled;
}

return Plugin_Continue;
}
3 changes: 3 additions & 0 deletions sourcemod/scripting/gbans/globals.sp
Original file line number Diff line number Diff line change
@@ -40,6 +40,9 @@ ConVar gHost = null;
ConVar gServerName = null;
ConVar gServerKey = null;

// Balancing options
ConVar gDisableAutoTeam = null;

// STV options
ConVar gTvEnabled = null;
ConVar gAutoRecord = null;

0 comments on commit 2a3e13d

Please sign in to comment.