Commit 53f7b3d1 authored by Neoony's avatar Neoony
Browse files

v0.1 WIP29 -Fix for WIP27

parent 98fb84f5
Pipeline #5904 passed with stages
in 3 minutes
......@@ -22,7 +22,7 @@
#include <socket>
#include <cURL>
#define PluginVer "v0.1 WIP28"
#define PluginVer "v0.1 WIP29"
public Plugin myinfo =
{
......@@ -817,7 +817,7 @@ public Action QueryServersData(int args)
//char[] ServerIndexChar = new char[64];
//IntToString(ServerIndex, ServerIndexChar, 64);
char GetInfoOfServer[1024];
Format(GetInfoOfServer, sizeof(GetInfoOfServer), "SELECT name, addr, players, maxplayers, map, xp FROM `LobbyDB`.`servers` WHERE players <= maxplayers - %i AND password=0 AND isenabled=1 AND name NOT LIKE '%%LOBBY%%' AND addr!='80.112.155.100:27015' AND addr!='80.112.155.100:27017' AND addr!='80.112.155.100:27016' ORDER BY players DESC LIMIT %i,1;", GetClientCount(), ServerIndex);
Format(GetInfoOfServer, sizeof(GetInfoOfServer), "SELECT name, addr, players, maxplayers, map, xp FROM `LobbyDB`.`servers` WHERE players <= maxplayers - %i AND password=0 AND isenabled=1 AND name NOT LIKE '%%LOBBY%%' AND addr!='80.112.155.100:27015' AND addr!='80.112.155.100:27017' AND addr!='80.112.155.100:27016' ORDER BY xp DESC, players ASC LIMIT %i,1;", GetClientCount(), ServerIndex);
//PrintToServer("%s", ServerIndexChar);
SQL_TQuery(hDatabase, InfoOfServer, GetInfoOfServer, ServerIndex);
if (GetConVarInt(l_debug) == 1)
......@@ -1003,7 +1003,7 @@ public Action StartVote()
SetMenuExitButton(VoteHandle, false);
SetMenuTitle(VoteHandle, "[Lobby] Which server to join?");
for(int ServerCount=rowCount; ServerCount>=1; ServerCount--)
for(int ServerCount=1; ServerCount<=rowCount; ServerCount++)
{
int ServerIndex = ServerCount - 1;
Format(ServerVoteItem[ServerIndex], 256, "%s [max %s players] [XP %s] \n %s", namex[ServerIndex], maxplayersx[ServerIndex], XPonstring[ServerIndex], mapx[ServerIndex]);
......
......@@ -4,7 +4,7 @@
{
"Version"
{
"Latest" "v0.1 WIP28"
"Latest" "v0.1 WIP29"
}
"Notes" "First release"
......@@ -48,6 +48,7 @@
"Notes" "WIP27: Sort servers without players above servers with seeding players"
"Notes" "WIP28: Lobby plugin now has a new dependency, cURL: https://forums.alliedmods.net/showthread.php?t=152216"
"Notes" "WIP28: Added showing XP support of servers when voting"
"Notes" "WIP29: Fix for WIP27"
}
"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