Skip to content

Commit 48897e4

Browse files
authored
fix(sbpp_comms): remove useless datapack (#1051)
1 parent a41ee7a commit 48897e4

File tree

2 files changed

+9
-14
lines changed

2 files changed

+9
-14
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131

3232
#define SBPPComms_VERSION_MAJOR "1"
3333
#define SBPPComms_VERSION_MINOR "8"
34-
#define SBPPComms_VERSION_PATCH "3"
34+
#define SBPPComms_VERSION_PATCH "4"
3535

3636
#define SBPPComms_VERSION SBPPComms_VERSION_MAJOR..."."...SBPPComms_VERSION_MINOR..."."...SBPPComms_VERSION_PATCH
3737

game/addons/sourcemod/scripting/sbpp_comms.sp

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ ConVar CvarPort;
9494
Database g_hDatabase;
9595
Database SQLiteDB;
9696

97-
char
97+
char
9898
ServerIp[24]
9999
, ServerPort[7]
100100
, DatabasePrefix[10] = "sb"
@@ -110,13 +110,13 @@ char
110110

111111
float RetryTime = 15.0;
112112

113-
bool
113+
bool
114114
g_bLate
115115
, g_bPlayerAuthentified[MAXPLAYERS + 1] // Bots and players with invalid Steam ID format will always be FALSE
116116
, g_bPlayerStatus[MAXPLAYERS + 1] // Player block check status
117117
, g_bPlayerVerified[MAXPLAYERS + 1]; // Player has been verified into the database
118118

119-
int
119+
int
120120
iNumReasons
121121
, iNumTimes
122122
, g_iTimeMinutes[MAX_TIMES]
@@ -140,11 +140,11 @@ Handle g_hGagExpireTimer[MAXPLAYERS + 1] = { null, ... }
140140
, g_hMuteExpireTimer[MAXPLAYERS + 1] = { null, ... };
141141

142142
bType g_MuteType[MAXPLAYERS + 1];
143-
char
143+
char
144144
g_sMuteAdminName[MAXPLAYERS + 1][MAX_NAME_LENGTH]
145145
, g_sMuteReason[MAXPLAYERS + 1][256]
146146
, g_sMuteAdminAuth[MAXPLAYERS + 1][64];
147-
int
147+
int
148148
g_iMuteTime[MAXPLAYERS + 1]
149149
, g_iMuteLength[MAXPLAYERS + 1] // in sec
150150
, g_iMuteLevel[MAXPLAYERS + 1]; // immunity level of admin
@@ -155,7 +155,7 @@ char
155155
g_sGagAdminName[MAXPLAYERS + 1][MAX_NAME_LENGTH]
156156
, g_sGagReason[MAXPLAYERS + 1][256]
157157
, g_sGagAdminAuth[MAXPLAYERS + 1][64];
158-
int
158+
int
159159
g_iGagTime[MAXPLAYERS + 1]
160160
, g_iGagLength[MAXPLAYERS + 1] // in sec
161161
, g_iGagLevel[MAXPLAYERS + 1]; // immunity level of admin
@@ -1877,12 +1877,9 @@ public void Query_VerifyBlock(Database db, DBResultSet results, const char[] err
18771877

18781878
// TIMER CALL BACKS //
18791879

1880-
public Action Timer_ClientRecheck(Handle timer, DataPack RetryDP)
1880+
public Action Timer_ClientRecheck(Handle timer, int userid)
18811881
{
1882-
RetryDP.Reset();
1883-
int userid = RetryDP.ReadCell();
18841882
int client = GetClientOfUserId(userid);
1885-
delete RetryDP;
18861883

18871884
if (!client)
18881885
return Plugin_Stop;
@@ -2149,9 +2146,7 @@ stock void setMute(int client, int length, const char[] clientAuth)
21492146

21502147
stock void ClientRecheck(int client)
21512148
{
2152-
DataPack RetryDP = new DataPack();
2153-
RetryDP.WriteCell(g_iUserIDs[client]);
2154-
CreateTimer(1.0, Timer_ClientRecheck, RetryDP, TIMER_FLAG_NO_MAPCHANGE);
2149+
CreateTimer(1.0, Timer_ClientRecheck, g_iUserIDs[client], TIMER_FLAG_NO_MAPCHANGE);
21552150
}
21562151

21572152
stock bool IsInvalidSteamID(int client)

0 commit comments

Comments
 (0)