Skip to content

Commit 649d1da

Browse files
committed
Revert "feat(API): Plugins status forwards & sbppchecker lib"
This reverts commit 4265c75.
1 parent 4265c75 commit 649d1da

File tree

6 files changed

+20
-183
lines changed

6 files changed

+20
-183
lines changed

game/addons/sourcemod/scripting/include/sourcebanschecker.inc

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,6 @@
2929
#endif
3030
#define _sourcebanschecker_included
3131

32-
#define SBPPChecker_V_MAJOR 1
33-
#define SBPPChecker_V_MINOR 8
34-
#define SBPPChecker_V_PATCH 4
35-
36-
#define SBPPChecker_VERSION "1.8.4"
37-
3832
public SharedPlugin __pl_sourcebanschecker =
3933
{
4034
name = "sourcebans++",
@@ -89,18 +83,3 @@ native int SBPP_CheckerGetClientsMutes(int iClient);
8983
* @return The number of gags of the client.
9084
*********************************************************/
9185
native int SBPP_CheckerGetClientsGags(int iClient);
92-
93-
/*********************************************************
94-
* Called when the plugin becomes available.
95-
*
96-
* @noreturn
97-
*********************************************************/
98-
forward void SBPPChecker_OnPluginOK();
99-
100-
/*********************************************************
101-
* Called when the plugin becomes unavailable.
102-
* This can happen when the plugin is paused or unloaded.
103-
*
104-
* @noreturn
105-
*********************************************************/
106-
forward void SBPPChecker_OnPluginNotOK();

game/addons/sourcemod/scripting/include/sourcebanspp.inc

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,6 @@
2929
#endif
3030
#define _sourcebanspp_included
3131

32-
#define SB_VERSION_MAJOR 1
33-
#define SB_VERSION_MINOR 8
34-
#define SB_VERSION_PATCH 3
35-
36-
#define SB_VERSION "1.8.3"
37-
3832
public SharedPlugin __pl_sourcebanspp =
3933
{
4034
name = "sourcebans++",
@@ -89,21 +83,6 @@ native void SBPP_BanPlayer(int iAdmin, int iTarget, int iTime, const char[] sRea
8983
*********************************************************/
9084
native void SBPP_ReportPlayer(int iReporter, int iTarget, const char[] sReason);
9185

92-
/*********************************************************
93-
* Called when the plugin becomes available.
94-
*
95-
* @noreturn
96-
*********************************************************/
97-
forward void SBPP_OnPluginOK();
98-
99-
/*********************************************************
100-
* Called when the plugin becomes unavailable.
101-
* This can happen when the plugin is paused or unloaded.
102-
*
103-
* @noreturn
104-
*********************************************************/
105-
forward void SBPP_OnPluginNotOK();
106-
10786
/*********************************************************
10887
* Called when the admin banning the player.
10988
*

game/addons/sourcemod/scripting/include/sourcecomms.inc

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,6 @@
2929
#endif
3030
#define _sourcecomms_included
3131

32-
#define SBPPComms_VERSION_MAJOR 1
33-
#define SBPPComms_VERSION_MINOR 8
34-
#define SBPPComms_VERSION_PATCH 2
35-
36-
#define SBPPComms_VERSION "1.8.2"
37-
3832
/**
3933
* @section Int definitions for punishments types.
4034
*/
@@ -102,21 +96,6 @@ native bType SourceComms_GetClientMuteType(int client);
10296
*/
10397
native bType SourceComms_GetClientGagType(int client);
10498

105-
/**
106-
* Called when the plugin becomes available.
107-
*
108-
* @noreturn
109-
*/
110-
forward void SourceComms_OnPluginOK();
111-
112-
/**
113-
* Called when the plugin becomes unavailable.
114-
* This can happen when the plugin is paused or unloaded.
115-
*
116-
* @noreturn
117-
*/
118-
forward void SourceComms_OnPluginNotOK();
119-
12099
/**
121100
* Called when added communication block for player.
122101
*
@@ -155,4 +134,5 @@ public void __pl_sourcecomms_SetNTVOptional()
155134
MarkNativeAsOptional("SourceComms_SetClientGag");
156135
MarkNativeAsOptional("SourceComms_GetClientMuteType");
157136
MarkNativeAsOptional("SourceComms_GetClientGagType");
137+
158138
}

game/addons/sourcemod/scripting/sbpp_checker.sp

Lines changed: 4 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@
2828
#pragma newdecls required
2929

3030
#include <sourcemod>
31-
#include <sourcebanschecker>
3231

32+
#define VERSION "1.8.3"
3333
#define LISTBANS_USAGE "sm_listbans <#userid|name> - Lists a user's prior bans from Sourcebans"
3434
#define LISTCOMMS_USAGE "sm_listcomms <#userid|name> - Lists a user's prior comms from Sourcebans"
3535
#define INVALID_TARGET -1
@@ -47,15 +47,12 @@ int g_iBanCounts[MAXPLAYERS + 1];
4747
int g_iMuteCounts[MAXPLAYERS + 1];
4848
int g_iGagCounts[MAXPLAYERS + 1];
4949

50-
GlobalForward g_hFwd_StatusOK;
51-
GlobalForward g_hFwd_StatusNotOK;
52-
5350
public Plugin myinfo =
5451
{
5552
name = "SourceBans++: Bans Checker",
5653
author = "psychonic, Ca$h Munny, SourceBans++ Dev Team",
5754
description = "Notifies admins of prior bans from Sourcebans upon player connect.",
58-
version = SBPPChecker_VERSION,
55+
version = VERSION,
5956
url = "https://sbpp.github.io"
6057
};
6158

@@ -64,7 +61,7 @@ public void OnPluginStart()
6461
LoadTranslations("common.phrases");
6562
LoadTranslations("sbpp_checker.phrases");
6663

67-
CreateConVar("sbchecker_version", SBPPChecker_VERSION, "", FCVAR_NOTIFY);
64+
CreateConVar("sbchecker_version", VERSION, "", FCVAR_NOTIFY);
6865
RegAdminCmd("sm_listbans", OnListSourceBansCmd, ADMFLAG_GENERIC, LISTBANS_USAGE);
6966
RegAdminCmd("sm_listcomms", OnListSourceCommsCmd, ADMFLAG_GENERIC, LISTCOMMS_USAGE);
7067
RegAdminCmd("sb_reload", OnReloadCmd, ADMFLAG_RCON, "Reload sourcebans config and ban reason menu options");
@@ -77,24 +74,6 @@ public void OnPluginStart()
7774
}
7875
}
7976

80-
public void OnAllPluginsLoaded()
81-
{
82-
SendForward_Available();
83-
}
84-
85-
public void OnPluginPauseChange(bool pause)
86-
{
87-
if (pause)
88-
SendForward_NotAvailable();
89-
else
90-
SendForward_Available();
91-
}
92-
93-
public void OnPluginEnd()
94-
{
95-
SendForward_NotAvailable();
96-
}
97-
9877
public void OnMapStart()
9978
{
10079
ReadConfig();
@@ -116,16 +95,13 @@ public void OnDatabaseConnected(Database db, const char[] error, any data)
11695

11796
public APLRes AskPluginLoad2(Handle myself, bool late, char[] error, int err_max)
11897
{
119-
RegPluginLibrary("sourcechecker++");
98+
RegPluginLibrary("sourcebans++");
12099

121100
CreateNative("SBPP_CheckerGetClientsBans", Native_SBCheckerGetClientsBans);
122101
CreateNative("SBPP_CheckerGetClientsComms", Native_SBCheckerGetClientsComms);
123102
CreateNative("SBPP_CheckerGetClientsMutes", Native_SBCheckerGetClientsMutes);
124103
CreateNative("SBPP_CheckerGetClientsGags", Native_SBCheckerGetClientsGags);
125104

126-
g_hFwd_StatusOK = CreateGlobalForward("SBPPChecker_OnPluginOK", ET_Ignore);
127-
g_hFwd_StatusNotOK = CreateGlobalForward("SBPPChecker_OnPluginNotOK", ET_Ignore);
128-
129105
g_bLate = late;
130106

131107
return APLRes_Success;
@@ -679,16 +655,4 @@ stock void LateLoading()
679655
GetClientAuthId(i, AuthId_Steam2, sSteam32ID, sizeof(sSteam32ID));
680656
OnClientAuthorized(i, sSteam32ID);
681657
}
682-
}
683-
684-
stock void SendForward_Available()
685-
{
686-
Call_StartForward(g_hFwd_StatusOK);
687-
Call_Finish();
688-
}
689-
690-
stock void SendForward_NotAvailable()
691-
{
692-
Call_StartForward(g_hFwd_StatusNotOK);
693-
Call_Finish();
694658
}

game/addons/sourcemod/scripting/sbpp_comms.sp

Lines changed: 8 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
// Do not edit below this line //
4444
//-----------------------------//
4545

46+
#define PLUGIN_VERSION "1.8.1"
4647
#define PREFIX "\x04[SourceComms++]\x01 "
4748

4849
//GLOBAL DEFINES
@@ -133,12 +134,10 @@ int
133134

134135
SMCParser ConfigParser;
135136

136-
GlobalForward g_hFwd_StatusOK
137-
, g_hFwd_StatusNotOK
138-
, g_hFwd_OnPlayerPunished
139-
, g_hFwd_OnPlayerUnpunished;
140-
141-
Handle g_hGagExpireTimer[MAXPLAYERS + 1] = { null, ... }
137+
Handle
138+
g_hFwd_OnPlayerPunished
139+
, g_hFwd_OnPlayerUnpunished
140+
, g_hGagExpireTimer[MAXPLAYERS + 1] = { null, ... }
142141
, g_hMuteExpireTimer[MAXPLAYERS + 1] = { null, ... };
143142

144143
bType g_MuteType[MAXPLAYERS + 1];
@@ -171,7 +170,7 @@ public Plugin myinfo =
171170
name = "SourceBans++: SourceComms",
172171
author = "Alex, SourceBans++ Dev Team",
173172
description = "Advanced punishments management for the Source engine in SourceBans style",
174-
version = SBPPComms_VERSION,
173+
version = PLUGIN_VERSION,
175174
url = "https://sbpp.github.io"
176175
};
177176

@@ -184,9 +183,6 @@ public APLRes AskPluginLoad2(Handle myself, bool late, char[] error, int err_max
184183
CreateNative("SourceComms_GetClientMuteType", Native_GetClientMuteType);
185184
CreateNative("SourceComms_GetClientGagType", Native_GetClientGagType);
186185

187-
g_hFwd_StatusOK = CreateGlobalForward("SourceComms_OnPluginOK", ET_Ignore);
188-
g_hFwd_StatusNotOK = CreateGlobalForward("SourceComms_OnPluginNotOK", ET_Ignore);
189-
190186
g_hFwd_OnPlayerPunished = CreateGlobalForward("SourceComms_OnBlockAdded", ET_Ignore, Param_Cell, Param_Cell, Param_Cell, Param_Cell, Param_String);
191187
g_hFwd_OnPlayerUnpunished = CreateGlobalForward("SourceComms_OnBlockRemoved", ET_Ignore, Param_Cell, Param_Cell, Param_Cell, Param_String);
192188

@@ -207,7 +203,7 @@ public void OnPluginStart()
207203
CvarPort = FindConVar("hostport");
208204
g_hServersWhiteList = new ArrayList();
209205

210-
CreateConVar("sourcecomms_version", SBPPComms_VERSION, _, FCVAR_SPONLY | FCVAR_REPLICATED | FCVAR_NOTIFY);
206+
CreateConVar("sourcecomms_version", PLUGIN_VERSION, _, FCVAR_SPONLY | FCVAR_REPLICATED | FCVAR_NOTIFY);
211207
AddCommandListener(CommandCallback, "sm_gag");
212208
AddCommandListener(CommandCallback, "sm_mute");
213209
AddCommandListener(CommandCallback, "sm_silence");
@@ -226,7 +222,7 @@ public void OnPluginStart()
226222
#endif
227223

228224
#if defined DEBUG
229-
PrintToServer("Sourcecomms plugin loading. Version %s", SBPPComms_VERSION);
225+
PrintToServer("Sourcecomms plugin loading. Version %s", PLUGIN_VERSION);
230226
#endif
231227

232228
// Catch config error
@@ -252,24 +248,6 @@ public void OnPluginStart()
252248
g_bLate = false;
253249
}
254250

255-
public void OnAllPluginsLoaded()
256-
{
257-
SendForward_Available();
258-
}
259-
260-
public void OnPluginPauseChange(bool pause)
261-
{
262-
if (pause)
263-
SendForward_NotAvailable();
264-
else
265-
SendForward_Available();
266-
}
267-
268-
public void OnPluginEnd()
269-
{
270-
SendForward_NotAvailable();
271-
}
272-
273251
public void OnLibraryRemoved(const char[] name)
274252
{
275253
if (strcmp(name, "adminmenu", false) == 0)
@@ -3525,17 +3503,4 @@ public int Native_GetClientGagType(Handle hPlugin, int numParams)
35253503

35263504
return g_GagType[target];
35273505
}
3528-
3529-
stock void SendForward_Available()
3530-
{
3531-
Call_StartForward(g_hFwd_StatusOK);
3532-
Call_Finish();
3533-
}
3534-
3535-
stock void SendForward_NotAvailable()
3536-
{
3537-
Call_StartForward(g_hFwd_StatusNotOK);
3538-
Call_Finish();
3539-
}
3540-
35413506
//Yarr!

game/addons/sourcemod/scripting/sbpp_main.sp

Lines changed: 7 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@
3535

3636
#pragma newdecls required
3737

38+
#define SB_VERSION "1.8.2"
39+
3840
#if defined _updater_included
3941
#define UPDATE_URL "https://sbpp.github.io/updater/updatefile.txt"
4042
#endif
@@ -118,13 +120,11 @@ int
118120

119121
SMCParser ConfigParser;
120122

121-
GlobalForward g_hFwd_StatusOK
122-
, g_hFwd_StatusNotOK
123-
, g_hFwd_OnBanAdded
124-
, g_hFwd_OnReportAdded
125-
, g_hFwd_OnClientPreAdminCheck;
126-
127-
Handle PlayerRecheck[MAXPLAYERS + 1] = { INVALID_HANDLE, ... }; /* Timer handle */
123+
Handle
124+
g_hFwd_OnBanAdded
125+
, g_hFwd_OnReportAdded
126+
, g_hFwd_OnClientPreAdminCheck
127+
, PlayerRecheck[MAXPLAYERS + 1] = { INVALID_HANDLE, ... }; /* Timer handle */
128128

129129
DataPack PlayerDataPack[MAXPLAYERS + 1] = { null, ... };
130130

@@ -152,9 +152,6 @@ public APLRes AskPluginLoad2(Handle myself, bool late, char[] error, int err_max
152152
CreateNative("SBPP_BanPlayer", Native_SBBanPlayer);
153153
CreateNative("SBPP_ReportPlayer", Native_SBReportPlayer);
154154

155-
g_hFwd_StatusOK = CreateGlobalForward("SBPP_OnPluginOK", ET_Ignore);
156-
g_hFwd_StatusNotOK = CreateGlobalForward("SBPP_OnPluginNotOK", ET_Ignore);
157-
158155
g_hFwd_OnBanAdded = CreateGlobalForward("SBPP_OnBanPlayer", ET_Ignore, Param_Cell, Param_Cell, Param_Cell, Param_String);
159156
g_hFwd_OnReportAdded = CreateGlobalForward("SBPP_OnReportPlayer", ET_Ignore, Param_Cell, Param_Cell, Param_String);
160157
g_hFwd_OnClientPreAdminCheck = CreateGlobalForward("SBPP_OnClientPreAdminCheck", ET_Ignore, Param_Cell);
@@ -263,8 +260,6 @@ public void OnLibraryAdded(const char[] name)
263260

264261
public void OnAllPluginsLoaded()
265262
{
266-
SendForward_Available();
267-
268263
TopMenu topmenu;
269264
#if defined DEBUG
270265
LogToFile(logFile, "OnAllPluginsLoaded()");
@@ -276,19 +271,6 @@ public void OnAllPluginsLoaded()
276271
}
277272
}
278273

279-
public void OnPluginPauseChange(bool pause)
280-
{
281-
if (pause)
282-
SendForward_NotAvailable();
283-
else
284-
SendForward_Available();
285-
}
286-
287-
public void OnPluginEnd()
288-
{
289-
SendForward_NotAvailable();
290-
}
291-
292274
public void OnConfigsExecuted()
293275
{
294276
char filename[200];
@@ -2847,16 +2829,4 @@ stock void AccountForLateLoading()
28472829
}
28482830
}
28492831

2850-
stock void SendForward_Available()
2851-
{
2852-
Call_StartForward(g_hFwd_StatusOK);
2853-
Call_Finish();
2854-
}
2855-
2856-
stock void SendForward_NotAvailable()
2857-
{
2858-
Call_StartForward(g_hFwd_StatusNotOK);
2859-
Call_Finish();
2860-
}
2861-
28622832
//Yarr!

0 commit comments

Comments
 (0)