Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions game/addons/sourcemod/scripting/include/sourcebanspp.inc
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@
#endif
#define _sourcebanspp_included

#define SB_VERSION_MAJOR "1"
#define SB_VERSION_MINOR "8"
#define SB_VERSION_PATCH "4"

#define SB_VERSION SB_VERSION_MAJOR..."."...SB_VERSION_MINOR..."."...SB_VERSION_PATCH

public SharedPlugin __pl_sourcebanspp =
{
name = "sourcebans++",
Expand Down
7 changes: 6 additions & 1 deletion game/addons/sourcemod/scripting/include/sourcecomms.inc
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@
#endif
#define _sourcecomms_included

#define SBPPComms_VERSION_MAJOR "1"
#define SBPPComms_VERSION_MINOR "8"
#define SBPPComms_VERSION_PATCH "3"

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

/**
* @section Int definitions for punishments types.
*/
Expand Down Expand Up @@ -134,5 +140,4 @@ public void __pl_sourcecomms_SetNTVOptional()
MarkNativeAsOptional("SourceComms_SetClientGag");
MarkNativeAsOptional("SourceComms_GetClientMuteType");
MarkNativeAsOptional("SourceComms_GetClientGagType");

}
21 changes: 10 additions & 11 deletions game/addons/sourcemod/scripting/sbpp_comms.sp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
// Do not edit below this line //
//-----------------------------//

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

//GLOBAL DEFINES
Expand Down Expand Up @@ -134,10 +133,10 @@ int

SMCParser ConfigParser;

Handle
g_hFwd_OnPlayerPunished
, g_hFwd_OnPlayerUnpunished
, g_hGagExpireTimer[MAXPLAYERS + 1] = { null, ... }
GlobalForward g_hFwd_OnPlayerPunished
, g_hFwd_OnPlayerUnpunished;

Handle g_hGagExpireTimer[MAXPLAYERS + 1] = { null, ... }
, g_hMuteExpireTimer[MAXPLAYERS + 1] = { null, ... };

bType g_MuteType[MAXPLAYERS + 1];
Expand Down Expand Up @@ -170,7 +169,7 @@ public Plugin myinfo =
name = "SourceBans++: SourceComms",
author = "Alex, SourceBans++ Dev Team",
description = "Advanced punishments management for the Source engine in SourceBans style",
version = PLUGIN_VERSION,
version = SBPPComms_VERSION,
url = "https://sbpp.github.io"
};

Expand Down Expand Up @@ -203,7 +202,7 @@ public void OnPluginStart()
CvarPort = FindConVar("hostport");
g_hServersWhiteList = new ArrayList();

CreateConVar("sourcecomms_version", PLUGIN_VERSION, _, FCVAR_SPONLY | FCVAR_REPLICATED | FCVAR_NOTIFY);
CreateConVar("sourcecomms_version", SBPPComms_VERSION, _, FCVAR_SPONLY | FCVAR_REPLICATED | FCVAR_NOTIFY);
AddCommandListener(CommandCallback, "sm_gag");
AddCommandListener(CommandCallback, "sm_mute");
AddCommandListener(CommandCallback, "sm_silence");
Expand All @@ -222,7 +221,7 @@ public void OnPluginStart()
#endif

#if defined DEBUG
PrintToServer("Sourcecomms plugin loading. Version %s", PLUGIN_VERSION);
PrintToServer("Sourcecomms plugin loading. Version %s", SBPPComms_VERSION);
#endif

// Catch config error
Expand Down Expand Up @@ -660,7 +659,7 @@ public Action CommandCallback(int client, const char[] command, int args)
if (type <= TYPE_SILENCE)
CreateBlock(client, _, _, type, _, sBuffer);
else
ProcessUnBlock(client, _, type, _, sBuffer);
ProcessUnBlock(client, _, type, sBuffer);

return Plugin_Stop;
}
Expand Down Expand Up @@ -2430,10 +2429,10 @@ stock void CreateBlock(int client, int targetId = 0, int length = -1, int type,
return;
}

stock void ProcessUnBlock(int client, int targetId = 0, int type, char[] sReason = "", const char[] sArgs = "")
stock void ProcessUnBlock(int client, int targetId = 0, int type, char[] sReason = "")
{
#if defined DEBUG
PrintToServer("ProcessUnBlock(admin: %d, target: %d, type: %d, reason: %s, args: %s)", client, targetId, type, sReason, sArgs);
PrintToServer("ProcessUnBlock(admin: %d, target: %d, type: %d, reason: %s)", client, targetId, type, sReason);
#endif

int target_list[MAXPLAYERS], target_count;
Expand Down
22 changes: 10 additions & 12 deletions game/addons/sourcemod/scripting/sbpp_main.sp
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@

#pragma newdecls required

#define SB_VERSION "1.8.2"

#if defined _updater_included
#define UPDATE_URL "https://sbpp.github.io/updater/updatefile.txt"
#endif
Expand Down Expand Up @@ -120,11 +118,11 @@ int

SMCParser ConfigParser;

Handle
g_hFwd_OnBanAdded
, g_hFwd_OnReportAdded
, g_hFwd_OnClientPreAdminCheck
, PlayerRecheck[MAXPLAYERS + 1] = { INVALID_HANDLE, ... }; /* Timer handle */
GlobalForward g_hFwd_OnBanAdded
, g_hFwd_OnReportAdded
, g_hFwd_OnClientPreAdminCheck;

Handle PlayerRecheck[MAXPLAYERS + 1] = { INVALID_HANDLE, ... }; /* Timer handle */

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

Expand Down Expand Up @@ -433,7 +431,7 @@ public Action ChatHook(int client, int args)
}

// ban him!
PrepareBan(client, g_BanTarget[client], g_BanTime[client], reason, sizeof(reason));
PrepareBan(client, g_BanTarget[client], g_BanTime[client], reason);

// block the reason to be sent in chat
return Plugin_Handled;
Expand Down Expand Up @@ -863,7 +861,7 @@ public int ReasonSelected(Menu menu, MenuAction action, int param1, int param2)
}

else if (g_BanTarget[param1] != -1 && g_BanTime[param1] != -1)
PrepareBan(param1, g_BanTarget[param1], g_BanTime[param1], info, sizeof(info));
PrepareBan(param1, g_BanTarget[param1], g_BanTime[param1], info);
}

case MenuAction_Cancel:
Expand Down Expand Up @@ -896,7 +894,7 @@ public int HackingSelected(Menu menu, MenuAction action, int param1, int param2)
menu.GetItem(param2, key, sizeof(key), _, info, sizeof(info));

if (g_BanTarget[param1] != -1 && g_BanTime[param1] != -1)
PrepareBan(param1, g_BanTarget[param1], g_BanTime[param1], info, sizeof(info));
PrepareBan(param1, g_BanTarget[param1], g_BanTime[param1], info);
}

case MenuAction_Cancel:
Expand Down Expand Up @@ -2387,7 +2385,7 @@ public int Native_SBBanPlayer(Handle plugin, int numParams)
}
}

PrepareBan(client, target, time, reason, sizeof(reason));
PrepareBan(client, target, time, reason);
return true;
}

Expand Down Expand Up @@ -2662,7 +2660,7 @@ stock void InsertServerInfo()
}
}

stock void PrepareBan(int client, int target, int time, char[] reason, int size)
stock void PrepareBan(int client, int target, int time, char[] reason)
{
#if defined DEBUG
LogToFile(logFile, "PrepareBan()");
Expand Down