Commit 67b8cc62 authored by Neoony's avatar Neoony
Browse files

v0.1 WIP12 -Fixed Vanilla server not getting fast refreshed

parent 126d4a27
Pipeline #4234 passed with stages
in 3 minutes and 36 seconds
......@@ -43,7 +43,7 @@ https://forums.alliedmods.net/showthread.php?t=67640
*"For how long to restrict the vote starting, after a vote happened (Seconds)"*
**"l_preferredservertimer"** *"def. 300"*
*"For how long should the chosen server from voting be preferred for (Seconds) (It will also become unpreferred if the player number becomes 0"*
*"For how long should the chosen server from voting be preferred for (Seconds) (It will also become unpreferred if the player number becomes 0)"*
**"l_preferredservermp"** *"def. 1"*
*"Minimum players for chosen by a vote preferred server needed"*
......
......@@ -21,7 +21,7 @@
//#include <emputils>
#include <socket>
#define PluginVer "v0.1 WIP11"
#define PluginVer "v0.1 WIP12"
public Plugin myinfo =
{
......@@ -649,6 +649,9 @@ public void GotDatabase(Database db, const char[] error, any data)
}
}
//Following queries are used for the vote only
//QueryNumberOfServers()
//QueryServersData
public Action QueryNumberOfServers()
{
char GetNumberOfServers[1024];
......@@ -1102,6 +1105,13 @@ public void RSInfoOfServer(Handle RShDriver, Handle RShResult, const char[] sErr
RSbots[ServerIndex] = SQL_FetchInt(RShResult, 2);
//PrintToServer("[Database] RSbots %i : %i", ServerIndex, RSbots[ServerIndex]);
//Vanilla server IP replacement, as it is a local server
//Vanilla IP:
//Vanilla local IP: 192.168.200.81:27016
if (StrEqual(RSaddrx[ServerIndex], "80.112.155.100:27016") == true)
{
Format(RSaddrx[ServerIndex], 256, "192.168.200.81:27016");
}
char IPPort[2][64];
ExplodeString(RSaddrx[ServerIndex], ":", IPPort, sizeof(IPPort), sizeof(IPPort[]));
......
......@@ -4,7 +4,7 @@
{
"Version"
{
"Latest" "v0.1 WIP11"
"Latest" "v0.1 WIP12"
}
"Notes" "First release"
......@@ -27,6 +27,7 @@
"Notes" "WIP10: A lot of small tweaks"
"Notes" "WIP10: Added preferred server. If server was chosen by a vote, it will become preferred until l_preferredservertimer expires or until there is less than l_preferredservermp players on chosen server"
"Notes" "WIP11: Readded Vanilla server in case there are players on it, however it is excluded from the server vote"
"Notes" "WIP12: Fixed Vanilla server not getting fast refreshed"
}
"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