Working server browser
This commit is contained in:
parent
fbf82658ce
commit
eb67d04f59
|
|
@ -63,7 +63,7 @@ public class FileFormat
|
||||||
DisableReshadeDelete = false;
|
DisableReshadeDelete = false;
|
||||||
ShowServerNotifications = true;
|
ShowServerNotifications = true;
|
||||||
ServerBrowserServerName = "Novetus";
|
ServerBrowserServerName = "Novetus";
|
||||||
ServerBrowserServerAddress = "localhost:" + RobloxPort;
|
ServerBrowserServerAddress = "localhost";
|
||||||
}
|
}
|
||||||
|
|
||||||
public string SelectedClient { get; set; }
|
public string SelectedClient { get; set; }
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,8 @@ using System.Text;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Net;
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region .NET Extentions
|
#region .NET Extentions
|
||||||
|
|
@ -222,5 +224,30 @@ public static class NETExt
|
||||||
return files.Where(f => extensions.Contains(f.Extension));
|
return files.Where(f => extensions.Contains(f.Extension));
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region WebClient Extensions
|
||||||
|
public static Task<Stream> OpenReadTaskAsync(this WebClient client, Uri uri)
|
||||||
|
{
|
||||||
|
var tcs = new TaskCompletionSource<Stream>();
|
||||||
|
|
||||||
|
OpenReadCompletedEventHandler openReadEventHandler = null;
|
||||||
|
openReadEventHandler = (sender, args) =>
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
tcs.SetResult(args.Result);
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
tcs.SetException(e);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
client.OpenReadCompleted += openReadEventHandler;
|
||||||
|
client.OpenReadAsync(uri);
|
||||||
|
|
||||||
|
return tcs.Task;
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
@ -39,22 +39,18 @@ public class VarStorage
|
||||||
#region Game Server Definition
|
#region Game Server Definition
|
||||||
public class GameServer
|
public class GameServer
|
||||||
{
|
{
|
||||||
public GameServer(string name, string ip, string port, string client, string players, string maxPlayers)
|
public GameServer(string name, string ip, string port, string client)
|
||||||
{
|
{
|
||||||
ServerName = name;
|
ServerName = SecurityFuncs.Base64DecodeOld(name);
|
||||||
ServerIP = ip;
|
ServerIP = SecurityFuncs.Base64DecodeOld(ip);
|
||||||
ServerPort = Convert.ToInt32(port);
|
ServerPort = Convert.ToInt32(SecurityFuncs.Base64DecodeOld(port));
|
||||||
ServerClient = client;
|
ServerClient = SecurityFuncs.Base64DecodeOld(client);
|
||||||
ServerPlayers = Convert.ToInt32(players);
|
|
||||||
ServerMaxPlayers = Convert.ToInt32(maxPlayers);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public string ServerName { get; set; }
|
public string ServerName { get; set; }
|
||||||
public string ServerIP { get; set; }
|
public string ServerIP { get; set; }
|
||||||
public int ServerPort { get; set; }
|
public int ServerPort { get; set; }
|
||||||
public string ServerClient { get; set; }
|
public string ServerClient { get; set; }
|
||||||
public int ServerPlayers { get; set; }
|
|
||||||
public int ServerMaxPlayers { get; set; }
|
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -611,9 +611,9 @@ namespace NovetusLauncher
|
||||||
//
|
//
|
||||||
this.label30.Font = new System.Drawing.Font("Microsoft Sans Serif", 6.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
this.label30.Font = new System.Drawing.Font("Microsoft Sans Serif", 6.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||||
this.label30.ForeColor = System.Drawing.Color.Red;
|
this.label30.ForeColor = System.Drawing.Color.Red;
|
||||||
this.label30.Location = new System.Drawing.Point(6, 118);
|
this.label30.Location = new System.Drawing.Point(6, 105);
|
||||||
this.label30.Name = "label30";
|
this.label30.Name = "label30";
|
||||||
this.label30.Size = new System.Drawing.Size(393, 58);
|
this.label30.Size = new System.Drawing.Size(393, 71);
|
||||||
this.label30.TabIndex = 3;
|
this.label30.TabIndex = 3;
|
||||||
this.label30.TextAlign = System.Drawing.ContentAlignment.TopCenter;
|
this.label30.TextAlign = System.Drawing.ContentAlignment.TopCenter;
|
||||||
this.label30.Visible = false;
|
this.label30.Visible = false;
|
||||||
|
|
@ -623,7 +623,7 @@ namespace NovetusLauncher
|
||||||
this.listBox2.FormattingEnabled = true;
|
this.listBox2.FormattingEnabled = true;
|
||||||
this.listBox2.Location = new System.Drawing.Point(6, 7);
|
this.listBox2.Location = new System.Drawing.Point(6, 7);
|
||||||
this.listBox2.Name = "listBox2";
|
this.listBox2.Name = "listBox2";
|
||||||
this.listBox2.Size = new System.Drawing.Size(393, 108);
|
this.listBox2.Size = new System.Drawing.Size(393, 95);
|
||||||
this.listBox2.TabIndex = 2;
|
this.listBox2.TabIndex = 2;
|
||||||
this.listBox2.SelectedIndexChanged += new System.EventHandler(this.ListBox2SelectedIndexChanged);
|
this.listBox2.SelectedIndexChanged += new System.EventHandler(this.ListBox2SelectedIndexChanged);
|
||||||
//
|
//
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@ namespace NovetusLauncher
|
||||||
// JoinGameButton
|
// JoinGameButton
|
||||||
//
|
//
|
||||||
this.JoinGameButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
this.JoinGameButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||||
this.JoinGameButton.Location = new System.Drawing.Point(713, 8);
|
this.JoinGameButton.Location = new System.Drawing.Point(495, 8);
|
||||||
this.JoinGameButton.Name = "JoinGameButton";
|
this.JoinGameButton.Name = "JoinGameButton";
|
||||||
this.JoinGameButton.Size = new System.Drawing.Size(75, 23);
|
this.JoinGameButton.Size = new System.Drawing.Size(75, 23);
|
||||||
this.JoinGameButton.TabIndex = 0;
|
this.JoinGameButton.TabIndex = 0;
|
||||||
|
|
@ -50,24 +50,25 @@ namespace NovetusLauncher
|
||||||
//
|
//
|
||||||
// MasterServerBox
|
// MasterServerBox
|
||||||
//
|
//
|
||||||
this.MasterServerBox.Location = new System.Drawing.Point(108, 10);
|
this.MasterServerBox.Location = new System.Drawing.Point(135, 10);
|
||||||
this.MasterServerBox.Name = "MasterServerBox";
|
this.MasterServerBox.Name = "MasterServerBox";
|
||||||
this.MasterServerBox.Size = new System.Drawing.Size(131, 20);
|
this.MasterServerBox.Size = new System.Drawing.Size(131, 20);
|
||||||
this.MasterServerBox.TabIndex = 1;
|
this.MasterServerBox.TabIndex = 1;
|
||||||
|
this.MasterServerBox.TextChanged += new System.EventHandler(this.MasterServerBox_TextChanged);
|
||||||
//
|
//
|
||||||
// MasterServerLabel
|
// MasterServerLabel
|
||||||
//
|
//
|
||||||
this.MasterServerLabel.AutoSize = true;
|
this.MasterServerLabel.AutoSize = true;
|
||||||
this.MasterServerLabel.Location = new System.Drawing.Point(12, 13);
|
this.MasterServerLabel.Location = new System.Drawing.Point(12, 13);
|
||||||
this.MasterServerLabel.Name = "MasterServerLabel";
|
this.MasterServerLabel.Name = "MasterServerLabel";
|
||||||
this.MasterServerLabel.Size = new System.Drawing.Size(89, 13);
|
this.MasterServerLabel.Size = new System.Drawing.Size(117, 13);
|
||||||
this.MasterServerLabel.TabIndex = 2;
|
this.MasterServerLabel.TabIndex = 2;
|
||||||
this.MasterServerLabel.Text = "Master Server IP:";
|
this.MasterServerLabel.Text = "Master Server Address:";
|
||||||
//
|
//
|
||||||
// MasterServerRefreshButton
|
// MasterServerRefreshButton
|
||||||
//
|
//
|
||||||
this.MasterServerRefreshButton.AutoEllipsis = true;
|
this.MasterServerRefreshButton.AutoEllipsis = true;
|
||||||
this.MasterServerRefreshButton.Location = new System.Drawing.Point(245, 8);
|
this.MasterServerRefreshButton.Location = new System.Drawing.Point(272, 8);
|
||||||
this.MasterServerRefreshButton.Name = "MasterServerRefreshButton";
|
this.MasterServerRefreshButton.Name = "MasterServerRefreshButton";
|
||||||
this.MasterServerRefreshButton.Size = new System.Drawing.Size(125, 23);
|
this.MasterServerRefreshButton.Size = new System.Drawing.Size(125, 23);
|
||||||
this.MasterServerRefreshButton.TabIndex = 3;
|
this.MasterServerRefreshButton.TabIndex = 3;
|
||||||
|
|
@ -77,10 +78,13 @@ namespace NovetusLauncher
|
||||||
//
|
//
|
||||||
// ServerListView
|
// ServerListView
|
||||||
//
|
//
|
||||||
|
this.ServerListView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||||
|
| System.Windows.Forms.AnchorStyles.Left)
|
||||||
|
| System.Windows.Forms.AnchorStyles.Right)));
|
||||||
this.ServerListView.HideSelection = false;
|
this.ServerListView.HideSelection = false;
|
||||||
this.ServerListView.Location = new System.Drawing.Point(15, 36);
|
this.ServerListView.Location = new System.Drawing.Point(10, 37);
|
||||||
this.ServerListView.Name = "ServerListView";
|
this.ServerListView.Name = "ServerListView";
|
||||||
this.ServerListView.Size = new System.Drawing.Size(773, 408);
|
this.ServerListView.Size = new System.Drawing.Size(555, 408);
|
||||||
this.ServerListView.Sorting = System.Windows.Forms.SortOrder.Ascending;
|
this.ServerListView.Sorting = System.Windows.Forms.SortOrder.Ascending;
|
||||||
this.ServerListView.TabIndex = 4;
|
this.ServerListView.TabIndex = 4;
|
||||||
this.ServerListView.UseCompatibleStateImageBehavior = false;
|
this.ServerListView.UseCompatibleStateImageBehavior = false;
|
||||||
|
|
@ -92,15 +96,17 @@ namespace NovetusLauncher
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
this.BackColor = System.Drawing.SystemColors.ControlLightLight;
|
this.BackColor = System.Drawing.SystemColors.ControlLightLight;
|
||||||
this.ClientSize = new System.Drawing.Size(800, 456);
|
this.ClientSize = new System.Drawing.Size(577, 456);
|
||||||
this.Controls.Add(this.ServerListView);
|
this.Controls.Add(this.ServerListView);
|
||||||
this.Controls.Add(this.MasterServerRefreshButton);
|
this.Controls.Add(this.MasterServerRefreshButton);
|
||||||
this.Controls.Add(this.MasterServerLabel);
|
this.Controls.Add(this.MasterServerLabel);
|
||||||
this.Controls.Add(this.MasterServerBox);
|
this.Controls.Add(this.MasterServerBox);
|
||||||
this.Controls.Add(this.JoinGameButton);
|
this.Controls.Add(this.JoinGameButton);
|
||||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||||
|
this.MinimumSize = new System.Drawing.Size(593, 495);
|
||||||
this.Name = "ServerBrowser";
|
this.Name = "ServerBrowser";
|
||||||
this.Text = "Server Browser";
|
this.Text = "Server Browser";
|
||||||
|
this.Load += new System.EventHandler(this.ServerBrowser_Load);
|
||||||
this.ResumeLayout(false);
|
this.ResumeLayout(false);
|
||||||
this.PerformLayout();
|
this.PerformLayout();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,23 +1,32 @@
|
||||||
using System;
|
#region Usings
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
|
using System.Threading.Tasks;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using static System.Windows.Forms.ListViewItem;
|
using static System.Windows.Forms.ListViewItem;
|
||||||
|
#endregion
|
||||||
|
|
||||||
namespace NovetusLauncher
|
namespace NovetusLauncher
|
||||||
{
|
{
|
||||||
|
#region Server Browser
|
||||||
public partial class ServerBrowser : Form
|
public partial class ServerBrowser : Form
|
||||||
{
|
{
|
||||||
|
#region Private Variables
|
||||||
List<VarStorage.GameServer> serverList = new List<VarStorage.GameServer>();
|
List<VarStorage.GameServer> serverList = new List<VarStorage.GameServer>();
|
||||||
private int selectedServer;
|
private int selectedServer;
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Constructor
|
||||||
public ServerBrowser()
|
public ServerBrowser()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
}
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
private void MasterServerRefreshButton_Click(object sender, EventArgs e)
|
#region Form Events
|
||||||
|
private async void MasterServerRefreshButton_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (!string.IsNullOrWhiteSpace(MasterServerBox.Text))
|
if (!string.IsNullOrWhiteSpace(MasterServerBox.Text))
|
||||||
{
|
{
|
||||||
|
|
@ -25,67 +34,47 @@ namespace NovetusLauncher
|
||||||
{
|
{
|
||||||
serverList.Clear();
|
serverList.Clear();
|
||||||
|
|
||||||
//https://stackoverflow.com/questions/2471209/how-to-read-a-file-from-internet#2471245
|
await LoadServerInfoFromFile("http://" + MasterServerBox.Text + "/serverlist.txt");
|
||||||
//https://stackoverflow.com/questions/10826260/is-there-a-way-to-read-from-a-website-one-line-at-a-time
|
|
||||||
WebClient client = new WebClient();
|
|
||||||
using (Stream stream = client.OpenRead("http://" + MasterServerBox.Text + "/serverlist.txt"))
|
|
||||||
{
|
|
||||||
using (StreamReader reader = new StreamReader(stream))
|
|
||||||
{
|
|
||||||
string line;
|
|
||||||
while ((line = reader.ReadLine()) != null)
|
|
||||||
{
|
|
||||||
string[] serverInfo = line.Split('|');
|
|
||||||
VarStorage.GameServer gameServer = new VarStorage.GameServer(serverInfo[0], serverInfo[1], serverInfo[2], serverInfo[3], serverInfo[4], serverInfo[5]);
|
|
||||||
serverList.Add(gameServer);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ServerListView.BeginUpdate();
|
ServerListView.BeginUpdate();
|
||||||
ServerListView.Clear();
|
ServerListView.Clear();
|
||||||
|
|
||||||
var ColumnName = new ColumnHeader();
|
if (serverList.Count > 0)
|
||||||
ColumnName.Text = "Name";
|
|
||||||
ColumnName.TextAlign = HorizontalAlignment.Center;
|
|
||||||
ColumnName.Width = 284;
|
|
||||||
ServerListView.Columns.Add(ColumnName);
|
|
||||||
|
|
||||||
var ColumnClient = new ColumnHeader();
|
|
||||||
ColumnClient.Text = "Client";
|
|
||||||
ColumnClient.TextAlign = HorizontalAlignment.Center;
|
|
||||||
ColumnClient.Width = 75;
|
|
||||||
ServerListView.Columns.Add(ColumnClient);
|
|
||||||
|
|
||||||
var ColumnPlayers = new ColumnHeader();
|
|
||||||
ColumnPlayers.Text = "Player Count";
|
|
||||||
ColumnPlayers.TextAlign = HorizontalAlignment.Center;
|
|
||||||
ColumnPlayers.Width = 81;
|
|
||||||
ServerListView.Columns.Add(ColumnPlayers);
|
|
||||||
|
|
||||||
foreach (var server in serverList)
|
|
||||||
{
|
{
|
||||||
var serverItem = new ListViewItem(server.ServerName);
|
var ColumnName = new ColumnHeader();
|
||||||
|
ColumnName.Text = "Name";
|
||||||
|
ColumnName.TextAlign = HorizontalAlignment.Center;
|
||||||
|
ColumnName.Width = 284;
|
||||||
|
ServerListView.Columns.Add(ColumnName);
|
||||||
|
|
||||||
var serverClient = new ListViewSubItem(serverItem, server.ServerClient);
|
var ColumnClient = new ColumnHeader();
|
||||||
serverItem.SubItems.Add(serverClient);
|
ColumnClient.Text = "Client";
|
||||||
|
ColumnClient.TextAlign = HorizontalAlignment.Center;
|
||||||
|
ColumnClient.Width = 75;
|
||||||
|
ServerListView.Columns.Add(ColumnClient);
|
||||||
|
|
||||||
var serverPlayers = new ListViewSubItem(serverItem, server.ServerPlayers.ToString() + "/" + server.ServerMaxPlayers.ToString());
|
foreach (var server in serverList)
|
||||||
serverItem.SubItems.Add(serverPlayers);
|
{
|
||||||
|
var serverItem = new ListViewItem(server.ServerName);
|
||||||
|
|
||||||
ServerListView.Items.Add(serverItem);
|
var serverClient = new ListViewSubItem(serverItem, server.ServerClient);
|
||||||
|
serverItem.SubItems.Add(serverClient);
|
||||||
|
|
||||||
|
ServerListView.Items.Add(serverItem);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
MessageBox.Show("There are no servers available on this master server.");
|
||||||
|
}
|
||||||
|
|
||||||
ServerListView.EndUpdate();
|
ServerListView.EndUpdate();
|
||||||
}
|
}
|
||||||
catch (Exception)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
MessageBox.Show("Unable to load servers. (" + ex + ")");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void JoinGameButton_Click(object sender, EventArgs e)
|
private void JoinGameButton_Click(object sender, EventArgs e)
|
||||||
|
|
@ -110,10 +99,13 @@ namespace NovetusLauncher
|
||||||
GlobalVars.JoinPort = oldPort;
|
GlobalVars.JoinPort = oldPort;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
MessageBox.Show("Select a server before joining it.");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch (Exception)
|
catch (Exception)
|
||||||
{
|
{
|
||||||
MessageBox.Show("broke (TEMP)");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -136,5 +128,40 @@ namespace NovetusLauncher
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void ServerBrowser_Load(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
MasterServerBox.Text = GlobalVars.UserConfiguration.ServerBrowserServerAddress;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void MasterServerBox_TextChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
GlobalVars.UserConfiguration.ServerBrowserServerAddress = MasterServerBox.Text;
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Functions
|
||||||
|
async Task LoadServerInfoFromFile(string url)
|
||||||
|
{
|
||||||
|
//https://stackoverflow.com/questions/2471209/how-to-read-a-file-from-internet#2471245
|
||||||
|
//https://stackoverflow.com/questions/10826260/is-there-a-way-to-read-from-a-website-one-line-at-a-time
|
||||||
|
WebClient client = new WebClient();
|
||||||
|
using (Stream stream = await client.OpenReadTaskAsync(url))
|
||||||
|
{
|
||||||
|
using (StreamReader reader = new StreamReader(stream))
|
||||||
|
{
|
||||||
|
string line;
|
||||||
|
while ((line = await reader.ReadLineAsync()) != null)
|
||||||
|
{
|
||||||
|
string DecodedLine = SecurityFuncs.Base64DecodeOld(line);
|
||||||
|
string[] serverInfo = DecodedLine.Split('|');
|
||||||
|
VarStorage.GameServer gameServer = new VarStorage.GameServer(serverInfo[0], serverInfo[1], serverInfo[2], serverInfo[3]);
|
||||||
|
serverList.Add(gameServer);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
}
|
}
|
||||||
|
#endregion
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -9,10 +9,6 @@ $ip = $_GET["ip"];
|
||||||
$port = $_GET["port"];
|
$port = $_GET["port"];
|
||||||
//client name
|
//client name
|
||||||
$client = $_GET["client"];
|
$client = $_GET["client"];
|
||||||
//players
|
|
||||||
$players = $_GET["players"];
|
|
||||||
//maxplayers
|
|
||||||
$maxplayers = $_GET["maxplayers"];
|
|
||||||
//online status
|
//online status
|
||||||
$online = $_GET["online"];
|
$online = $_GET["online"];
|
||||||
|
|
||||||
|
|
@ -22,7 +18,7 @@ $status = "Offline";
|
||||||
|
|
||||||
//ONLY the $name and $client arguments will show up in the master server!
|
//ONLY the $name and $client arguments will show up in the master server!
|
||||||
$file = 'serverlist.txt';
|
$file = 'serverlist.txt';
|
||||||
$text = "$name|$ip|$port|$client";
|
$text = base64_encode(base64_encode($name).'|'.base64_encode($ip).'|'.base64_encode($port).'|'.base64_encode($client))."\r\n";
|
||||||
|
|
||||||
if ($online == 1)
|
if ($online == 1)
|
||||||
{
|
{
|
||||||
|
|
@ -38,8 +34,7 @@ if ($online == 1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$fulltext = $text."|$players|$maxplayers\r\n";
|
file_put_contents($file, $text, FILE_APPEND);
|
||||||
file_put_contents($file, $fulltext, FILE_APPEND);
|
|
||||||
|
|
||||||
$status = "Online";
|
$status = "Online";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -213,8 +213,7 @@ function LoadTripcode(Player)
|
||||||
end
|
end
|
||||||
|
|
||||||
function PingMasterServer(online, ServerBrowserAddress, ServerBrowserName, ServerIP, Port, Client)
|
function PingMasterServer(online, ServerBrowserAddress, ServerBrowserName, ServerIP, Port, Client)
|
||||||
local PlayerService = game:GetService("Players")
|
local pingURL = "http://" .. ServerBrowserAddress .. "/query.php?name=" .. ServerBrowserName .. "&ip=" .. ServerIP .. "&port=" .. Port .. "&client=" .. Client
|
||||||
local pingURL = "http://" .. ServerBrowserAddress .. "/query.php?name=" .. ServerBrowserName .. "&ip=" .. ServerIP .. "&port=" .. Port .. "&client=" .. Client .. "&players=" .. PlayerService.NumPlayers .. "&maxplayers=" .. PlayerService.MaxPlayers
|
|
||||||
game:httpGet(pingURL .. "&online=" .. online)
|
game:httpGet(pingURL .. "&online=" .. online)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -263,8 +262,6 @@ function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Noti
|
||||||
Child.Name = "ServerReplicator"
|
Child.Name = "ServerReplicator"
|
||||||
end
|
end
|
||||||
|
|
||||||
PingMasterServer(1, ServerBrowserAddress, ServerBrowserName, ServerIP, Port, Client)
|
|
||||||
|
|
||||||
coroutine.resume(coroutine.create(function()
|
coroutine.resume(coroutine.create(function()
|
||||||
while Player ~= nil do
|
while Player ~= nil do
|
||||||
wait(0.1)
|
wait(0.1)
|
||||||
|
|
@ -287,8 +284,6 @@ function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Noti
|
||||||
if (showServerNotifications) then
|
if (showServerNotifications) then
|
||||||
game.Players:Chat("Player '" .. Player.Name .. "' left")
|
game.Players:Chat("Player '" .. Player.Name .. "' left")
|
||||||
end
|
end
|
||||||
|
|
||||||
PingMasterServer(1, ServerBrowserAddress, ServerBrowserName, ServerIP, Port, Client)
|
|
||||||
end)
|
end)
|
||||||
InitalizeSecurityValues(game.Lighting,ClientEXEMD5,LauncherMD5,ClientScriptMD5)
|
InitalizeSecurityValues(game.Lighting,ClientEXEMD5,LauncherMD5,ClientScriptMD5)
|
||||||
PingMasterServer(1, ServerBrowserAddress, ServerBrowserName, ServerIP, Port, Client)
|
PingMasterServer(1, ServerBrowserAddress, ServerBrowserName, ServerIP, Port, Client)
|
||||||
|
|
|
||||||
|
|
@ -213,8 +213,7 @@ function LoadTripcode(Player)
|
||||||
end
|
end
|
||||||
|
|
||||||
function PingMasterServer(online, ServerBrowserAddress, ServerBrowserName, ServerIP, Port, Client)
|
function PingMasterServer(online, ServerBrowserAddress, ServerBrowserName, ServerIP, Port, Client)
|
||||||
local PlayerService = game:GetService("Players")
|
local pingURL = "http://" .. ServerBrowserAddress .. "/query.php?name=" .. ServerBrowserName .. "&ip=" .. ServerIP .. "&port=" .. Port .. "&client=" .. Client
|
||||||
local pingURL = "http://" .. ServerBrowserAddress .. "/query.php?name=" .. ServerBrowserName .. "&ip=" .. ServerIP .. "&port=" .. Port .. "&client=" .. Client .. "&players=" .. PlayerService.NumPlayers .. "&maxplayers=" .. PlayerService.MaxPlayers
|
|
||||||
game:httpGet(pingURL .. "&online=" .. online)
|
game:httpGet(pingURL .. "&online=" .. online)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -263,8 +262,6 @@ function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Noti
|
||||||
Child.Name = "ServerReplicator"
|
Child.Name = "ServerReplicator"
|
||||||
end
|
end
|
||||||
|
|
||||||
PingMasterServer(1, ServerBrowserAddress, ServerBrowserName, ServerIP, Port, Client)
|
|
||||||
|
|
||||||
coroutine.resume(coroutine.create(function()
|
coroutine.resume(coroutine.create(function()
|
||||||
while Player ~= nil do
|
while Player ~= nil do
|
||||||
wait(0.1)
|
wait(0.1)
|
||||||
|
|
@ -287,8 +284,6 @@ function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Noti
|
||||||
if (showServerNotifications) then
|
if (showServerNotifications) then
|
||||||
game.Players:Chat("Player '" .. Player.Name .. "' left")
|
game.Players:Chat("Player '" .. Player.Name .. "' left")
|
||||||
end
|
end
|
||||||
|
|
||||||
PingMasterServer(1, ServerBrowserAddress, ServerBrowserName, ServerIP, Port, Client)
|
|
||||||
end)
|
end)
|
||||||
InitalizeSecurityValues(game.Lighting,ClientEXEMD5,LauncherMD5,ClientScriptMD5)
|
InitalizeSecurityValues(game.Lighting,ClientEXEMD5,LauncherMD5,ClientScriptMD5)
|
||||||
PingMasterServer(1, ServerBrowserAddress, ServerBrowserName, ServerIP, Port, Client)
|
PingMasterServer(1, ServerBrowserAddress, ServerBrowserName, ServerIP, Port, Client)
|
||||||
|
|
|
||||||
|
|
@ -263,8 +263,7 @@ function LoadTripcode(Player)
|
||||||
end
|
end
|
||||||
|
|
||||||
function PingMasterServer(online, ServerBrowserAddress, ServerBrowserName, ServerIP, Port, Client)
|
function PingMasterServer(online, ServerBrowserAddress, ServerBrowserName, ServerIP, Port, Client)
|
||||||
local PlayerService = game:service("Players")
|
local pingURL = "http://" .. ServerBrowserAddress .. "/query.php?name=" .. ServerBrowserName .. "&ip=" .. ServerIP .. "&port=" .. Port .. "&client=" .. Client
|
||||||
local pingURL = "http://" .. ServerBrowserAddress .. "/query.php?name=" .. ServerBrowserName .. "&ip=" .. ServerIP .. "&port=" .. Port .. "&client=" .. Client .. "&players=" .. PlayerService.numPlayers .. "&maxplayers=" .. PlayerService.maxPlayers
|
|
||||||
game:httpGet(pingURL .. "&online=" .. online)
|
game:httpGet(pingURL .. "&online=" .. online)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -313,8 +312,6 @@ function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Noti
|
||||||
Child.Name = "ServerReplicator"
|
Child.Name = "ServerReplicator"
|
||||||
end
|
end
|
||||||
|
|
||||||
PingMasterServer(1, ServerBrowserAddress, ServerBrowserName, ServerIP, Port, Client)
|
|
||||||
|
|
||||||
coroutine.resume(coroutine.create(function()
|
coroutine.resume(coroutine.create(function()
|
||||||
while Player ~= nil do
|
while Player ~= nil do
|
||||||
wait(0.1)
|
wait(0.1)
|
||||||
|
|
@ -337,8 +334,6 @@ function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Noti
|
||||||
if (showServerNotifications) then
|
if (showServerNotifications) then
|
||||||
game.Players:Chat("Player '" .. Player.Name .. "' left")
|
game.Players:Chat("Player '" .. Player.Name .. "' left")
|
||||||
end
|
end
|
||||||
|
|
||||||
PingMasterServer(1, ServerBrowserAddress, ServerBrowserName, ServerIP, Port, Client)
|
|
||||||
end)
|
end)
|
||||||
InitalizeSecurityValues(game.Lighting,ClientEXEMD5,LauncherMD5,ClientScriptMD5)
|
InitalizeSecurityValues(game.Lighting,ClientEXEMD5,LauncherMD5,ClientScriptMD5)
|
||||||
PingMasterServer(1, ServerBrowserAddress, ServerBrowserName, ServerIP, Port, Client)
|
PingMasterServer(1, ServerBrowserAddress, ServerBrowserName, ServerIP, Port, Client)
|
||||||
|
|
|
||||||
|
|
@ -309,8 +309,7 @@ function LoadTripcode(Player)
|
||||||
end
|
end
|
||||||
|
|
||||||
function PingMasterServer(online, ServerBrowserAddress, ServerBrowserName, ServerIP, Port, Client)
|
function PingMasterServer(online, ServerBrowserAddress, ServerBrowserName, ServerIP, Port, Client)
|
||||||
local PlayerService = game:GetService("Players")
|
local pingURL = "http://" .. ServerBrowserAddress .. "/query.php?name=" .. ServerBrowserName .. "&ip=" .. ServerIP .. "&port=" .. Port .. "&client=" .. Client
|
||||||
local pingURL = "http://" .. ServerBrowserAddress .. "/query.php?name=" .. ServerBrowserName .. "&ip=" .. ServerIP .. "&port=" .. Port .. "&client=" .. Client .. "&players=" .. PlayerService.NumPlayers .. "&maxplayers=" .. PlayerService.MaxPlayers
|
|
||||||
game:httpGet(pingURL .. "&online=" .. online)
|
game:httpGet(pingURL .. "&online=" .. online)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -359,8 +358,6 @@ function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Noti
|
||||||
Child.Name = "ServerReplicator"
|
Child.Name = "ServerReplicator"
|
||||||
end
|
end
|
||||||
|
|
||||||
PingMasterServer(1, ServerBrowserAddress, ServerBrowserName, ServerIP, Port, Client)
|
|
||||||
|
|
||||||
coroutine.resume(coroutine.create(function()
|
coroutine.resume(coroutine.create(function()
|
||||||
while Player ~= nil do
|
while Player ~= nil do
|
||||||
wait(0.1)
|
wait(0.1)
|
||||||
|
|
@ -383,8 +380,6 @@ function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Noti
|
||||||
if (showServerNotifications) then
|
if (showServerNotifications) then
|
||||||
game.Players:Chat("Player '" .. Player.Name .. "' left")
|
game.Players:Chat("Player '" .. Player.Name .. "' left")
|
||||||
end
|
end
|
||||||
|
|
||||||
PingMasterServer(1, ServerBrowserAddress, ServerBrowserName, ServerIP, Port, Client)
|
|
||||||
end)
|
end)
|
||||||
InitalizeSecurityValues(game.Lighting,ClientEXEMD5,LauncherMD5,ClientScriptMD5)
|
InitalizeSecurityValues(game.Lighting,ClientEXEMD5,LauncherMD5,ClientScriptMD5)
|
||||||
PingMasterServer(1, ServerBrowserAddress, ServerBrowserName, ServerIP, Port, Client)
|
PingMasterServer(1, ServerBrowserAddress, ServerBrowserName, ServerIP, Port, Client)
|
||||||
|
|
|
||||||
|
|
@ -309,8 +309,7 @@ function LoadTripcode(Player)
|
||||||
end
|
end
|
||||||
|
|
||||||
function PingMasterServer(online, ServerBrowserAddress, ServerBrowserName, ServerIP, Port, Client)
|
function PingMasterServer(online, ServerBrowserAddress, ServerBrowserName, ServerIP, Port, Client)
|
||||||
local PlayerService = game:GetService("Players")
|
local pingURL = "http://" .. ServerBrowserAddress .. "/query.php?name=" .. ServerBrowserName .. "&ip=" .. ServerIP .. "&port=" .. Port .. "&client=" .. Client
|
||||||
local pingURL = "http://" .. ServerBrowserAddress .. "/query.php?name=" .. ServerBrowserName .. "&ip=" .. ServerIP .. "&port=" .. Port .. "&client=" .. Client .. "&players=" .. PlayerService.NumPlayers .. "&maxplayers=" .. PlayerService.MaxPlayers
|
|
||||||
game:httpGet(pingURL .. "&online=" .. online)
|
game:httpGet(pingURL .. "&online=" .. online)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -359,8 +358,6 @@ function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Noti
|
||||||
Child.Name = "ServerReplicator"
|
Child.Name = "ServerReplicator"
|
||||||
end
|
end
|
||||||
|
|
||||||
PingMasterServer(1, ServerBrowserAddress, ServerBrowserName, ServerIP, Port, Client)
|
|
||||||
|
|
||||||
coroutine.resume(coroutine.create(function()
|
coroutine.resume(coroutine.create(function()
|
||||||
while Player ~= nil do
|
while Player ~= nil do
|
||||||
wait(0.1)
|
wait(0.1)
|
||||||
|
|
@ -383,8 +380,6 @@ function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Noti
|
||||||
if (showServerNotifications) then
|
if (showServerNotifications) then
|
||||||
game.Players:Chat("Player '" .. Player.Name .. "' left")
|
game.Players:Chat("Player '" .. Player.Name .. "' left")
|
||||||
end
|
end
|
||||||
|
|
||||||
PingMasterServer(1, ServerBrowserAddress, ServerBrowserName, ServerIP, Port, Client)
|
|
||||||
end)
|
end)
|
||||||
InitalizeSecurityValues(game.Lighting,ClientEXEMD5,LauncherMD5,ClientScriptMD5)
|
InitalizeSecurityValues(game.Lighting,ClientEXEMD5,LauncherMD5,ClientScriptMD5)
|
||||||
PingMasterServer(1, ServerBrowserAddress, ServerBrowserName, ServerIP, Port, Client)
|
PingMasterServer(1, ServerBrowserAddress, ServerBrowserName, ServerIP, Port, Client)
|
||||||
|
|
|
||||||
|
|
@ -400,8 +400,7 @@ function LoadTripcode(Player)
|
||||||
end
|
end
|
||||||
|
|
||||||
function PingMasterServer(online, ServerBrowserAddress, ServerBrowserName, ServerIP, Port, Client)
|
function PingMasterServer(online, ServerBrowserAddress, ServerBrowserName, ServerIP, Port, Client)
|
||||||
local PlayerService = game:GetService("Players")
|
local pingURL = "http://" .. ServerBrowserAddress .. "/query.php?name=" .. ServerBrowserName .. "&ip=" .. ServerIP .. "&port=" .. Port .. "&client=" .. Client
|
||||||
local pingURL = "http://" .. ServerBrowserAddress .. "/query.php?name=" .. ServerBrowserName .. "&ip=" .. ServerIP .. "&port=" .. Port .. "&client=" .. Client .. "&players=" .. PlayerService.NumPlayers .. "&maxplayers=" .. PlayerService.MaxPlayers
|
|
||||||
game:HttpGet(pingURL .. "&online=" .. online)
|
game:HttpGet(pingURL .. "&online=" .. online)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -451,8 +450,6 @@ function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Noti
|
||||||
Child.Name = "ServerReplicator"
|
Child.Name = "ServerReplicator"
|
||||||
end
|
end
|
||||||
|
|
||||||
PingMasterServer(1, ServerBrowserAddress, ServerBrowserName, ServerIP, Port, Client)
|
|
||||||
|
|
||||||
while true do
|
while true do
|
||||||
wait(0.001)
|
wait(0.001)
|
||||||
if (Player.Character ~= nil) then
|
if (Player.Character ~= nil) then
|
||||||
|
|
@ -473,8 +470,6 @@ function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Noti
|
||||||
if (showServerNotifications) then
|
if (showServerNotifications) then
|
||||||
game.Players:Chat("Player '" .. Player.Name .. "' left")
|
game.Players:Chat("Player '" .. Player.Name .. "' left")
|
||||||
end
|
end
|
||||||
|
|
||||||
PingMasterServer(1, ServerBrowserAddress, ServerBrowserName, ServerIP, Port, Client)
|
|
||||||
end)
|
end)
|
||||||
InitalizeSecurityValues(game.Lighting,ClientEXEMD5,LauncherMD5,ClientScriptMD5)
|
InitalizeSecurityValues(game.Lighting,ClientEXEMD5,LauncherMD5,ClientScriptMD5)
|
||||||
PingMasterServer(1, ServerBrowserAddress, ServerBrowserName, ServerIP, Port, Client)
|
PingMasterServer(1, ServerBrowserAddress, ServerBrowserName, ServerIP, Port, Client)
|
||||||
|
|
|
||||||
|
|
@ -460,8 +460,7 @@ function LoadTripcode(Player)
|
||||||
end
|
end
|
||||||
|
|
||||||
function PingMasterServer(online, ServerBrowserAddress, ServerBrowserName, ServerIP, Port, Client)
|
function PingMasterServer(online, ServerBrowserAddress, ServerBrowserName, ServerIP, Port, Client)
|
||||||
local PlayerService = game:GetService("Players")
|
local pingURL = "http://" .. ServerBrowserAddress .. "/query.php?name=" .. ServerBrowserName .. "&ip=" .. ServerIP .. "&port=" .. Port .. "&client=" .. Client
|
||||||
local pingURL = "http://" .. ServerBrowserAddress .. "/query.php?name=" .. ServerBrowserName .. "&ip=" .. ServerIP .. "&port=" .. Port .. "&client=" .. Client .. "&players=" .. PlayerService.NumPlayers .. "&maxplayers=" .. PlayerService.MaxPlayers
|
|
||||||
game:HttpGet(pingURL .. "&online=" .. online)
|
game:HttpGet(pingURL .. "&online=" .. online)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -511,8 +510,6 @@ function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Noti
|
||||||
Child.Name = "ServerReplicator"
|
Child.Name = "ServerReplicator"
|
||||||
end
|
end
|
||||||
|
|
||||||
PingMasterServer(1, ServerBrowserAddress, ServerBrowserName, ServerIP, Port, Client)
|
|
||||||
|
|
||||||
while true do
|
while true do
|
||||||
wait(0.001)
|
wait(0.001)
|
||||||
if (Player.Character ~= nil) then
|
if (Player.Character ~= nil) then
|
||||||
|
|
@ -533,8 +530,6 @@ function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Noti
|
||||||
if (showServerNotifications) then
|
if (showServerNotifications) then
|
||||||
game.Players:Chat("Player '" .. Player.Name .. "' left")
|
game.Players:Chat("Player '" .. Player.Name .. "' left")
|
||||||
end
|
end
|
||||||
|
|
||||||
PingMasterServer(1, ServerBrowserAddress, ServerBrowserName, ServerIP, Port, Client)
|
|
||||||
end)
|
end)
|
||||||
InitalizeSecurityValues(game.Lighting,ClientEXEMD5,LauncherMD5,ClientScriptMD5)
|
InitalizeSecurityValues(game.Lighting,ClientEXEMD5,LauncherMD5,ClientScriptMD5)
|
||||||
PingMasterServer(1, ServerBrowserAddress, ServerBrowserName, ServerIP, Port, Client)
|
PingMasterServer(1, ServerBrowserAddress, ServerBrowserName, ServerIP, Port, Client)
|
||||||
|
|
|
||||||
|
|
@ -463,8 +463,7 @@ function LoadTripcode(Player)
|
||||||
end
|
end
|
||||||
|
|
||||||
function PingMasterServer(online, ServerBrowserAddress, ServerBrowserName, ServerIP, Port, Client)
|
function PingMasterServer(online, ServerBrowserAddress, ServerBrowserName, ServerIP, Port, Client)
|
||||||
local PlayerService = game:GetService("Players")
|
local pingURL = "http://" .. ServerBrowserAddress .. "/query.php?name=" .. ServerBrowserName .. "&ip=" .. ServerIP .. "&port=" .. Port .. "&client=" .. Client
|
||||||
local pingURL = "http://" .. ServerBrowserAddress .. "/query.php?name=" .. ServerBrowserName .. "&ip=" .. ServerIP .. "&port=" .. Port .. "&client=" .. Client .. "&players=" .. PlayerService.NumPlayers .. "&maxplayers=" .. PlayerService.MaxPlayers
|
|
||||||
game:HttpGet(pingURL .. "&online=" .. online)
|
game:HttpGet(pingURL .. "&online=" .. online)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -511,8 +510,6 @@ function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Noti
|
||||||
for _,Child in pairs(NetworkServer:GetChildren()) do
|
for _,Child in pairs(NetworkServer:GetChildren()) do
|
||||||
Child.Name = "ServerReplicator"
|
Child.Name = "ServerReplicator"
|
||||||
end
|
end
|
||||||
|
|
||||||
PingMasterServer(1, ServerBrowserAddress, ServerBrowserName, ServerIP, Port, Client)
|
|
||||||
end)
|
end)
|
||||||
|
|
||||||
Player.Changed:connect(function(Property)
|
Player.Changed:connect(function(Property)
|
||||||
|
|
@ -534,8 +531,6 @@ function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Noti
|
||||||
if (showServerNotifications) then
|
if (showServerNotifications) then
|
||||||
game.Players:Chat("Player '" .. Player.Name .. "' left")
|
game.Players:Chat("Player '" .. Player.Name .. "' left")
|
||||||
end
|
end
|
||||||
|
|
||||||
PingMasterServer(1, ServerBrowserAddress, ServerBrowserName, ServerIP, Port, Client)
|
|
||||||
end)
|
end)
|
||||||
RunService:Run()
|
RunService:Run()
|
||||||
game.Workspace:InsertContent("rbxasset://Fonts//libraries.rbxm")
|
game.Workspace:InsertContent("rbxasset://Fonts//libraries.rbxm")
|
||||||
|
|
|
||||||
|
|
@ -463,8 +463,7 @@ function LoadTripcode(Player)
|
||||||
end
|
end
|
||||||
|
|
||||||
function PingMasterServer(online, ServerBrowserAddress, ServerBrowserName, ServerIP, Port, Client)
|
function PingMasterServer(online, ServerBrowserAddress, ServerBrowserName, ServerIP, Port, Client)
|
||||||
local PlayerService = game:GetService("Players")
|
local pingURL = "http://" .. ServerBrowserAddress .. "/query.php?name=" .. ServerBrowserName .. "&ip=" .. ServerIP .. "&port=" .. Port .. "&client=" .. Client
|
||||||
local pingURL = "http://" .. ServerBrowserAddress .. "/query.php?name=" .. ServerBrowserName .. "&ip=" .. ServerIP .. "&port=" .. Port .. "&client=" .. Client .. "&players=" .. PlayerService.NumPlayers .. "&maxplayers=" .. PlayerService.MaxPlayers
|
|
||||||
game:HttpGet(pingURL .. "&online=" .. online)
|
game:HttpGet(pingURL .. "&online=" .. online)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -511,8 +510,6 @@ function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Noti
|
||||||
for _,Child in pairs(NetworkServer:GetChildren()) do
|
for _,Child in pairs(NetworkServer:GetChildren()) do
|
||||||
Child.Name = "ServerReplicator"
|
Child.Name = "ServerReplicator"
|
||||||
end
|
end
|
||||||
|
|
||||||
PingMasterServer(1, ServerBrowserAddress, ServerBrowserName, ServerIP, Port, Client)
|
|
||||||
end)
|
end)
|
||||||
|
|
||||||
Player.Changed:connect(function(Property)
|
Player.Changed:connect(function(Property)
|
||||||
|
|
@ -534,8 +531,6 @@ function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Noti
|
||||||
if (showServerNotifications) then
|
if (showServerNotifications) then
|
||||||
game.Players:Chat("Player '" .. Player.Name .. "' left")
|
game.Players:Chat("Player '" .. Player.Name .. "' left")
|
||||||
end
|
end
|
||||||
|
|
||||||
PingMasterServer(1, ServerBrowserAddress, ServerBrowserName, ServerIP, Port, Client)
|
|
||||||
end)
|
end)
|
||||||
RunService:Run()
|
RunService:Run()
|
||||||
game.Workspace:InsertContent("rbxasset://Fonts//libraries.rbxm")
|
game.Workspace:InsertContent("rbxasset://Fonts//libraries.rbxm")
|
||||||
|
|
|
||||||
|
|
@ -481,8 +481,7 @@ function LoadTripcode(Player)
|
||||||
end
|
end
|
||||||
|
|
||||||
function PingMasterServer(online, ServerBrowserAddress, ServerBrowserName, ServerIP, Port, Client)
|
function PingMasterServer(online, ServerBrowserAddress, ServerBrowserName, ServerIP, Port, Client)
|
||||||
local PlayerService = game:GetService("Players")
|
local pingURL = "http://" .. ServerBrowserAddress .. "/query.php?name=" .. ServerBrowserName .. "&ip=" .. ServerIP .. "&port=" .. Port .. "&client=" .. Client
|
||||||
local pingURL = "http://" .. ServerBrowserAddress .. "/query.php?name=" .. ServerBrowserName .. "&ip=" .. ServerIP .. "&port=" .. Port .. "&client=" .. Client .. "&players=" .. PlayerService.NumPlayers .. "&maxplayers=" .. PlayerService.MaxPlayers
|
|
||||||
game:HttpGet(pingURL .. "&online=" .. online)
|
game:HttpGet(pingURL .. "&online=" .. online)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -524,8 +523,6 @@ function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Noti
|
||||||
if (char ~= nil) then
|
if (char ~= nil) then
|
||||||
LoadCharacterNew(newWaitForChildSecurity(Player,"Appearance"),char)
|
LoadCharacterNew(newWaitForChildSecurity(Player,"Appearance"),char)
|
||||||
end
|
end
|
||||||
|
|
||||||
PingMasterServer(1, ServerBrowserAddress, ServerBrowserName, ServerIP, Port, Client)
|
|
||||||
end)
|
end)
|
||||||
|
|
||||||
Player.Changed:connect(function(Property)
|
Player.Changed:connect(function(Property)
|
||||||
|
|
@ -547,8 +544,6 @@ function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Noti
|
||||||
if (showServerNotifications) then
|
if (showServerNotifications) then
|
||||||
game.Players:Chat("Player '" .. Player.Name .. "' left")
|
game.Players:Chat("Player '" .. Player.Name .. "' left")
|
||||||
end
|
end
|
||||||
|
|
||||||
PingMasterServer(1, ServerBrowserAddress, ServerBrowserName, ServerIP, Port, Client)
|
|
||||||
end)
|
end)
|
||||||
RunService:Run()
|
RunService:Run()
|
||||||
game.Workspace:InsertContent("rbxasset://Fonts//libraries.rbxm")
|
game.Workspace:InsertContent("rbxasset://Fonts//libraries.rbxm")
|
||||||
|
|
|
||||||
|
|
@ -472,8 +472,7 @@ function LoadTripcode(Player)
|
||||||
end
|
end
|
||||||
|
|
||||||
function PingMasterServer(online, ServerBrowserAddress, ServerBrowserName, ServerIP, Port, Client)
|
function PingMasterServer(online, ServerBrowserAddress, ServerBrowserName, ServerIP, Port, Client)
|
||||||
local PlayerService = game:GetService("Players")
|
local pingURL = "http://" .. ServerBrowserAddress .. "/query.php?name=" .. ServerBrowserName .. "&ip=" .. ServerIP .. "&port=" .. Port .. "&client=" .. Client
|
||||||
local pingURL = "http://" .. ServerBrowserAddress .. "/query.php?name=" .. ServerBrowserName .. "&ip=" .. ServerIP .. "&port=" .. Port .. "&client=" .. Client .. "&players=" .. PlayerService.NumPlayers .. "&maxplayers=" .. PlayerService.MaxPlayers
|
|
||||||
game:HttpGet(pingURL .. "&online=" .. online)
|
game:HttpGet(pingURL .. "&online=" .. online)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -515,8 +514,6 @@ function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Noti
|
||||||
if (char ~= nil) then
|
if (char ~= nil) then
|
||||||
LoadCharacterNew(newWaitForChildSecurity(Player,"Appearance"),char)
|
LoadCharacterNew(newWaitForChildSecurity(Player,"Appearance"),char)
|
||||||
end
|
end
|
||||||
|
|
||||||
PingMasterServer(1, ServerBrowserAddress, ServerBrowserName, ServerIP, Port, Client)
|
|
||||||
end)
|
end)
|
||||||
|
|
||||||
Player.Changed:connect(function(Property)
|
Player.Changed:connect(function(Property)
|
||||||
|
|
@ -538,8 +535,6 @@ function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Noti
|
||||||
if (showServerNotifications) then
|
if (showServerNotifications) then
|
||||||
game.Players:Chat("Player '" .. Player.Name .. "' left")
|
game.Players:Chat("Player '" .. Player.Name .. "' left")
|
||||||
end
|
end
|
||||||
|
|
||||||
PingMasterServer(1, ServerBrowserAddress, ServerBrowserName, ServerIP, Port, Client)
|
|
||||||
end)
|
end)
|
||||||
RunService:Run()
|
RunService:Run()
|
||||||
game.Workspace:InsertContent("rbxasset://Fonts//libraries.rbxm")
|
game.Workspace:InsertContent("rbxasset://Fonts//libraries.rbxm")
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue