From fa97bd775d745a9bdd7e1297a3df59de07522768 Mon Sep 17 00:00:00 2001 From: Marvin Date: Tue, 10 Apr 2018 01:57:53 +0200 Subject: [PATCH 1/2] Fixed InsertServerInfo() --- game/addons/sourcemod/scripting/sbpp_main.sp | 41 ++++++++++---------- 1 file changed, 20 insertions(+), 21 deletions(-) diff --git a/game/addons/sourcemod/scripting/sbpp_main.sp b/game/addons/sourcemod/scripting/sbpp_main.sp index f61ca7612..39abf2286 100644 --- a/game/addons/sourcemod/scripting/sbpp_main.sp +++ b/game/addons/sourcemod/scripting/sbpp_main.sp @@ -2563,27 +2563,26 @@ stock CheckLoadAdmins() stock InsertServerInfo() { - if (DB == INVALID_HANDLE) - { - return; - } - - char query[100], pieces[4]; - int longip = GetConVarInt(CvarHostIp); - - pieces[0] = (longip >> 24) & 0x000000FF; - pieces[1] = (longip >> 16) & 0x000000FF; - pieces[2] = (longip >> 8) & 0x000000FF; - pieces[3] = longip & 0x000000FF; - - FormatEx(ServerIp, sizeof(ServerIp), "%d.%d.%d.%d", pieces[0], pieces[1], pieces[2], pieces[3]); - GetConVarString(CvarPort, ServerPort, sizeof(ServerPort)); - - if (AutoAdd != false) - { - FormatEx(query, sizeof(query), "SELECT sid FROM %s_servers WHERE ip = '%s' AND port = '%s'", DatabasePrefix, ServerIp, ServerPort); - SQL_TQuery(DB, ServerInfoCallback, query); - } + if (DB == INVALID_HANDLE) { + return; + } + + char query[100]; + int pieces[4]; + int longip = GetConVarInt(CvarHostIp); + + pieces[0] = (longip >> 24) & 0x000000FF; + pieces[1] = (longip >> 16) & 0x000000FF; + pieces[2] = (longip >> 8) & 0x000000FF; + pieces[3] = longip & 0x000000FF; + + FormatEx(ServerIp, sizeof(ServerIp), "%d.%d.%d.%d", pieces[0], pieces[1], pieces[2], pieces[3]); + GetConVarString(CvarPort, ServerPort, sizeof(ServerPort)); + + if (AutoAdd != false) { + FormatEx(query, sizeof(query), "SELECT sid FROM %s_servers WHERE ip = '%s' AND port = '%s'", DatabasePrefix, ServerIp, ServerPort); + SQL_TQuery(DB, ServerInfoCallback, query); + } } stock void PrepareBan(int client, int target, int time, char[] reason, int size) From c7789c300a704f748d11a62d8da0ec987611ffcd Mon Sep 17 00:00:00 2001 From: Marvin Date: Tue, 10 Apr 2018 01:59:02 +0200 Subject: [PATCH 2/2] Updated Version.json --- web/version.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/version.json b/web/version.json index 56def0812..0f24c9cc5 100644 --- a/web/version.json +++ b/web/version.json @@ -1,5 +1,5 @@ { "version": "1.6.3", - "git": "665", + "git": "674", "dev": false }