Commit 446a36b0 authored by Neoony's avatar Neoony
Browse files

v0.6.1 -Fix escape character issue with SQL update

parent 0bbe6b2b
Pipeline #15140 failed with stages
in 8 minutes and 34 seconds
......@@ -125,4 +125,7 @@
- Slightly adjusted discord and charts chat message frequency
- Some small fixes and improvements
- Adjusted some default values for cvars
- Slightly improved re-checking of servers which Lobby lost connection to
\ No newline at end of file
- Slightly improved re-checking of servers which Lobby lost connection to
**v0.6.1**
- Fix escape character issue with SQL update
\ No newline at end of file
......@@ -23,7 +23,7 @@
#include <cURL>
#include <SteamWorks>
#define PluginVer "v0.6.0"
#define PluginVer "v0.6.1"
public Plugin myinfo =
{
......@@ -142,7 +142,7 @@ int numPlayersS[10];
int maxPlayersS[10];
int botsintS[10];
char mapNameS[10][256];
char serverNameS[10][256];
char serverNameS[10][160];
int appIdS[10];
char versionS[10][256];
......@@ -3181,8 +3181,13 @@ public Action UpdateSQL(int ServerIndexx)
//mapNameS[ServerIndexx]
//appIdS[ServerIndexx]
//EscapeString for SQL servername
char EscapedServerName[160];
SQL_EscapeString(hDatabase, serverNameS[ServerIndexx], EscapedServerName, sizeof(EscapedServerName));
//PrintToServer("%s", EscapedServerName);
char UpdateServer[512];
Format(UpdateServer, sizeof(UpdateServer), "UPDATE `LobbyDB`.`servers` SET last_update = '%i', name = '%s', players = '%i', maxplayers = '%i', bots = '%i', map = '%s' WHERE addr = '%s';", GetTime(), serverNameS[ServerIndexx], numPlayersS[ServerIndexx], maxPlayersS[ServerIndexx], botsintS[ServerIndexx], mapNameS[ServerIndexx], RSaddrx[ServerIndexx]);
Format(UpdateServer, sizeof(UpdateServer), "UPDATE `LobbyDB`.`servers` SET last_update = '%i', name = '%s', players = '%i', maxplayers = '%i', bots = '%i', map = '%s' WHERE addr = '%s';", GetTime(), EscapedServerName, numPlayersS[ServerIndexx], maxPlayersS[ServerIndexx], botsintS[ServerIndexx], mapNameS[ServerIndexx], RSaddrx[ServerIndexx]);
SQL_TQuery(hDatabase, UpdateServer_Handle, UpdateServer, ServerIndexx);
//Update appid
......
......@@ -4,16 +4,10 @@
{
"Version"
{
"Latest" "v0.6.0"
"Latest" "v0.6.1"
}
"Notes" "Added handling of Source Query A2S_INFO challenge"
"Notes" "Reworked querying of IP addresses from masterserver into Lobby plugin, instead of external tool, this also makes it more accurate"
"Notes" "Slightly adjusted discord and charts chat message frequency"
"Notes" "Some small fixes and improvements"
"Notes" "Adjusted some default values for cvars"
"Notes" "Slightly improved re-checking of servers which Lobby lost connection to"
"Notes" "Fix escape character issue with SQL update"
}
"Files"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment