diff --git a/CHANGELOG.md b/CHANGELOG.md index 91553f0ac..8980cd0e0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,11 @@ Legend: ? = Other stuff ``` +(23/04/16): Version 1.5.4.6 +----------------------- +01. ! Fix Perm Ban bug in SourceSleuth +02. ! Fix Updater + (18/04/16): Version 1.5.4.5 ----------------------- 01. ! Fix Variuous Bugs in the Plugins EXCEPT SourceSleuth diff --git a/game_upload/addons/sourcemod/plugins/SourceSleuth.smx b/game_upload/addons/sourcemod/plugins/SourceSleuth.smx index 25789ddd1..cefc0d8af 100644 Binary files a/game_upload/addons/sourcemod/plugins/SourceSleuth.smx and b/game_upload/addons/sourcemod/plugins/SourceSleuth.smx differ diff --git a/game_upload/addons/sourcemod/plugins/sb_admcfg.smx b/game_upload/addons/sourcemod/plugins/sb_admcfg.smx index 36fddfb7e..cd01a3232 100644 Binary files a/game_upload/addons/sourcemod/plugins/sb_admcfg.smx and b/game_upload/addons/sourcemod/plugins/sb_admcfg.smx differ diff --git a/game_upload/addons/sourcemod/plugins/sbchecker.smx b/game_upload/addons/sourcemod/plugins/sbchecker.smx index 735557d7f..9fecc8d58 100644 Binary files a/game_upload/addons/sourcemod/plugins/sbchecker.smx and b/game_upload/addons/sourcemod/plugins/sbchecker.smx differ diff --git a/game_upload/addons/sourcemod/plugins/sourcebans.smx b/game_upload/addons/sourcemod/plugins/sourcebans.smx index 2df35be30..79766ef60 100644 Binary files a/game_upload/addons/sourcemod/plugins/sourcebans.smx and b/game_upload/addons/sourcemod/plugins/sourcebans.smx differ diff --git a/game_upload/addons/sourcemod/plugins/sourcecomms.smx b/game_upload/addons/sourcemod/plugins/sourcecomms.smx index 50a4ddd5c..cf2411a3f 100644 Binary files a/game_upload/addons/sourcemod/plugins/sourcecomms.smx and b/game_upload/addons/sourcemod/plugins/sourcecomms.smx differ diff --git a/game_upload/addons/sourcemod/scripting/SourceSleuth.sp b/game_upload/addons/sourcemod/scripting/SourceSleuth.sp index 56652207c..2b751ac13 100644 --- a/game_upload/addons/sourcemod/scripting/SourceSleuth.sp +++ b/game_upload/addons/sourcemod/scripting/SourceSleuth.sp @@ -31,7 +31,7 @@ #undef REQUIRE_PLUGIN #include -#define PLUGIN_VERSION "(SB++) 1.5.4.5" +#define PLUGIN_VERSION "(SB++) 1.5.4.6" #define LENGTH_ORIGINAL 1 #define LENGTH_CUSTOM 2 @@ -53,36 +53,36 @@ ConVar g_cVar_bypass; //- Bools -// new bool:CanUseSourcebans = false; -public Plugin:myinfo = +public Plugin:myinfo = { - name = "SourceSleuth", - author = "ecca, Sarabveer(VEER™)", - description = "Useful for TF2 servers. Plugin will check for banned ips and ban the player.", - version = PLUGIN_VERSION, + name = "SourceSleuth", + author = "ecca, Sarabveer(VEER™)", + description = "Useful for TF2 servers. Plugin will check for banned ips and ban the player.", + version = PLUGIN_VERSION, url = "https://sarabveer.github.io/SourceBans-Fork/" }; public OnPluginStart() { LoadTranslations("sourcesleuth.phrases"); - + CreateConVar("sm_sourcesleuth_version", PLUGIN_VERSION, "SourceSleuth plugin version", FCVAR_PLUGIN | FCVAR_SPONLY | FCVAR_REPLICATED | FCVAR_NOTIFY | FCVAR_DONTRECORD); - + g_cVar_actions = CreateConVar("sm_sleuth_actions", "3", "Sleuth Ban Type: 1 - Original Length, 2 - Custom Length, 3 - Double Length, 4 - Notify Admins Only", FCVAR_PLUGIN, true, 1.0, true, 4.0); g_cVar_banduration = CreateConVar("sm_sleuth_duration", "0", "Required: sm_sleuth_actions 1: Bantime to ban player if we got a match (0 = permanent (defined in minutes) )", FCVAR_PLUGIN); g_cVar_sbprefix = CreateConVar("sm_sleuth_prefix", "sb", "Prexfix for sourcebans tables: Default sb", FCVAR_PLUGIN); g_cVar_bansAllowed = CreateConVar("sm_sleuth_bansallowed", "0", "How many active bans are allowed before we act", FCVAR_PLUGIN); g_cVar_bantype = CreateConVar("sm_sleuth_bantype", "0", "0 - ban all type of lengths, 1 - ban only permanent bans", FCVAR_PLUGIN, true, 0.0, true, 1.0); g_cVar_bypass = CreateConVar("sm_sleuth_adminbypass", "0", "0 - Inactivated, 1 - Allow all admins with ban flag to pass the check", FCVAR_PLUGIN, true, 0.0, true, 1.0); - + g_hAllowedArray = CreateArray(256); - + AutoExecConfig(true, "Sm_SourceSleuth"); - + SQL_TConnect(SQL_OnConnect, "sourcebans"); - + RegAdminCmd("sm_sleuth_reloadlist", ReloadListCallBack, ADMFLAG_ROOT); - + LoadWhiteList(); } @@ -122,16 +122,16 @@ public SQL_OnConnect(Handle:owner, Handle:hndl, const String:error[], any:data) public Action:ReloadListCallBack(client, args) { ClearArray(g_hAllowedArray); - + LoadWhiteList(); - + LogMessage("%L reloaded the whitelist", client); - + if (client != 0) { PrintToChat(client, "[SourceSleuth] WhiteList has been reloaded!"); } - + return Plugin_Continue; } @@ -141,30 +141,30 @@ public OnClientPostAdminCheck(client) { new String:steamid[32]; GetClientAuthId(client, AuthId_Steam2, steamid, sizeof(steamid)); - + if (g_cVar_bypass.BoolValue && CheckCommandAccess(client, "sleuth_admin", ADMFLAG_BAN, false)) { return; } - + if (FindStringInArray(g_hAllowedArray, steamid) == -1) { new String:IP[32], String:Prefix[64]; GetClientIP(client, IP, sizeof(IP)); - + g_cVar_sbprefix.GetString(Prefix, sizeof(Prefix)); - + new String:query[1024]; - + FormatEx(query, sizeof(query), "SELECT * FROM %s_bans WHERE ip='%s' AND RemoveType IS NULL AND ends > %d", Prefix, IP, g_cVar_bantype.IntValue == 0 ? GetTime() : 0); - + new Handle:datapack = CreateDataPack(); - + WritePackCell(datapack, GetClientUserId(client)); WritePackString(datapack, steamid); WritePackString(datapack, IP); ResetPack(datapack); - + SQL_TQuery(hDatabase, SQL_CheckHim, query, datapack); } } @@ -174,7 +174,7 @@ public SQL_CheckHim(Handle:owner, Handle:hndl, const String:error[], any:datapac { new client; decl String:steamid[32], String:IP[32]; - + if (datapack != INVALID_HANDLE) { client = GetClientOfUserId(ReadPackCell(datapack)); @@ -182,17 +182,17 @@ public SQL_CheckHim(Handle:owner, Handle:hndl, const String:error[], any:datapac ReadPackString(datapack, IP, sizeof(IP)); CloseHandle(datapack); } - + if (hndl == INVALID_HANDLE) { LogError("SourceSleuth: Database query error: %s", error); return; } - + if (SQL_FetchRow(hndl)) { new TotalBans = SQL_GetRowCount(hndl); - + if (TotalBans > g_cVar_bansAllowed.IntValue) { switch (g_cVar_actions.IntValue) @@ -201,7 +201,7 @@ public SQL_CheckHim(Handle:owner, Handle:hndl, const String:error[], any:datapac { new length = SQL_FetchInt(hndl, 6); new time = length * 60; - + BanPlayer(client, time); } case LENGTH_CUSTOM: @@ -212,14 +212,14 @@ public SQL_CheckHim(Handle:owner, Handle:hndl, const String:error[], any:datapac case LENGTH_DOUBLE: { new length = SQL_FetchInt(hndl, 6); - + new time = 0; - - if(length != 0) + + if (length != 0) { time = length / 60 * 2; } - + BanPlayer(client, time); } case LENGTH_NOTIFY: @@ -242,13 +242,13 @@ stock BanPlayer(client, time) PrintToAdmins(const String:format[], any:...) { new String:g_Buffer[256]; - + for (new i = 1; i <= MaxClients; i++) { if (CheckCommandAccess(i, "sm_sourcesleuth_printtoadmins", ADMFLAG_BAN) && IsClientInGame(i)) { VFormat(g_Buffer, sizeof(g_Buffer), format, 2); - + PrintToChat(i, "%s", g_Buffer); } } @@ -257,17 +257,17 @@ PrintToAdmins(const String:format[], any:...) public LoadWhiteList() { decl String:path[PLATFORM_MAX_PATH], String:line[256]; - + BuildPath(Path_SM, path, PLATFORM_MAX_PATH, "configs/sourcesleuth_whitelist.cfg"); - + new Handle:fileHandle = OpenFile(path, "r"); - + while (!IsEndOfFile(fileHandle) && ReadFileLine(fileHandle, line, sizeof(line))) { ReplaceString(line, sizeof(line), "\n", "", false); - + PushArrayString(g_hAllowedArray, line); } - + CloseHandle(fileHandle); } diff --git a/game_upload/addons/sourcemod/scripting/sb_admcfg.sp b/game_upload/addons/sourcemod/scripting/sb_admcfg.sp index 6ebf96b58..e5494ad19 100644 --- a/game_upload/addons/sourcemod/scripting/sb_admcfg.sp +++ b/game_upload/addons/sourcemod/scripting/sb_admcfg.sp @@ -37,7 +37,7 @@ public Plugin myinfo = name = "SourceBans: Admin Config Loader", author = "AlliedModders LLC, Sarabveer(VEER™)", description = "Reads Admin Files", - version = "(SB++) 1.5.4.5", + version = "(SB++) 1.5.4.6", url = "https://github.com/Sarabveer/SourceBans-Fork" }; diff --git a/game_upload/addons/sourcemod/scripting/sbchecker.sp b/game_upload/addons/sourcemod/scripting/sbchecker.sp index 770b533cb..a1291889c 100644 --- a/game_upload/addons/sourcemod/scripting/sbchecker.sp +++ b/game_upload/addons/sourcemod/scripting/sbchecker.sp @@ -26,7 +26,7 @@ #include -#define VERSION "(SB++) 1.5.4.5" +#define VERSION "(SB++) 1.5.4.6" #define LISTBANS_USAGE "sm_listsbbans <#userid|name> - Lists a user's prior bans from Sourcebans" #define INVALID_TARGET -1 diff --git a/game_upload/addons/sourcemod/scripting/sourcebans.sp b/game_upload/addons/sourcemod/scripting/sourcebans.sp index 6d7665cc1..b2bd1e0ba 100644 --- a/game_upload/addons/sourcemod/scripting/sourcebans.sp +++ b/game_upload/addons/sourcemod/scripting/sourcebans.sp @@ -32,8 +32,8 @@ #include #tryinclude -#define SB_VERSION "1.5.4.5F" -#define SBR_VERSION "1.5.4.5" +#define SB_VERSION "1.5.4.6F" +#define SBR_VERSION "1.5.4.6" #if defined _updater_included #define UPDATE_URL "https://sarabveer.github.io/SourceBans-Fork/updater/updatefile.txt" @@ -65,7 +65,6 @@ new g_BanTime[MAXPLAYERS + 1] = { -1, ... }; new State:ConfigState; new Handle:ConfigParser; -new Handle:updaterCvar = INVALID_HANDLE; new Handle:hTopMenu = INVALID_HANDLE; new const String:Prefix[] = "[SourceBans] "; @@ -236,13 +235,6 @@ public OnPluginStart() } #if defined _updater_included -public Action:Updater_OnPluginDownloading() { - if (!GetConVarBool(updaterCvar)) { - return Plugin_Handled; - } - return Plugin_Continue; -} - public OnLibraryAdded(const String:name[]) { if (StrEqual(name, "updater")) { Updater_AddPlugin(UPDATE_URL); diff --git a/game_upload/addons/sourcemod/scripting/sourcecomms.sp b/game_upload/addons/sourcemod/scripting/sourcecomms.sp index eff64ab62..ac95ac567 100644 --- a/game_upload/addons/sourcemod/scripting/sourcecomms.sp +++ b/game_upload/addons/sourcemod/scripting/sourcecomms.sp @@ -42,7 +42,7 @@ // Do not edit below this line // //-----------------------------// -#define PLUGIN_VERSION "(SB++) 1.5.4.5" +#define PLUGIN_VERSION "(SB++) 1.5.4.6" #define PREFIX "\x04[SourceComms]\x01 " #define MAX_TIME_MULTI 30 // maximum mass-target punishment length diff --git a/web_upload/init.php b/web_upload/init.php index 7ca67780b..30f1428cf 100644 --- a/web_upload/init.php +++ b/web_upload/init.php @@ -95,8 +95,8 @@ // --------------------------------------------------- #define('SB_GIT', true); if(!defined('SB_VERSION')){ - define('SB_VERSION', '1.5.4.5'); - define('SB_GITRev', '$Git: 346 $'); + define('SB_VERSION', '1.5.4.6'); + define('SB_GITRev', '$Git: 350 $'); } define('LOGIN_COOKIE_LIFETIME', (60*60*24*7)*2); define('COOKIE_PATH', '/');