Commit 945cc496 authored by Neoony's avatar Neoony
Browse files

v0.1 WIP9 Small adjustment to redirecting the current lobby players, where it...

v0.1 WIP9 Small adjustment to redirecting the current lobby players, where it needed one more slot too much than needed to redirect them
parent ebc192a9
Pipeline #4020 passed with stages
in 2 minutes and 13 seconds
......@@ -20,7 +20,7 @@
#include <sdkhooks>
//#include <emputils>
#define PluginVer "v0.1 WIP8"
#define PluginVer "v0.1 WIP9"
public Plugin myinfo =
{
......@@ -276,7 +276,7 @@ public void CheckPopulatedServers()
// Query for servers with more or equal than l_minplayers players.
char populatedServerQuery[256];
//int minplayers = GetConVarInt(l_minplayers);
Format(populatedServerQuery, sizeof(populatedServerQuery), "SELECT addr FROM `LobbyDB`.`servers` WHERE players >= %i AND players < maxplayers - %i AND password=0 AND isenabled=1 AND name NOT LIKE '%%LOBBY%%' ORDER BY players DESC LIMIT 1;", GetConVarInt(l_minplayers), GetClientCount());
Format(populatedServerQuery, sizeof(populatedServerQuery), "SELECT addr FROM `LobbyDB`.`servers` WHERE players >= %i AND players <= maxplayers - %i AND password=0 AND isenabled=1 AND name NOT LIKE '%%LOBBY%%' ORDER BY players DESC LIMIT 1;", GetConVarInt(l_minplayers), GetClientCount());
SQL_TQuery(hDatabase, RedirectToPopulatedServerCallback, populatedServerQuery);
}
public void RedirectToPopulatedServerCallback(Handle hDriver, Handle hResult, const char[] sError, int iData)
......
......@@ -4,7 +4,7 @@
{
"Version"
{
"Latest" "v0.1 WIP8"
"Latest" "v0.1 WIP9"
}
"Notes" "First release"
......@@ -21,6 +21,7 @@
"Notes" "WIP6: Bugfix of l_forceredirect"
"Notes" "WIP7: Quickadd on not redirecting players to a full server. Still needs work"
"Notes" "WIP8: Adjust query to not include full servers for the vote"
"Notes" "WIP9: Small adjustment to redirecting the current lobby players, where it needed one more slot too much than needed to redirect them"
}
"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