Commit 90d9761c authored by Neoony's avatar Neoony
Browse files

v0.1 WIP24 -Attempt to fix an issue with local server fix sometimes not applying on main lobby

parent 08e23eeb
Pipeline #4735 passed with stages
in 4 minutes and 14 seconds
......@@ -21,7 +21,7 @@
//#include <emputils>
#include <socket>
#define PluginVer "v0.1 WIP23"
#define PluginVer "v0.1 WIP24"
public Plugin myinfo =
{
......@@ -163,7 +163,6 @@ public void OnPluginStart()
CreateTimer(GetConVarFloat(l_refreshservers), RefreshServersTmr, _, TIMER_REPEAT);
l_serverformat = CreateConVar( "l_serverformat", "%name - %map (%numplayers/%maxplayers)", "Dont change, this is here because of issues with strings and % sign." );
//Updater
if (LibraryExists("updater"))
......@@ -171,41 +170,6 @@ public void OnPluginStart()
Updater_AddPlugin(UPDATE_URL);
}
//Detect hostname of server
GetConVarString(FindConVar("hostname"), hostname, sizeof(hostname));
if (GetConVarInt(l_debug) == 1)
{
PrintToServer("[L]Hostname: %s", hostname);
}
if (StrEqual(hostname, "Empires Backup Lobby") == true)
{
VanillaLocal = true;
}
if (StrEqual(hostname, "Empires Lobby") == true)
{
EuropiresLocal = true;
}
if (GetConVarInt(l_debug) == 1)
{
if (VanillaLocal == true)
{
PrintToServer("[L]VanillaLocal = true");
}
if (VanillaLocal == false)
{
PrintToServer("[L]VanillaLocal = false");
}
if (EuropiresLocal == true)
{
PrintToServer("[L]EuropiresLocal = true");
}
if (EuropiresLocal == false)
{
PrintToServer("[L]EuropiresLocal = false");
}
}
//Create or load config files
AutoExecConfig(true, "Lobby");
//Message
......@@ -668,6 +632,41 @@ public void OnConfigsExecuted()
KillTimer(ConnectDialogTimer);
ConnectDialogTimer = INVALID_HANDLE;
}
//Detect hostname of server
GetConVarString(FindConVar("hostname"), hostname, sizeof(hostname));
if (GetConVarInt(l_debug) == 1)
{
PrintToServer("[L]Hostname: %s", hostname);
}
if (StrEqual(hostname, "Empires Backup Lobby") == true)
{
VanillaLocal = true;
}
if (StrEqual(hostname, "Empires Lobby") == true)
{
EuropiresLocal = true;
}
if (GetConVarInt(l_debug) == 1)
{
if (VanillaLocal == true)
{
PrintToServer("[L]VanillaLocal = true");
}
if (VanillaLocal == false)
{
PrintToServer("[L]VanillaLocal = false");
}
if (EuropiresLocal == true)
{
PrintToServer("[L]EuropiresLocal = true");
}
if (EuropiresLocal == false)
{
PrintToServer("[L]EuropiresLocal = false");
}
}
}
public void OnClientDisconnect(int Client)
......@@ -1153,6 +1152,25 @@ public void RSAllServersAddr(Handle RShDriver, Handle RShResult, const char[] sE
}
else
{
if (GetConVarInt(l_debug) == 1)
{
if (VanillaLocal == true)
{
PrintToServer("[L]VanillaLocal = true");
}
if (VanillaLocal == false)
{
PrintToServer("[L]VanillaLocal = false");
}
if (EuropiresLocal == true)
{
PrintToServer("[L]EuropiresLocal = true");
}
if (EuropiresLocal == false)
{
PrintToServer("[L]EuropiresLocal = false");
}
}
RSrowCount = SQL_GetRowCount(RShResult);
for(int ServerCount=1; ServerCount<=RSrowCount; ServerCount++)
{
......
......@@ -4,7 +4,7 @@
{
"Version"
{
"Latest" "v0.1 WIP23"
"Latest" "v0.1 WIP24"
}
"Notes" "First release"
......@@ -41,6 +41,7 @@
"Notes" "WIP22: Added some debug messages related to Fast refresh local ip"
"Notes" "WIP23: Fixed cleaning of sockets"
"Notes" "WIP23: Fixed sockets not timing out, timeout takes half of the l_refreshservers value"
"Notes" "WIP24: Attempt to fix an issue with local server fix sometimes not applying on main lobby"
}
"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