remove web server. implement more server browser stuff
This commit is contained in:
parent
cbe44f75fe
commit
ce8caef153
|
|
@ -33,7 +33,6 @@ namespace NovetusCMD
|
|||
GlobalFuncs.ConsolePrint("-client <client name> | Sets the client.", 4, true);
|
||||
GlobalFuncs.ConsolePrint("-port <port number> | Sets the server port.", 4, true);
|
||||
GlobalFuncs.ConsolePrint("-maxplayers <number of players> | Sets the number of players.", 4, true);
|
||||
GlobalFuncs.ConsolePrint("-webserver <true/false> | Toggles launching of the web server.", 4, true);
|
||||
GlobalFuncs.ConsolePrint("-notifications <true/false> | Toggles server join/leave notifications.", 4, true);
|
||||
GlobalFuncs.ConsolePrint("---------", 1, true);
|
||||
GlobalFuncs.ConsolePrint("How to launch:", 3, true);
|
||||
|
|
|
|||
|
|
@ -72,8 +72,6 @@ namespace NovetusCMD
|
|||
GlobalFuncs.ConsolePrint("UPnP: Device '" + IP + "' registered.", 3);
|
||||
StartUPnP(device, Protocol.Udp, GlobalVars.UserConfiguration.RobloxPort);
|
||||
StartUPnP(device, Protocol.Tcp, GlobalVars.UserConfiguration.RobloxPort);
|
||||
StartUPnP(device, Protocol.Udp, GlobalVars.UserConfiguration.WebServerPort);
|
||||
StartUPnP(device, Protocol.Tcp, GlobalVars.UserConfiguration.WebServerPort);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
@ -90,8 +88,6 @@ namespace NovetusCMD
|
|||
GlobalFuncs.ConsolePrint("UPnP: Device '" + IP + "' disconnected.", 3);
|
||||
StopUPnP(device, Protocol.Udp, GlobalVars.UserConfiguration.RobloxPort);
|
||||
StopUPnP(device, Protocol.Tcp, GlobalVars.UserConfiguration.RobloxPort);
|
||||
StopUPnP(device, Protocol.Udp, GlobalVars.UserConfiguration.WebServerPort);
|
||||
StopUPnP(device, Protocol.Tcp, GlobalVars.UserConfiguration.WebServerPort);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
@ -100,49 +96,6 @@ namespace NovetusCMD
|
|||
}
|
||||
#endregion
|
||||
|
||||
#region Web Server
|
||||
static void StartWebServer()
|
||||
{
|
||||
if (SecurityFuncs.IsElevated)
|
||||
{
|
||||
try
|
||||
{
|
||||
GlobalVars.WebServer = new SimpleHTTPServer(GlobalPaths.DataPath, GlobalVars.UserConfiguration.WebServerPort);
|
||||
GlobalFuncs.ConsolePrint("WebServer: Server is running on port: " + GlobalVars.WebServer.Port.ToString(), 3);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
GlobalFuncs.ConsolePrint("WebServer: Failed to launch WebServer. Some features may not function. (" + ex.Message + ")", 2);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
GlobalFuncs.ConsolePrint("WebServer: Failed to launch WebServer. Some features may not function. (Did not run as Administrator)", 2);
|
||||
}
|
||||
}
|
||||
|
||||
static void StopWebServer()
|
||||
{
|
||||
if (SecurityFuncs.IsElevated)
|
||||
{
|
||||
try
|
||||
{
|
||||
GlobalFuncs.ConsolePrint("WebServer: Server has stopped on port: " + GlobalVars.WebServer.Port.ToString(), 2);
|
||||
GlobalVars.WebServer.Stop();
|
||||
GlobalVars.WebServer = null;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
GlobalFuncs.ConsolePrint("WebServer: Failed to stop WebServer. Some features may not function. (" + ex.Message + ")", 2);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
GlobalFuncs.ConsolePrint("WebServer: Failed to stop WebServer. Some features may not function. (Did not run as Administrator)", 2);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Loading/Saving files
|
||||
static void WriteConfigValues()
|
||||
{
|
||||
|
|
@ -201,11 +154,6 @@ namespace NovetusCMD
|
|||
LoadOverrideINIArgs(args);
|
||||
InitUPnP();
|
||||
|
||||
if (GlobalVars.UserConfiguration.WebServer)
|
||||
{
|
||||
StartWebServer();
|
||||
}
|
||||
|
||||
AppDomain.CurrentDomain.ProcessExit += new EventHandler(ProgramClose);
|
||||
|
||||
GlobalFuncs.ConsolePrint("Launching a " + GlobalVars.UserConfiguration.SelectedClient + " server on " + GlobalVars.UserConfiguration.Map + " with " + GlobalVars.UserConfiguration.PlayerLimit + " players.", 1);
|
||||
|
|
@ -244,10 +192,6 @@ namespace NovetusCMD
|
|||
{
|
||||
WriteConfigValues();
|
||||
}
|
||||
if (GlobalVars.IsWebServerOn)
|
||||
{
|
||||
StopWebServer();
|
||||
}
|
||||
Application.Exit();
|
||||
}
|
||||
|
||||
|
|
@ -306,21 +250,6 @@ namespace NovetusCMD
|
|||
GlobalFuncs.ConsolePrint("NovetusCMD will now use UPnP for port forwarding.", 4);
|
||||
}
|
||||
|
||||
if (CommandLine["webserver"] != null)
|
||||
{
|
||||
LocalVars.OverrideINI = true;
|
||||
GlobalVars.UserConfiguration.WebServer = Convert.ToBoolean(CommandLine["webserver"]);
|
||||
|
||||
if (GlobalVars.UserConfiguration.WebServer)
|
||||
{
|
||||
GlobalFuncs.ConsolePrint("NovetusCMD will now launch the Web Server.", 4);
|
||||
}
|
||||
else
|
||||
{
|
||||
GlobalFuncs.ConsolePrint("NovetusCMD will no longer launch the Web Server.", 4);
|
||||
}
|
||||
}
|
||||
|
||||
if (CommandLine["notifications"] != null)
|
||||
{
|
||||
LocalVars.OverrideINI = true;
|
||||
|
|
|
|||
|
|
@ -60,10 +60,10 @@ public class FileFormat
|
|||
ReShadePerformanceMode = false;
|
||||
AssetLocalizerSaveBackups = true;
|
||||
AlternateServerIP = "";
|
||||
WebServerPort = 40735;
|
||||
WebServer = true;
|
||||
DisableReshadeDelete = false;
|
||||
ShowServerNotifications = true;
|
||||
ServerBrowserServerName = "Novetus";
|
||||
ServerBrowserServerAddress = "localhost:" + RobloxPort;
|
||||
}
|
||||
|
||||
public string SelectedClient { get; set; }
|
||||
|
|
@ -87,10 +87,10 @@ public class FileFormat
|
|||
public bool ReShadePerformanceMode { get; set; }
|
||||
public bool AssetLocalizerSaveBackups { get; set; }
|
||||
public string AlternateServerIP { get; set; }
|
||||
public int WebServerPort { get; set; }
|
||||
public bool WebServer { get; set; }
|
||||
public bool DisableReshadeDelete { get; set; }
|
||||
public bool ShowServerNotifications { get; set; }
|
||||
public string ServerBrowserServerName { get; set; }
|
||||
public string ServerBrowserServerAddress { get; set; }
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
|
|
|||
|
|
@ -1,268 +0,0 @@
|
|||
#region Usings
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
using System.Net.Sockets;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Web;
|
||||
using System.Windows.Forms;
|
||||
#endregion
|
||||
|
||||
#region Simple HTTP Server
|
||||
// Modified from https://gist.github.com/aksakalli/9191056
|
||||
// MIT License - Copyright (c) 2016 Can Güney Aksakalli
|
||||
// https://aksakalli.github.io/2014/02/24/simple-http-server-with-csparp.html
|
||||
public class SimpleHTTPServer
|
||||
{
|
||||
|
||||
private readonly string[] _indexFiles = {
|
||||
"index.html",
|
||||
"index.htm",
|
||||
"index.php",
|
||||
"default.html",
|
||||
"default.htm",
|
||||
"default.php"
|
||||
};
|
||||
|
||||
private static IDictionary<string, string> _mimeTypeMappings = new Dictionary<string, string>(StringComparer.InvariantCultureIgnoreCase) {
|
||||
{ ".asf", "video/x-ms-asf" },
|
||||
{ ".asx", "video/x-ms-asf" },
|
||||
{ ".avi", "video/x-msvideo" },
|
||||
{ ".bin", "application/octet-stream" },
|
||||
{ ".cco", "application/x-cocoa" },
|
||||
{ ".crt", "application/x-x509-ca-cert" },
|
||||
{ ".css", "text/css" },
|
||||
{ ".deb", "application/octet-stream" },
|
||||
{ ".der", "application/x-x509-ca-cert" },
|
||||
{ ".dll", "application/octet-stream" },
|
||||
{ ".dmg", "application/octet-stream" },
|
||||
{ ".ear", "application/java-archive" },
|
||||
{ ".eot", "application/octet-stream" },
|
||||
{ ".exe", "application/octet-stream" },
|
||||
{ ".flv", "video/x-flv" },
|
||||
{ ".gif", "image/gif" },
|
||||
{ ".hqx", "application/mac-binhex40" },
|
||||
{ ".htc", "text/x-component" },
|
||||
{ ".htm", "text/html" },
|
||||
{ ".html", "text/html" },
|
||||
{ ".ico", "image/x-icon" },
|
||||
{ ".img", "application/octet-stream" },
|
||||
{ ".iso", "application/octet-stream" },
|
||||
{ ".jar", "application/java-archive" },
|
||||
{ ".jardiff", "application/x-java-archive-diff" },
|
||||
{ ".jng", "image/x-jng" },
|
||||
{ ".jnlp", "application/x-java-jnlp-file" },
|
||||
{ ".jpeg", "image/jpeg" },
|
||||
{ ".jpg", "image/jpeg" },
|
||||
{ ".js", "application/x-javascript" },
|
||||
{ ".mml", "text/mathml" },
|
||||
{ ".mng", "video/x-mng" },
|
||||
{ ".mov", "video/quicktime" },
|
||||
{ ".mp3", "audio/mpeg" },
|
||||
{ ".mpeg", "video/mpeg" },
|
||||
{ ".mpg", "video/mpeg" },
|
||||
{ ".msi", "application/octet-stream" },
|
||||
{ ".msm", "application/octet-stream" },
|
||||
{ ".msp", "application/octet-stream" },
|
||||
{ ".pdb", "application/x-pilot" },
|
||||
{ ".pdf", "application/pdf" },
|
||||
{ ".pem", "application/x-x509-ca-cert" },
|
||||
{ ".php", "text/html" },
|
||||
{ ".pl", "application/x-perl" },
|
||||
{ ".pm", "application/x-perl" },
|
||||
{ ".png", "image/png" },
|
||||
{ ".prc", "application/x-pilot" },
|
||||
{ ".ra", "audio/x-realaudio" },
|
||||
{ ".rar", "application/x-rar-compressed" },
|
||||
{ ".rpm", "application/x-redhat-package-manager" },
|
||||
{ ".rss", "text/xml" },
|
||||
{ ".run", "application/x-makeself" },
|
||||
{ ".sea", "application/x-sea" },
|
||||
{ ".shtml", "text/html" },
|
||||
{ ".sit", "application/x-stuffit" },
|
||||
{ ".swf", "application/x-shockwave-flash" },
|
||||
{ ".tcl", "application/x-tcl" },
|
||||
{ ".tk", "application/x-tcl" },
|
||||
{ ".txt", "text/plain" },
|
||||
{ ".war", "application/java-archive" },
|
||||
{ ".wbmp", "image/vnd.wap.wbmp" },
|
||||
{ ".wmv", "video/x-ms-wmv" },
|
||||
{ ".xml", "text/xml" },
|
||||
{ ".xpi", "application/x-xpinstall" },
|
||||
{ ".zip", "application/zip" },
|
||||
};
|
||||
private Thread _serverThread;
|
||||
private string _rootDirectory;
|
||||
private HttpListener _listener;
|
||||
private int _port;
|
||||
|
||||
public int Port
|
||||
{
|
||||
get { return _port; }
|
||||
private set { }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Construct server with given port.
|
||||
/// </summary>
|
||||
/// <param name="path">Directory path to serve.</param>
|
||||
/// <param name="port">Port of the server.</param>
|
||||
public SimpleHTTPServer(string path, int port)
|
||||
{
|
||||
this.Initialize(path, port);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Construct server with suitable port.
|
||||
/// </summary>
|
||||
/// <param name="path">Directory path to serve.</param>
|
||||
public SimpleHTTPServer(string path)
|
||||
{
|
||||
//get an empty port
|
||||
TcpListener l = new TcpListener(IPAddress.Loopback, 0);
|
||||
l.Start();
|
||||
int port = ((IPEndPoint)l.LocalEndpoint).Port;
|
||||
l.Stop();
|
||||
this.Initialize(path, port);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Stop server and dispose all functions.
|
||||
/// </summary>
|
||||
public void Stop()
|
||||
{
|
||||
_listener.Prefixes.Clear();
|
||||
_listener.Stop();
|
||||
GlobalVars.IsWebServerOn = false;
|
||||
_serverThread.Abort();
|
||||
}
|
||||
|
||||
private void Listen()
|
||||
{
|
||||
try
|
||||
{
|
||||
_listener = new HttpListener();
|
||||
_listener.Prefixes.Add("http://*:" + _port.ToString() + "/");
|
||||
_listener.Start();
|
||||
while (true)
|
||||
{
|
||||
HttpListenerContext context = _listener.GetContext();
|
||||
Process(context);
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
Stop();
|
||||
}
|
||||
}
|
||||
|
||||
private string ProcessPhpPage(string phpCompilerPath, string pageFileName, string query)
|
||||
{
|
||||
Process proc = new Process();
|
||||
proc.StartInfo.FileName = phpCompilerPath;
|
||||
var args = HttpUtility.ParseQueryString(query);
|
||||
string argString = "";
|
||||
foreach (var k in args.AllKeys)
|
||||
{
|
||||
argString += args[k] + " ";
|
||||
}
|
||||
proc.StartInfo.Arguments = "-d \"display_errors=1\" -d \"error_reporting=E_PARSE\" -d \"opcache.enable_cli=0\" -d \"opcache.enable=0\" \"" + pageFileName + "\" " + argString;
|
||||
proc.StartInfo.CreateNoWindow = true;
|
||||
proc.StartInfo.UseShellExecute = false;
|
||||
proc.StartInfo.RedirectStandardOutput = true;
|
||||
proc.StartInfo.RedirectStandardError = true;
|
||||
proc.Start();
|
||||
string res = proc.StandardOutput.ReadToEnd();
|
||||
proc.StandardOutput.Close();
|
||||
proc.Close();
|
||||
return res;
|
||||
}
|
||||
|
||||
private void Process(HttpListenerContext context)
|
||||
{
|
||||
bool HasLoaded = false;
|
||||
string filename = context.Request.Url.AbsolutePath;
|
||||
filename = filename.Substring(1);
|
||||
|
||||
if (string.IsNullOrEmpty(filename))
|
||||
{
|
||||
foreach (string indexFile in _indexFiles)
|
||||
{
|
||||
if (File.Exists(Path.Combine(_rootDirectory, indexFile)))
|
||||
{
|
||||
filename = indexFile;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
filename = Path.Combine(_rootDirectory, filename);
|
||||
|
||||
if (File.Exists(filename))
|
||||
{
|
||||
try
|
||||
{
|
||||
var ext = new FileInfo(filename);
|
||||
|
||||
if (ext.Extension == ".php")
|
||||
{
|
||||
string output = ProcessPhpPage(GlobalPaths.ConfigDirData + "\\php\\php.exe", filename, context.Request.Url.Query);
|
||||
byte[] input = ASCIIEncoding.UTF8.GetBytes(output);
|
||||
//Adding permanent http response headers
|
||||
string mime;
|
||||
context.Response.ContentType = _mimeTypeMappings.TryGetValue(Path.GetExtension(filename), out mime) ? mime : "application/octet-stream";
|
||||
context.Response.ContentLength64 = input.Length;
|
||||
context.Response.AddHeader("Date", DateTime.Now.ToString("r"));
|
||||
context.Response.AddHeader("Last-Modified", System.IO.File.GetLastWriteTime(filename).ToString("r"));
|
||||
context.Response.OutputStream.Write(input, 0, input.Length);
|
||||
context.Response.StatusCode = (int)HttpStatusCode.OK;
|
||||
context.Response.OutputStream.Flush();
|
||||
HasLoaded = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
Stream input = new FileStream(filename, FileMode.Open);
|
||||
//Adding permanent http response headers
|
||||
string mime;
|
||||
context.Response.ContentType = _mimeTypeMappings.TryGetValue(Path.GetExtension(filename), out mime) ? mime : "application/octet-stream";
|
||||
context.Response.ContentLength64 = input.Length;
|
||||
context.Response.AddHeader("Date", DateTime.Now.ToString("r"));
|
||||
context.Response.AddHeader("Last-Modified", System.IO.File.GetLastWriteTime(filename).ToString("r"));
|
||||
|
||||
byte[] buffer = new byte[1024 * 16];
|
||||
int nbytes;
|
||||
while ((nbytes = input.Read(buffer, 0, buffer.Length)) > 0)
|
||||
context.Response.OutputStream.Write(buffer, 0, nbytes);
|
||||
input.Close();
|
||||
|
||||
context.Response.StatusCode = (int)HttpStatusCode.OK;
|
||||
context.Response.OutputStream.Flush();
|
||||
HasLoaded = true;
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
context.Response.StatusCode = (int)HttpStatusCode.InternalServerError;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (HasLoaded)
|
||||
{
|
||||
context.Response.OutputStream.Close();
|
||||
}
|
||||
}
|
||||
|
||||
private void Initialize(string path, int port)
|
||||
{
|
||||
this._rootDirectory = path;
|
||||
this._port = port;
|
||||
_serverThread = new Thread(this.Listen);
|
||||
_serverThread.Start();
|
||||
GlobalVars.IsWebServerOn = true;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
|
@ -18,7 +18,6 @@
|
|||
<Compile Include="$(MSBuildThisFileDirectory)Classes\INIFile.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Classes\RobloxXML.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Classes\Settings.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Classes\SimpleHTTPServer.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Classes\TextLineRemover.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)SDK\Downloader.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)SDK\SDKFuncs.cs" />
|
||||
|
|
|
|||
|
|
@ -120,10 +120,10 @@ public class GlobalFuncs
|
|||
ini.IniWriteValue(section, "Style", Settings.UIOptions.GetIntForStyle(GlobalVars.UserConfiguration.LauncherStyle).ToString());
|
||||
ini.IniWriteValue(section, "AssetLocalizerSaveBackups", GlobalVars.UserConfiguration.AssetLocalizerSaveBackups.ToString());
|
||||
ini.IniWriteValue(section, "AlternateServerIP", GlobalVars.UserConfiguration.AlternateServerIP.ToString());
|
||||
ini.IniWriteValue(section, "WebServerPort", GlobalVars.UserConfiguration.WebServerPort.ToString());
|
||||
ini.IniWriteValue(section, "WebServer", GlobalVars.UserConfiguration.WebServer.ToString());
|
||||
ini.IniWriteValue(section, "DisableReshadeDelete", GlobalVars.UserConfiguration.DisableReshadeDelete.ToString());
|
||||
ini.IniWriteValue(section, "ShowServerNotifications", GlobalVars.UserConfiguration.ShowServerNotifications.ToString());
|
||||
ini.IniWriteValue(section, "ServerBrowserServerName", GlobalVars.UserConfiguration.ServerBrowserServerName.ToString());
|
||||
ini.IniWriteValue(section, "ServerBrowserServerAddress", GlobalVars.UserConfiguration.ServerBrowserServerAddress.ToString());
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -133,7 +133,8 @@ public class GlobalFuncs
|
|||
string closeonlaunch, userid, name, selectedclient,
|
||||
map, port, limit, upnp,
|
||||
disablehelpmessage, tripcode, discord, mappath, mapsnip,
|
||||
graphics, reshade, qualitylevel, style, savebackups, altIP, WS, WSPort, disReshadeDel, showNotifs;
|
||||
graphics, reshade, qualitylevel, style, savebackups, altIP,
|
||||
disReshadeDel, showNotifs, SB_Name, SB_Address;
|
||||
|
||||
INIFile ini = new INIFile(cfgpath);
|
||||
|
||||
|
|
@ -158,10 +159,10 @@ public class GlobalFuncs
|
|||
style = ini.IniReadValue(section, "Style", Settings.UIOptions.GetIntForStyle(GlobalVars.UserConfiguration.LauncherStyle).ToString());
|
||||
savebackups = ini.IniReadValue(section, "AssetLocalizerSaveBackups", GlobalVars.UserConfiguration.AssetLocalizerSaveBackups.ToString());
|
||||
altIP = ini.IniReadValue(section, "AlternateServerIP", GlobalVars.UserConfiguration.AlternateServerIP.ToString());
|
||||
WSPort = ini.IniReadValue(section, "WebServerPort", GlobalVars.UserConfiguration.WebServerPort.ToString());
|
||||
WS = ini.IniReadValue(section, "WebServer", GlobalVars.UserConfiguration.WebServer.ToString());
|
||||
disReshadeDel = ini.IniReadValue(section, "DisableReshadeDelete", GlobalVars.UserConfiguration.DisableReshadeDelete.ToString());
|
||||
showNotifs = ini.IniReadValue(section, "ShowServerNotifications", GlobalVars.UserConfiguration.ShowServerNotifications.ToString());
|
||||
SB_Name = ini.IniReadValue(section, "ServerBrowserServerName", GlobalVars.UserConfiguration.ServerBrowserServerName.ToString());
|
||||
SB_Address = ini.IniReadValue(section, "ServerBrowserServerAddress", GlobalVars.UserConfiguration.ServerBrowserServerAddress.ToString());
|
||||
|
||||
GlobalVars.UserConfiguration.CloseOnLaunch = Convert.ToBoolean(closeonlaunch);
|
||||
|
||||
|
|
@ -213,10 +214,10 @@ public class GlobalFuncs
|
|||
GlobalVars.UserConfiguration.LauncherStyle = Settings.UIOptions.GetStyleForInt(Convert.ToInt32(style));
|
||||
GlobalVars.UserConfiguration.AssetLocalizerSaveBackups = Convert.ToBoolean(savebackups);
|
||||
GlobalVars.UserConfiguration.AlternateServerIP = altIP;
|
||||
GlobalVars.UserConfiguration.WebServerPort = Convert.ToInt32(WSPort);
|
||||
GlobalVars.UserConfiguration.WebServer = Convert.ToBoolean(WS);
|
||||
GlobalVars.UserConfiguration.DisableReshadeDelete = Convert.ToBoolean(disReshadeDel);
|
||||
GlobalVars.UserConfiguration.ShowServerNotifications = Convert.ToBoolean(showNotifs);
|
||||
GlobalVars.UserConfiguration.ServerBrowserServerName = SB_Name;
|
||||
GlobalVars.UserConfiguration.ServerBrowserServerAddress = SB_Address;
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
|
|
@ -1271,7 +1272,6 @@ public class GlobalFuncs
|
|||
+ mapfile
|
||||
+ "\" -script \" dofile('" + luafile + "'); "
|
||||
+ ScriptFuncs.Generator.GetScriptFuncForType(ClientName, type)
|
||||
+ "; "
|
||||
+ (!string.IsNullOrWhiteSpace(GlobalPaths.AddonScriptPath) ? " dofile('" + GlobalPaths.AddonScriptPath + "');" : "")
|
||||
+ quote
|
||||
+ (no3d ? " -no3d" : "");
|
||||
|
|
@ -1524,11 +1524,7 @@ public class GlobalFuncs
|
|||
"Online URI Link:",
|
||||
URI,
|
||||
"Local URI Link:",
|
||||
URI2,
|
||||
GlobalVars.IsWebServerOn ? "Web Server URL:" : "",
|
||||
GlobalVars.IsWebServerOn ? "http://" + (!string.IsNullOrWhiteSpace(GlobalVars.UserConfiguration.AlternateServerIP) ? GlobalVars.UserConfiguration.AlternateServerIP : IP) + ":" + GlobalVars.WebServer.Port.ToString() : "",
|
||||
GlobalVars.IsWebServerOn ? "Local Web Server URL:" : "",
|
||||
GlobalVars.IsWebServerOn ? "http://localhost:" + (GlobalVars.WebServer.Port.ToString()).ToString() : ""
|
||||
URI2
|
||||
);
|
||||
|
||||
File.WriteAllText(GlobalPaths.BasePath + "\\" + GlobalVars.ServerInfoFileName, GlobalFuncs.RemoveEmptyLines(text));
|
||||
|
|
|
|||
|
|
@ -28,7 +28,6 @@ public static class GlobalVars
|
|||
public static FileFormat.Config UserConfiguration = new FileFormat.Config();
|
||||
public static FileFormat.ClientInfo SelectedClientInfo = new FileFormat.ClientInfo();
|
||||
public static FileFormat.CustomizationConfig UserCustomization = new FileFormat.CustomizationConfig();
|
||||
public static SimpleHTTPServer WebServer = null;
|
||||
#endregion
|
||||
|
||||
#region Joining
|
||||
|
|
@ -50,7 +49,6 @@ public static class GlobalVars
|
|||
#endregion
|
||||
|
||||
#region Booleans
|
||||
public static bool IsWebServerOn = false;
|
||||
public static bool IsSnapshot = false;
|
||||
public static bool LocalPlayMode = false;
|
||||
public static bool AdminMode = false;
|
||||
|
|
|
|||
|
|
@ -64,21 +64,26 @@ public class ScriptFuncs
|
|||
+ (info.UsesPlayerName ? GlobalVars.UserConfiguration.PlayerName : "Player") + "',"
|
||||
+ GlobalVars.Loadout + ","
|
||||
+ md5s + ",'"
|
||||
+ GlobalVars.UserConfiguration.PlayerTripcode + "')";
|
||||
+ GlobalVars.UserConfiguration.PlayerTripcode + "');";
|
||||
case ScriptType.Server:
|
||||
string IP = SecurityFuncs.GetExternalIPAddress();
|
||||
return "_G.CSServer("
|
||||
+ GlobalVars.UserConfiguration.RobloxPort + ","
|
||||
+ GlobalVars.UserConfiguration.PlayerLimit + ","
|
||||
+ md5s + ","
|
||||
+ GlobalVars.UserConfiguration.ShowServerNotifications.ToString().ToLower() + ")";
|
||||
+ GlobalVars.UserConfiguration.ShowServerNotifications.ToString().ToLower() + ",'"
|
||||
+ GlobalVars.UserConfiguration.ServerBrowserServerName + "','"
|
||||
+ GlobalVars.UserConfiguration.ServerBrowserServerAddress + "','"
|
||||
+ (!string.IsNullOrWhiteSpace(GlobalVars.UserConfiguration.AlternateServerIP) ? GlobalVars.UserConfiguration.AlternateServerIP : IP) + "','"
|
||||
+ GlobalVars.UserConfiguration.SelectedClient + "');";
|
||||
case ScriptType.Solo:
|
||||
case ScriptType.EasterEgg:
|
||||
return "_G.CSSolo("
|
||||
+ (info.UsesID ? GlobalVars.UserConfiguration.UserID : 0) + ",'"
|
||||
+ (info.UsesPlayerName ? GlobalVars.UserConfiguration.PlayerName : "Player") + "',"
|
||||
+ GlobalVars.soloLoadout + ")";
|
||||
+ GlobalVars.soloLoadout + ");";
|
||||
case ScriptType.Studio:
|
||||
return "_G.CSStudio()";
|
||||
return "_G.CSStudio();";
|
||||
default:
|
||||
return "";
|
||||
}
|
||||
|
|
@ -190,22 +195,26 @@ public class ScriptFuncs
|
|||
+ (GlobalVars.SelectedClientInfo.UsesPlayerName ? GlobalVars.UserConfiguration.PlayerName : "Player") + "',"
|
||||
+ GlobalVars.Loadout + ","
|
||||
+ md5s + ",'"
|
||||
+ GlobalVars.UserConfiguration.PlayerTripcode + "')";
|
||||
+ GlobalVars.UserConfiguration.PlayerTripcode + "');";
|
||||
case ScriptType.Server:
|
||||
string IP = SecurityFuncs.GetExternalIPAddress();
|
||||
return "dofile('" + luafile + "'); _G.CSServer("
|
||||
+ GlobalVars.UserConfiguration.RobloxPort + ","
|
||||
+ GlobalVars.UserConfiguration.PlayerLimit + ","
|
||||
+ md5s + ","
|
||||
+ GlobalVars.UserConfiguration.ShowServerNotifications.ToString().ToLower() + "); "
|
||||
+ GlobalVars.UserConfiguration.ShowServerNotifications.ToString().ToLower() + ",'"
|
||||
+ GlobalVars.UserConfiguration.ServerBrowserServerName + "','"
|
||||
+ GlobalVars.UserConfiguration.ServerBrowserServerAddress + "','"
|
||||
+ GlobalVars.UserConfiguration.SelectedClient + "'); "
|
||||
+ (!string.IsNullOrWhiteSpace(GlobalPaths.AddonScriptPath) ? " dofile('" + GlobalPaths.AddonScriptPath + "');" : "");
|
||||
case ScriptType.Solo:
|
||||
case ScriptType.EasterEgg:
|
||||
return "dofile('" + luafile + "'); _G.CSSolo("
|
||||
+ (GlobalVars.SelectedClientInfo.UsesID ? GlobalVars.UserConfiguration.UserID : 0) + ",'"
|
||||
+ (GlobalVars.SelectedClientInfo.UsesPlayerName ? GlobalVars.UserConfiguration.PlayerName : "Player") + "',"
|
||||
+ GlobalVars.soloLoadout + ")";
|
||||
+ GlobalVars.soloLoadout + ");";
|
||||
case ScriptType.Studio:
|
||||
return "dofile('" + luafile + "');";
|
||||
return "dofile('" + luafile + "'); _G.CSStudio();";
|
||||
default:
|
||||
return "";
|
||||
}
|
||||
|
|
@ -297,15 +306,6 @@ public class ScriptFuncs
|
|||
return "";
|
||||
}
|
||||
|
||||
string WebServer_CustomPlayerDir = "http://" + GlobalVars.IP + ":" + (GlobalVars.UserConfiguration.WebServerPort.ToString()).ToString() + "/charcustom/";
|
||||
string WebServer_HatDir = WebServer_CustomPlayerDir + "hats/";
|
||||
string WebServer_FaceDir = WebServer_CustomPlayerDir + "faces/";
|
||||
string WebServer_HeadDir = WebServer_CustomPlayerDir + "heads/";
|
||||
string WebServer_TShirtDir = WebServer_CustomPlayerDir + "tshirts/";
|
||||
string WebServer_ShirtDir = WebServer_CustomPlayerDir + "shirts/";
|
||||
string WebServer_PantsDir = WebServer_CustomPlayerDir + "pants/";
|
||||
string WebServer_ExtraDir = WebServer_CustomPlayerDir + "custom/";
|
||||
|
||||
#if LAUNCHER
|
||||
string md5dir = !info.AlreadyHasSecurity ? SecurityFuncs.GenerateMD5(Assembly.GetExecutingAssembly().Location) : "";
|
||||
#else
|
||||
|
|
@ -361,16 +361,6 @@ public class ScriptFuncs
|
|||
.Replace("%extrad%", GlobalPaths.extraGameDir + GlobalVars.UserCustomization.Extra)
|
||||
.Replace("%hat4d%", GlobalPaths.hatGameDir + GlobalVars.UserCustomization.Extra)
|
||||
.Replace("%args%", GetRawArgsForType(type, md5sd, luafile))
|
||||
.Replace("%facews%", GlobalVars.UserCustomization.Face.Contains("http://") ? GlobalVars.UserCustomization.Face : WebServer_FaceDir + GlobalVars.UserCustomization.Face)
|
||||
.Replace("%headws%", WebServer_HeadDir + GlobalVars.UserCustomization.Head)
|
||||
.Replace("%tshirtws%", GlobalVars.UserCustomization.TShirt.Contains("http://") ? GlobalVars.UserCustomization.TShirt : WebServer_TShirtDir + GlobalVars.UserCustomization.TShirt)
|
||||
.Replace("%shirtws%", GlobalVars.UserCustomization.Shirt.Contains("http://") ? GlobalVars.UserCustomization.Shirt : WebServer_ShirtDir + GlobalVars.UserCustomization.Shirt)
|
||||
.Replace("%pantsws%", GlobalVars.UserCustomization.Pants.Contains("http://") ? GlobalVars.UserCustomization.Pants : WebServer_PantsDir + GlobalVars.UserCustomization.Pants)
|
||||
.Replace("%hat1ws%", WebServer_HatDir + GlobalVars.UserCustomization.Hat1)
|
||||
.Replace("%hat2ws%", WebServer_HatDir + GlobalVars.UserCustomization.Hat2)
|
||||
.Replace("%hat3ws%", WebServer_HatDir + GlobalVars.UserCustomization.Hat3)
|
||||
.Replace("%extraws%", WebServer_ExtraDir + GlobalVars.UserCustomization.Extra)
|
||||
.Replace("%hat4ws%", WebServer_HatDir + GlobalVars.UserCustomization.Extra)
|
||||
.Replace("%mapfiled%", GlobalPaths.BaseGameDir + GlobalVars.UserConfiguration.MapPathSnip.Replace(@"\\", @"\").Replace(@"/", @"\"))
|
||||
.Replace("%mapfilec%", extractedCode.Contains("%mapfilec%") ? GlobalFuncs.CopyMapToRBXAsset() : "")
|
||||
.Replace("%tripcode%", GlobalVars.UserConfiguration.PlayerTripcode)
|
||||
|
|
|
|||
|
|
@ -58,8 +58,13 @@ namespace NovetusLauncher
|
|||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.textBox1 = new System.Windows.Forms.TextBox();
|
||||
this.tabPage2 = new System.Windows.Forms.TabPage();
|
||||
this.label6 = new System.Windows.Forms.Label();
|
||||
this.textBox8 = new System.Windows.Forms.TextBox();
|
||||
this.label17 = new System.Windows.Forms.Label();
|
||||
this.textBox7 = new System.Windows.Forms.TextBox();
|
||||
this.label9 = new System.Windows.Forms.Label();
|
||||
this.label20 = new System.Windows.Forms.Label();
|
||||
this.checkBox9 = new System.Windows.Forms.CheckBox();
|
||||
this.checkBox8 = new System.Windows.Forms.CheckBox();
|
||||
this.label19 = new System.Windows.Forms.Label();
|
||||
this.textBox3 = new System.Windows.Forms.TextBox();
|
||||
this.checkBox4 = new System.Windows.Forms.CheckBox();
|
||||
|
|
@ -360,8 +365,13 @@ namespace NovetusLauncher
|
|||
//
|
||||
// tabPage2
|
||||
//
|
||||
this.tabPage2.Controls.Add(this.label6);
|
||||
this.tabPage2.Controls.Add(this.textBox8);
|
||||
this.tabPage2.Controls.Add(this.label17);
|
||||
this.tabPage2.Controls.Add(this.textBox7);
|
||||
this.tabPage2.Controls.Add(this.label9);
|
||||
this.tabPage2.Controls.Add(this.label20);
|
||||
this.tabPage2.Controls.Add(this.checkBox9);
|
||||
this.tabPage2.Controls.Add(this.checkBox8);
|
||||
this.tabPage2.Controls.Add(this.label19);
|
||||
this.tabPage2.Controls.Add(this.textBox3);
|
||||
this.tabPage2.Controls.Add(this.checkBox4);
|
||||
|
|
@ -381,10 +391,61 @@ namespace NovetusLauncher
|
|||
this.tabPage2.ToolTipText = "Start a server for other players to play";
|
||||
this.tabPage2.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// label6
|
||||
//
|
||||
this.label6.AutoSize = true;
|
||||
this.label6.Location = new System.Drawing.Point(120, 119);
|
||||
this.label6.Name = "label6";
|
||||
this.label6.Size = new System.Drawing.Size(164, 13);
|
||||
this.label6.TabIndex = 84;
|
||||
this.label6.Text = "SERVER BROWSER OPTIONS:";
|
||||
//
|
||||
// textBox8
|
||||
//
|
||||
this.textBox8.Location = new System.Drawing.Point(299, 135);
|
||||
this.textBox8.Name = "textBox8";
|
||||
this.textBox8.Size = new System.Drawing.Size(100, 20);
|
||||
this.textBox8.TabIndex = 83;
|
||||
this.textBox8.TextChanged += new System.EventHandler(this.textBox8_TextChanged);
|
||||
//
|
||||
// label17
|
||||
//
|
||||
this.label17.AutoSize = true;
|
||||
this.label17.Location = new System.Drawing.Point(176, 132);
|
||||
this.label17.Name = "label17";
|
||||
this.label17.Size = new System.Drawing.Size(117, 26);
|
||||
this.label17.TabIndex = 82;
|
||||
this.label17.Text = "Master Server Address \r\n(Port Optional)\r\n";
|
||||
//
|
||||
// textBox7
|
||||
//
|
||||
this.textBox7.Location = new System.Drawing.Point(77, 135);
|
||||
this.textBox7.Name = "textBox7";
|
||||
this.textBox7.Size = new System.Drawing.Size(84, 20);
|
||||
this.textBox7.TabIndex = 81;
|
||||
this.textBox7.TextChanged += new System.EventHandler(this.textBox7_TextChanged);
|
||||
//
|
||||
// label9
|
||||
//
|
||||
this.label9.AutoSize = true;
|
||||
this.label9.Location = new System.Drawing.Point(8, 138);
|
||||
this.label9.Name = "label9";
|
||||
this.label9.Size = new System.Drawing.Size(69, 13);
|
||||
this.label9.TabIndex = 80;
|
||||
this.label9.Text = "Server Name";
|
||||
//
|
||||
// label20
|
||||
//
|
||||
this.label20.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
|
||||
this.label20.Location = new System.Drawing.Point(6, 158);
|
||||
this.label20.Name = "label20";
|
||||
this.label20.Size = new System.Drawing.Size(393, 2);
|
||||
this.label20.TabIndex = 79;
|
||||
//
|
||||
// checkBox9
|
||||
//
|
||||
this.checkBox9.AutoSize = true;
|
||||
this.checkBox9.Location = new System.Drawing.Point(315, 189);
|
||||
this.checkBox9.Location = new System.Drawing.Point(267, 193);
|
||||
this.checkBox9.Name = "checkBox9";
|
||||
this.checkBox9.Size = new System.Drawing.Size(84, 17);
|
||||
this.checkBox9.TabIndex = 63;
|
||||
|
|
@ -392,18 +453,6 @@ namespace NovetusLauncher
|
|||
this.checkBox9.UseVisualStyleBackColor = true;
|
||||
this.checkBox9.CheckedChanged += new System.EventHandler(this.checkBox9_CheckedChanged);
|
||||
//
|
||||
// checkBox8
|
||||
//
|
||||
this.checkBox8.AutoSize = true;
|
||||
this.checkBox8.Location = new System.Drawing.Point(226, 189);
|
||||
this.checkBox8.Name = "checkBox8";
|
||||
this.checkBox8.Size = new System.Drawing.Size(83, 17);
|
||||
this.checkBox8.TabIndex = 62;
|
||||
this.checkBox8.Text = "Web Server";
|
||||
this.checkBox8.UseVisualStyleBackColor = true;
|
||||
this.checkBox8.CheckedChanged += new System.EventHandler(this.checkBox8_CheckedChanged);
|
||||
this.checkBox8.Click += new System.EventHandler(this.CheckBox8Click);
|
||||
//
|
||||
// label19
|
||||
//
|
||||
this.label19.AutoSize = true;
|
||||
|
|
@ -424,13 +473,13 @@ namespace NovetusLauncher
|
|||
this.textBox3.Name = "textBox3";
|
||||
this.textBox3.ReadOnly = true;
|
||||
this.textBox3.ScrollBars = System.Windows.Forms.ScrollBars.Both;
|
||||
this.textBox3.Size = new System.Drawing.Size(393, 134);
|
||||
this.textBox3.Size = new System.Drawing.Size(393, 96);
|
||||
this.textBox3.TabIndex = 59;
|
||||
//
|
||||
// checkBox4
|
||||
//
|
||||
this.checkBox4.AutoSize = true;
|
||||
this.checkBox4.Location = new System.Drawing.Point(163, 189);
|
||||
this.checkBox4.Location = new System.Drawing.Point(204, 193);
|
||||
this.checkBox4.Name = "checkBox4";
|
||||
this.checkBox4.Size = new System.Drawing.Size(54, 17);
|
||||
this.checkBox4.TabIndex = 57;
|
||||
|
|
@ -441,9 +490,9 @@ namespace NovetusLauncher
|
|||
//
|
||||
// button22
|
||||
//
|
||||
this.button22.Location = new System.Drawing.Point(23, 184);
|
||||
this.button22.Location = new System.Drawing.Point(52, 189);
|
||||
this.button22.Name = "button22";
|
||||
this.button22.Size = new System.Drawing.Size(137, 25);
|
||||
this.button22.Size = new System.Drawing.Size(86, 22);
|
||||
this.button22.TabIndex = 50;
|
||||
this.button22.Text = "RESET PORT";
|
||||
this.button22.UseVisualStyleBackColor = true;
|
||||
|
|
@ -451,7 +500,7 @@ namespace NovetusLauncher
|
|||
//
|
||||
// numericUpDown3
|
||||
//
|
||||
this.numericUpDown3.Location = new System.Drawing.Point(265, 160);
|
||||
this.numericUpDown3.Location = new System.Drawing.Point(267, 163);
|
||||
this.numericUpDown3.Maximum = new decimal(new int[] {
|
||||
256,
|
||||
0,
|
||||
|
|
@ -474,7 +523,7 @@ namespace NovetusLauncher
|
|||
//
|
||||
// numericUpDown2
|
||||
//
|
||||
this.numericUpDown2.Location = new System.Drawing.Point(97, 160);
|
||||
this.numericUpDown2.Location = new System.Drawing.Point(95, 163);
|
||||
this.numericUpDown2.Maximum = new decimal(new int[] {
|
||||
65535,
|
||||
0,
|
||||
|
|
@ -497,7 +546,7 @@ namespace NovetusLauncher
|
|||
//
|
||||
// label29
|
||||
//
|
||||
this.label29.Location = new System.Drawing.Point(201, 162);
|
||||
this.label29.Location = new System.Drawing.Point(201, 165);
|
||||
this.label29.Name = "label29";
|
||||
this.label29.Size = new System.Drawing.Size(60, 16);
|
||||
this.label29.TabIndex = 46;
|
||||
|
|
@ -505,7 +554,7 @@ namespace NovetusLauncher
|
|||
//
|
||||
// label35
|
||||
//
|
||||
this.label35.Location = new System.Drawing.Point(20, 162);
|
||||
this.label35.Location = new System.Drawing.Point(18, 165);
|
||||
this.label35.Name = "label35";
|
||||
this.label35.Size = new System.Drawing.Size(65, 16);
|
||||
this.label35.TabIndex = 44;
|
||||
|
|
@ -514,9 +563,9 @@ namespace NovetusLauncher
|
|||
//
|
||||
// button18
|
||||
//
|
||||
this.button18.Location = new System.Drawing.Point(204, 215);
|
||||
this.button18.Location = new System.Drawing.Point(204, 216);
|
||||
this.button18.Name = "button18";
|
||||
this.button18.Size = new System.Drawing.Size(188, 36);
|
||||
this.button18.Size = new System.Drawing.Size(195, 35);
|
||||
this.button18.TabIndex = 20;
|
||||
this.button18.Text = "START SERVER WITH NO GRAPHICS";
|
||||
this.button18.UseVisualStyleBackColor = true;
|
||||
|
|
@ -524,9 +573,9 @@ namespace NovetusLauncher
|
|||
//
|
||||
// button2
|
||||
//
|
||||
this.button2.Location = new System.Drawing.Point(10, 215);
|
||||
this.button2.Location = new System.Drawing.Point(6, 218);
|
||||
this.button2.Name = "button2";
|
||||
this.button2.Size = new System.Drawing.Size(188, 36);
|
||||
this.button2.Size = new System.Drawing.Size(188, 34);
|
||||
this.button2.TabIndex = 2;
|
||||
this.button2.Text = "START SERVER";
|
||||
this.button2.UseVisualStyleBackColor = true;
|
||||
|
|
@ -1442,7 +1491,6 @@ namespace NovetusLauncher
|
|||
launcherForm.ReadmeBox = richTextBox3;
|
||||
launcherForm.ProductVersionLabel = label8;
|
||||
launcherForm.NovetusVersionLabel = label11;
|
||||
launcherForm.WebServerCheckbox = checkBox8;
|
||||
launcherForm.CloseOnLaunchCheckbox = checkBox1;
|
||||
launcherForm.DiscordPresenceCheckbox = checkBox2;
|
||||
launcherForm.uPnPCheckBox = checkBox4;
|
||||
|
|
@ -1462,6 +1510,8 @@ namespace NovetusLauncher
|
|||
launcherForm.ClientWarningLabel = label30;
|
||||
launcherForm.ClientDescriptionBox = textBox6;
|
||||
launcherForm.IPBox = textBox1;
|
||||
launcherForm.ServerBrowserNameBox = textBox7;
|
||||
launcherForm.ServerBrowserAddressBox = textBox8;
|
||||
}
|
||||
|
||||
private System.Windows.Forms.CheckBox checkBox4;
|
||||
|
|
@ -1576,10 +1626,15 @@ namespace NovetusLauncher
|
|||
private System.Windows.Forms.Label label5;
|
||||
private System.Windows.Forms.TextBox SearchBar;
|
||||
private System.Windows.Forms.Button SearchButton;
|
||||
private System.Windows.Forms.CheckBox checkBox8;
|
||||
private System.Windows.Forms.Button button36;
|
||||
private System.Windows.Forms.CheckBox checkBox9;
|
||||
//private System.Windows.Forms.CheckBox checkBox8;
|
||||
private LauncherFormShared launcherForm;
|
||||
private System.Windows.Forms.Label label6;
|
||||
private System.Windows.Forms.TextBox textBox8;
|
||||
private System.Windows.Forms.Label label17;
|
||||
private System.Windows.Forms.TextBox textBox7;
|
||||
private System.Windows.Forms.Label label9;
|
||||
private System.Windows.Forms.Label label20;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -282,17 +282,6 @@ namespace NovetusLauncher
|
|||
launcherForm.SearchMaps();
|
||||
}
|
||||
|
||||
private void checkBox8_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
GlobalVars.UserConfiguration.WebServer = checkBox8.Checked;
|
||||
}
|
||||
|
||||
void CheckBox8Click(object sender, EventArgs e)
|
||||
{
|
||||
launcherForm.RestartLauncherAfterSetting(checkBox8, "Novetus - Web Server", "Make sure you are running the launcher in Administrator Mode" +
|
||||
"in order for the Web Server to function.");
|
||||
}
|
||||
|
||||
private void button36_Click(object sender, EventArgs e)
|
||||
{
|
||||
ServerBrowser browser = new ServerBrowser();
|
||||
|
|
@ -303,6 +292,16 @@ namespace NovetusLauncher
|
|||
{
|
||||
GlobalVars.UserConfiguration.ShowServerNotifications = checkBox9.Checked;
|
||||
}
|
||||
|
||||
private void textBox7_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
GlobalVars.UserConfiguration.ServerBrowserServerName = textBox7.Text;
|
||||
}
|
||||
|
||||
private void textBox8_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
GlobalVars.UserConfiguration.ServerBrowserServerAddress = textBox8.Text;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
#endregion
|
||||
|
|
|
|||
|
|
@ -86,8 +86,13 @@ namespace NovetusLauncher
|
|||
this.button1 = new System.Windows.Forms.Button();
|
||||
this.textBox1 = new System.Windows.Forms.TextBox();
|
||||
this.tabPage2 = new System.Windows.Forms.TabPage();
|
||||
this.textBox8 = new System.Windows.Forms.TextBox();
|
||||
this.label17 = new System.Windows.Forms.Label();
|
||||
this.label9 = new System.Windows.Forms.Label();
|
||||
this.label6 = new System.Windows.Forms.Label();
|
||||
this.textBox7 = new System.Windows.Forms.TextBox();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.checkBox9 = new System.Windows.Forms.CheckBox();
|
||||
this.checkBox8 = new System.Windows.Forms.CheckBox();
|
||||
this.label19 = new System.Windows.Forms.Label();
|
||||
this.textBox3 = new System.Windows.Forms.TextBox();
|
||||
this.checkBox4 = new System.Windows.Forms.CheckBox();
|
||||
|
|
@ -650,8 +655,13 @@ namespace NovetusLauncher
|
|||
//
|
||||
// tabPage2
|
||||
//
|
||||
this.tabPage2.Controls.Add(this.textBox8);
|
||||
this.tabPage2.Controls.Add(this.label17);
|
||||
this.tabPage2.Controls.Add(this.label9);
|
||||
this.tabPage2.Controls.Add(this.label6);
|
||||
this.tabPage2.Controls.Add(this.textBox7);
|
||||
this.tabPage2.Controls.Add(this.label3);
|
||||
this.tabPage2.Controls.Add(this.checkBox9);
|
||||
this.tabPage2.Controls.Add(this.checkBox8);
|
||||
this.tabPage2.Controls.Add(this.label19);
|
||||
this.tabPage2.Controls.Add(this.textBox3);
|
||||
this.tabPage2.Controls.Add(this.checkBox4);
|
||||
|
|
@ -671,10 +681,61 @@ namespace NovetusLauncher
|
|||
this.tabPage2.ToolTipText = "Start a server for other players to play";
|
||||
this.tabPage2.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// textBox8
|
||||
//
|
||||
this.textBox8.Location = new System.Drawing.Point(475, 129);
|
||||
this.textBox8.Name = "textBox8";
|
||||
this.textBox8.Size = new System.Drawing.Size(100, 20);
|
||||
this.textBox8.TabIndex = 68;
|
||||
this.textBox8.TextChanged += new System.EventHandler(this.textBox8_TextChanged);
|
||||
//
|
||||
// label17
|
||||
//
|
||||
this.label17.AutoSize = true;
|
||||
this.label17.Location = new System.Drawing.Point(340, 124);
|
||||
this.label17.Name = "label17";
|
||||
this.label17.Size = new System.Drawing.Size(117, 26);
|
||||
this.label17.TabIndex = 67;
|
||||
this.label17.Text = "Master Server Address \r\n(Port Optional)\r\n";
|
||||
//
|
||||
// label9
|
||||
//
|
||||
this.label9.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
|
||||
this.label9.Location = new System.Drawing.Point(6, 153);
|
||||
this.label9.Name = "label9";
|
||||
this.label9.Size = new System.Drawing.Size(612, 2);
|
||||
this.label9.TabIndex = 66;
|
||||
//
|
||||
// label6
|
||||
//
|
||||
this.label6.AutoSize = true;
|
||||
this.label6.Location = new System.Drawing.Point(200, 132);
|
||||
this.label6.Name = "label6";
|
||||
this.label6.Size = new System.Drawing.Size(35, 13);
|
||||
this.label6.TabIndex = 65;
|
||||
this.label6.Text = "Name";
|
||||
//
|
||||
// textBox7
|
||||
//
|
||||
this.textBox7.Location = new System.Drawing.Point(241, 129);
|
||||
this.textBox7.Name = "textBox7";
|
||||
this.textBox7.Size = new System.Drawing.Size(84, 20);
|
||||
this.textBox7.TabIndex = 64;
|
||||
this.textBox7.TextChanged += new System.EventHandler(this.textBox7_TextChanged);
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.Location = new System.Drawing.Point(32, 132);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(164, 13);
|
||||
this.label3.TabIndex = 63;
|
||||
this.label3.Text = "SERVER BROWSER OPTIONS:";
|
||||
//
|
||||
// checkBox9
|
||||
//
|
||||
this.checkBox9.AutoSize = true;
|
||||
this.checkBox9.Location = new System.Drawing.Point(468, 180);
|
||||
this.checkBox9.Location = new System.Drawing.Point(371, 185);
|
||||
this.checkBox9.Name = "checkBox9";
|
||||
this.checkBox9.Size = new System.Drawing.Size(84, 17);
|
||||
this.checkBox9.TabIndex = 62;
|
||||
|
|
@ -682,18 +743,6 @@ namespace NovetusLauncher
|
|||
this.checkBox9.UseVisualStyleBackColor = true;
|
||||
this.checkBox9.CheckedChanged += new System.EventHandler(this.checkBox9_CheckedChanged);
|
||||
//
|
||||
// checkBox8
|
||||
//
|
||||
this.checkBox8.AutoSize = true;
|
||||
this.checkBox8.Location = new System.Drawing.Point(379, 180);
|
||||
this.checkBox8.Name = "checkBox8";
|
||||
this.checkBox8.Size = new System.Drawing.Size(83, 17);
|
||||
this.checkBox8.TabIndex = 61;
|
||||
this.checkBox8.Text = "Web Server";
|
||||
this.checkBox8.UseVisualStyleBackColor = true;
|
||||
this.checkBox8.CheckedChanged += new System.EventHandler(this.checkBox8_CheckedChanged);
|
||||
this.checkBox8.Click += new System.EventHandler(this.CheckBox8Click);
|
||||
//
|
||||
// label19
|
||||
//
|
||||
this.label19.AutoSize = true;
|
||||
|
|
@ -711,12 +760,12 @@ namespace NovetusLauncher
|
|||
this.textBox3.Name = "textBox3";
|
||||
this.textBox3.ReadOnly = true;
|
||||
this.textBox3.ScrollBars = System.Windows.Forms.ScrollBars.Both;
|
||||
this.textBox3.Size = new System.Drawing.Size(612, 129);
|
||||
this.textBox3.Size = new System.Drawing.Size(612, 103);
|
||||
this.textBox3.TabIndex = 59;
|
||||
//
|
||||
// checkBox4
|
||||
//
|
||||
this.checkBox4.Location = new System.Drawing.Point(321, 180);
|
||||
this.checkBox4.Location = new System.Drawing.Point(310, 185);
|
||||
this.checkBox4.Name = "checkBox4";
|
||||
this.checkBox4.Size = new System.Drawing.Size(55, 17);
|
||||
this.checkBox4.TabIndex = 57;
|
||||
|
|
@ -727,7 +776,7 @@ namespace NovetusLauncher
|
|||
//
|
||||
// button22
|
||||
//
|
||||
this.button22.Location = new System.Drawing.Point(179, 178);
|
||||
this.button22.Location = new System.Drawing.Point(144, 183);
|
||||
this.button22.Name = "button22";
|
||||
this.button22.Size = new System.Drawing.Size(131, 24);
|
||||
this.button22.TabIndex = 50;
|
||||
|
|
@ -737,7 +786,7 @@ namespace NovetusLauncher
|
|||
//
|
||||
// numericUpDown3
|
||||
//
|
||||
this.numericUpDown3.Location = new System.Drawing.Point(383, 154);
|
||||
this.numericUpDown3.Location = new System.Drawing.Point(348, 159);
|
||||
this.numericUpDown3.Maximum = new decimal(new int[] {
|
||||
256,
|
||||
0,
|
||||
|
|
@ -760,7 +809,7 @@ namespace NovetusLauncher
|
|||
//
|
||||
// numericUpDown2
|
||||
//
|
||||
this.numericUpDown2.Location = new System.Drawing.Point(247, 154);
|
||||
this.numericUpDown2.Location = new System.Drawing.Point(212, 159);
|
||||
this.numericUpDown2.Maximum = new decimal(new int[] {
|
||||
65535,
|
||||
0,
|
||||
|
|
@ -783,7 +832,7 @@ namespace NovetusLauncher
|
|||
//
|
||||
// label29
|
||||
//
|
||||
this.label29.Location = new System.Drawing.Point(318, 156);
|
||||
this.label29.Location = new System.Drawing.Point(283, 161);
|
||||
this.label29.Name = "label29";
|
||||
this.label29.Size = new System.Drawing.Size(60, 16);
|
||||
this.label29.TabIndex = 46;
|
||||
|
|
@ -791,7 +840,7 @@ namespace NovetusLauncher
|
|||
//
|
||||
// label35
|
||||
//
|
||||
this.label35.Location = new System.Drawing.Point(176, 156);
|
||||
this.label35.Location = new System.Drawing.Point(141, 161);
|
||||
this.label35.Name = "label35";
|
||||
this.label35.Size = new System.Drawing.Size(65, 16);
|
||||
this.label35.TabIndex = 44;
|
||||
|
|
@ -1542,7 +1591,6 @@ namespace NovetusLauncher
|
|||
launcherForm.NovetusVersionLabel = label11;
|
||||
launcherForm.GraphicsModeBox = comboBox1;
|
||||
launcherForm.GraphicsLevelBox = comboBox2;
|
||||
launcherForm.WebServerCheckbox = checkBox8;
|
||||
launcherForm.CloseOnLaunchCheckbox = checkBox1;
|
||||
launcherForm.DiscordPresenceCheckbox = checkBox2;
|
||||
launcherForm.ReShadeCheckbox = checkBox5;
|
||||
|
|
@ -1565,6 +1613,8 @@ namespace NovetusLauncher
|
|||
launcherForm.ClientWarningLabel = label30;
|
||||
launcherForm.ClientDescriptionBox = textBox6;
|
||||
launcherForm.IPBox = textBox1;
|
||||
launcherForm.ServerBrowserNameBox = textBox7;
|
||||
launcherForm.ServerBrowserAddressBox = textBox8;
|
||||
}
|
||||
|
||||
private System.Windows.Forms.CheckBox checkBox4;
|
||||
|
|
@ -1679,10 +1729,15 @@ namespace NovetusLauncher
|
|||
private System.Windows.Forms.TextBox SearchBar;
|
||||
private System.Windows.Forms.Button SearchButton;
|
||||
private System.Windows.Forms.Button button36;
|
||||
private System.Windows.Forms.CheckBox checkBox8;
|
||||
private System.Windows.Forms.Button button37;
|
||||
private System.Windows.Forms.CheckBox checkBox9;
|
||||
//private System.Windows.Forms.CheckBox checkBox8;
|
||||
private LauncherFormShared launcherForm;
|
||||
private System.Windows.Forms.TextBox textBox8;
|
||||
private System.Windows.Forms.Label label17;
|
||||
private System.Windows.Forms.Label label9;
|
||||
private System.Windows.Forms.Label label6;
|
||||
private System.Windows.Forms.TextBox textBox7;
|
||||
private System.Windows.Forms.Label label3;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -413,17 +413,6 @@ namespace NovetusLauncher
|
|||
launcherForm.SearchMaps();
|
||||
}
|
||||
|
||||
private void checkBox8_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
GlobalVars.UserConfiguration.WebServer = checkBox8.Checked;
|
||||
}
|
||||
|
||||
void CheckBox8Click(object sender, EventArgs e)
|
||||
{
|
||||
launcherForm.RestartLauncherAfterSetting(checkBox8, "Novetus - Web Server", "Make sure you are running the launcher in Administrator Mode" +
|
||||
"in order for the Web Server to function.");
|
||||
}
|
||||
|
||||
private void button37_Click(object sender, EventArgs e)
|
||||
{
|
||||
ServerBrowser browser = new ServerBrowser();
|
||||
|
|
@ -434,7 +423,17 @@ namespace NovetusLauncher
|
|||
{
|
||||
GlobalVars.UserConfiguration.ShowServerNotifications = checkBox9.Checked;
|
||||
}
|
||||
|
||||
private void textBox7_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
GlobalVars.UserConfiguration.ServerBrowserServerName = textBox7.Text;
|
||||
}
|
||||
|
||||
private void textBox8_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
GlobalVars.UserConfiguration.ServerBrowserServerAddress = textBox8.Text;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,13 +29,14 @@ namespace NovetusLauncher
|
|||
public Settings.UIOptions.Style FormStyle = Settings.UIOptions.Style.None;
|
||||
public RichTextBox ConsoleBox, ChangelogBox, ReadmeBox = null;
|
||||
public TabControl Tabs = null;
|
||||
public TextBox MapDescBox, ServerInfo, SearchBar, PlayerIDTextBox, PlayerNameTextBox, ClientDescriptionBox, IPBox = null;
|
||||
public TextBox MapDescBox, ServerInfo, SearchBar, PlayerIDTextBox, PlayerNameTextBox, ClientDescriptionBox, IPBox,
|
||||
ServerBrowserNameBox, ServerBrowserAddressBox = null;
|
||||
public TreeView Tree, _TreeCache = null;
|
||||
public ListBox ServerBox, PortBox, ClientBox = null;
|
||||
public Label SplashLabel, ProductVersionLabel, NovetusVersionLabel, PlayerTripcodeLabel, IPLabel, PortLabel,
|
||||
SelectedClientLabel, SelectedMapLabel, ClientWarningLabel = null;
|
||||
public ComboBox StyleSelectorBox, GraphicsModeBox, GraphicsLevelBox = null;
|
||||
public CheckBox WebServerCheckbox, CloseOnLaunchCheckbox, DiscordPresenceCheckbox, ReShadeCheckbox, ReShadeFPSDisplayCheckBox,
|
||||
public CheckBox CloseOnLaunchCheckbox, DiscordPresenceCheckbox, ReShadeCheckbox, ReShadeFPSDisplayCheckBox,
|
||||
ReShadePerformanceModeCheckBox, uPnPCheckBox, ShowServerNotifsCheckBox, LocalPlayCheckBox = null;
|
||||
public Button RegeneratePlayerIDButton = null;
|
||||
public NumericUpDown PlayerLimitBox, HostPortBox, JoinPortBox = null;
|
||||
|
|
@ -110,8 +111,6 @@ namespace NovetusLauncher
|
|||
GlobalFuncs.ConsolePrint("UPnP: Device '" + IP + "' registered.", 3, ConsoleBox);
|
||||
StartUPnP(device, Protocol.Udp, GlobalVars.UserConfiguration.RobloxPort);
|
||||
StartUPnP(device, Protocol.Tcp, GlobalVars.UserConfiguration.RobloxPort);
|
||||
StartUPnP(device, Protocol.Udp, GlobalVars.UserConfiguration.WebServerPort);
|
||||
StartUPnP(device, Protocol.Tcp, GlobalVars.UserConfiguration.WebServerPort);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
@ -128,8 +127,6 @@ namespace NovetusLauncher
|
|||
GlobalFuncs.ConsolePrint("UPnP: Device '" + IP + "' disconnected.", 3, ConsoleBox);
|
||||
StopUPnP(device, Protocol.Udp, GlobalVars.UserConfiguration.RobloxPort);
|
||||
StopUPnP(device, Protocol.Tcp, GlobalVars.UserConfiguration.RobloxPort);
|
||||
StopUPnP(device, Protocol.Udp, GlobalVars.UserConfiguration.WebServerPort);
|
||||
StopUPnP(device, Protocol.Tcp, GlobalVars.UserConfiguration.WebServerPort);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
@ -184,50 +181,6 @@ namespace NovetusLauncher
|
|||
}
|
||||
#endregion
|
||||
|
||||
#region Web Server
|
||||
//udp clients will connect to the web server alongside the game.
|
||||
public void StartWebServer()
|
||||
{
|
||||
if (SecurityFuncs.IsElevated)
|
||||
{
|
||||
try
|
||||
{
|
||||
GlobalVars.WebServer = new SimpleHTTPServer(GlobalPaths.DataPath, GlobalVars.UserConfiguration.WebServerPort);
|
||||
GlobalFuncs.ConsolePrint("WebServer: Server is running on port: " + GlobalVars.WebServer.Port.ToString(), 3, ConsoleBox);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
GlobalFuncs.ConsolePrint("WebServer: Failed to launch WebServer. Some features may not function. (" + ex.Message + ")", 2, ConsoleBox);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
GlobalFuncs.ConsolePrint("WebServer: Failed to launch WebServer. Some features may not function. (Did not run as Administrator)", 2, ConsoleBox);
|
||||
}
|
||||
}
|
||||
|
||||
public void StopWebServer()
|
||||
{
|
||||
if (SecurityFuncs.IsElevated)
|
||||
{
|
||||
try
|
||||
{
|
||||
GlobalFuncs.ConsolePrint("WebServer: Server has stopped on port: " + GlobalVars.WebServer.Port.ToString(), 2, ConsoleBox);
|
||||
GlobalVars.WebServer.Stop();
|
||||
GlobalVars.WebServer = null;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
GlobalFuncs.ConsolePrint("WebServer: Failed to stop WebServer. Some features may not function. (" + ex.Message + ")", 2, ConsoleBox);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
GlobalFuncs.ConsolePrint("WebServer: Failed to stop WebServer. Some features may not function. (Did not run as Administrator)", 2, ConsoleBox);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Form Event Functions
|
||||
public void InitForm()
|
||||
{
|
||||
|
|
@ -286,10 +239,6 @@ namespace NovetusLauncher
|
|||
ReadConfigValues(true);
|
||||
InitUPnP();
|
||||
StartDiscord();
|
||||
if (GlobalVars.UserConfiguration.WebServer)
|
||||
{
|
||||
StartWebServer();
|
||||
}
|
||||
}
|
||||
|
||||
public void CloseEvent()
|
||||
|
|
@ -302,10 +251,6 @@ namespace NovetusLauncher
|
|||
{
|
||||
DiscordRPC.Shutdown();
|
||||
}
|
||||
if (GlobalVars.IsWebServerOn)
|
||||
{
|
||||
StopWebServer();
|
||||
}
|
||||
Application.Exit();
|
||||
}
|
||||
|
||||
|
|
@ -346,11 +291,7 @@ namespace NovetusLauncher
|
|||
"Online URI Link:",
|
||||
URI,
|
||||
"Local URI Link:",
|
||||
URI2,
|
||||
GlobalVars.IsWebServerOn ? "Web Server URL:" : "",
|
||||
GlobalVars.IsWebServerOn ? "http://" + (!string.IsNullOrWhiteSpace(GlobalVars.UserConfiguration.AlternateServerIP) ? GlobalVars.UserConfiguration.AlternateServerIP : IP) + ":" + GlobalVars.WebServer.Port.ToString() : "",
|
||||
GlobalVars.IsWebServerOn ? "Local Web Server URL:" : "",
|
||||
GlobalVars.IsWebServerOn ? "http://localhost:" + (GlobalVars.WebServer.Port.ToString()).ToString() : ""
|
||||
URI2
|
||||
};
|
||||
|
||||
foreach (string str in text)
|
||||
|
|
@ -649,38 +590,6 @@ namespace NovetusLauncher
|
|||
case string sdk when string.Compare(sdk, "sdk", true, CultureInfo.InvariantCulture) == 0:
|
||||
LoadLauncher();
|
||||
break;
|
||||
case string webserverstart when string.Compare(webserverstart, "webserver start", true, CultureInfo.InvariantCulture) == 0:
|
||||
if (!GlobalVars.IsWebServerOn)
|
||||
{
|
||||
StartWebServer();
|
||||
}
|
||||
else
|
||||
{
|
||||
GlobalFuncs.ConsolePrint("WebServer: There is already a web server on.", 2, ConsoleBox);
|
||||
}
|
||||
break;
|
||||
case string webserverstop when string.Compare(webserverstop, "webserver stop", true, CultureInfo.InvariantCulture) == 0:
|
||||
if (GlobalVars.IsWebServerOn)
|
||||
{
|
||||
StopWebServer();
|
||||
}
|
||||
else
|
||||
{
|
||||
GlobalFuncs.ConsolePrint("WebServer: There is no web server on.", 2, ConsoleBox);
|
||||
}
|
||||
break;
|
||||
case string webserverrestart when string.Compare(webserverrestart, "webserver restart", true, CultureInfo.InvariantCulture) == 0:
|
||||
try
|
||||
{
|
||||
GlobalFuncs.ConsolePrint("WebServer: Restarting...", 4, ConsoleBox);
|
||||
StopWebServer();
|
||||
StartWebServer();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
GlobalFuncs.ConsolePrint("WebServer: Cannot restart web server. (" + ex.Message + ")", 2, ConsoleBox);
|
||||
}
|
||||
break;
|
||||
case string dlldeleteon when string.Compare(dlldeleteon, "dlldelete on", true, CultureInfo.InvariantCulture) == 0:
|
||||
GlobalVars.UserConfiguration.DisableReshadeDelete = false;
|
||||
GlobalFuncs.ConsolePrint("ReShade DLL deletion enabled.", 4, ConsoleBox);
|
||||
|
|
@ -723,10 +632,6 @@ namespace NovetusLauncher
|
|||
GlobalFuncs.ConsolePrint("= config load | Reloads the config file", 4, ConsoleBox);
|
||||
GlobalFuncs.ConsolePrint("= config reset | Resets the config file", 4, ConsoleBox);
|
||||
GlobalFuncs.ConsolePrint("---------", 1, ConsoleBox);
|
||||
GlobalFuncs.ConsolePrint("= webserver restart | Restarts the web server", 4, ConsoleBox);
|
||||
GlobalFuncs.ConsolePrint("= webserver stop | Stops a web server if there is one on.", 4, ConsoleBox);
|
||||
GlobalFuncs.ConsolePrint("= webserver start | Starts a web server if there isn't one on yet.", 4, ConsoleBox);
|
||||
GlobalFuncs.ConsolePrint("---------", 1, ConsoleBox);
|
||||
GlobalFuncs.ConsolePrint("= dlldelete off | Turn off the deletion of opengl32.dll when ReShade is off.", 4, ConsoleBox);
|
||||
GlobalFuncs.ConsolePrint("= dlldelete on | Turn on the deletion of opengl32.dll when ReShade is off.", 4, ConsoleBox);
|
||||
GlobalFuncs.ConsolePrint("---------", 1, ConsoleBox);
|
||||
|
|
@ -786,16 +691,8 @@ namespace NovetusLauncher
|
|||
}
|
||||
uPnPCheckBox.Checked = GlobalVars.UserConfiguration.UPnP;
|
||||
ShowServerNotifsCheckBox.Checked = GlobalVars.UserConfiguration.ShowServerNotifications;
|
||||
|
||||
if (SecurityFuncs.IsElevated)
|
||||
{
|
||||
WebServerCheckbox.Enabled = true;
|
||||
WebServerCheckbox.Checked = GlobalVars.UserConfiguration.WebServer;
|
||||
}
|
||||
else
|
||||
{
|
||||
WebServerCheckbox.Enabled = false;
|
||||
}
|
||||
ServerBrowserNameBox.Text = GlobalVars.UserConfiguration.ServerBrowserServerName;
|
||||
ServerBrowserAddressBox.Text = GlobalVars.UserConfiguration.ServerBrowserServerAddress;
|
||||
|
||||
if (FormStyle == Settings.UIOptions.Style.Extended)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -101,36 +101,26 @@ partial class ClientinfoEditor
|
|||
this.hat1dToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.hat2dToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.hat3dToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.hat1wsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.hat2wsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.hat3wsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.facesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.faceToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.facedToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.facewsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.headsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.headToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.headdToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.headwsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.tShirtsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.tshirtToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.tshirtdToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.tshirtwsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.shirtsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.shirtToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.shirtdToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.shirtwsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.pantsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.pantsToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.pantsdToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.pantswsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.extraToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.extraToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.extradToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.extrawsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.hat4ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.hat4dToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.hat4wsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.iconeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.iconToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.charappToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
|
|
@ -656,10 +646,7 @@ partial class ClientinfoEditor
|
|||
this.hat3ToolStripMenuItem,
|
||||
this.hat1dToolStripMenuItem,
|
||||
this.hat2dToolStripMenuItem,
|
||||
this.hat3dToolStripMenuItem,
|
||||
this.hat1wsToolStripMenuItem,
|
||||
this.hat2wsToolStripMenuItem,
|
||||
this.hat3wsToolStripMenuItem});
|
||||
this.hat3dToolStripMenuItem});
|
||||
this.hatsToolStripMenuItem.Name = "hatsToolStripMenuItem";
|
||||
this.hatsToolStripMenuItem.Size = new System.Drawing.Size(138, 22);
|
||||
this.hatsToolStripMenuItem.Text = "Hats";
|
||||
|
|
@ -706,33 +693,11 @@ partial class ClientinfoEditor
|
|||
this.hat3dToolStripMenuItem.Text = "%hat3d%";
|
||||
this.hat3dToolStripMenuItem.Click += new System.EventHandler(this.variableToolStripMenuItem_Click);
|
||||
//
|
||||
// hat1wsToolStripMenuItem
|
||||
//
|
||||
this.hat1wsToolStripMenuItem.Name = "hat1wsToolStripMenuItem";
|
||||
this.hat1wsToolStripMenuItem.Size = new System.Drawing.Size(131, 22);
|
||||
this.hat1wsToolStripMenuItem.Text = "%hat1ws%";
|
||||
this.hat1wsToolStripMenuItem.Click += new System.EventHandler(this.variableToolStripMenuItem_Click);
|
||||
//
|
||||
// hat2wsToolStripMenuItem
|
||||
//
|
||||
this.hat2wsToolStripMenuItem.Name = "hat2wsToolStripMenuItem";
|
||||
this.hat2wsToolStripMenuItem.Size = new System.Drawing.Size(131, 22);
|
||||
this.hat2wsToolStripMenuItem.Text = "%hat2ws%";
|
||||
this.hat2wsToolStripMenuItem.Click += new System.EventHandler(this.variableToolStripMenuItem_Click);
|
||||
//
|
||||
// hat3wsToolStripMenuItem
|
||||
//
|
||||
this.hat3wsToolStripMenuItem.Name = "hat3wsToolStripMenuItem";
|
||||
this.hat3wsToolStripMenuItem.Size = new System.Drawing.Size(131, 22);
|
||||
this.hat3wsToolStripMenuItem.Text = "%hat3ws%";
|
||||
this.hat3wsToolStripMenuItem.Click += new System.EventHandler(this.variableToolStripMenuItem_Click);
|
||||
//
|
||||
// facesToolStripMenuItem
|
||||
//
|
||||
this.facesToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.faceToolStripMenuItem,
|
||||
this.facedToolStripMenuItem,
|
||||
this.facewsToolStripMenuItem});
|
||||
this.facedToolStripMenuItem});
|
||||
this.facesToolStripMenuItem.Name = "facesToolStripMenuItem";
|
||||
this.facesToolStripMenuItem.Size = new System.Drawing.Size(138, 22);
|
||||
this.facesToolStripMenuItem.Text = "Faces";
|
||||
|
|
@ -751,19 +716,11 @@ partial class ClientinfoEditor
|
|||
this.facedToolStripMenuItem.Text = "%faced%";
|
||||
this.facedToolStripMenuItem.Click += new System.EventHandler(this.variableToolStripMenuItem_Click);
|
||||
//
|
||||
// facewsToolStripMenuItem
|
||||
//
|
||||
this.facewsToolStripMenuItem.Name = "facewsToolStripMenuItem";
|
||||
this.facewsToolStripMenuItem.Size = new System.Drawing.Size(130, 22);
|
||||
this.facewsToolStripMenuItem.Text = "%facews%";
|
||||
this.facewsToolStripMenuItem.Click += new System.EventHandler(this.variableToolStripMenuItem_Click);
|
||||
//
|
||||
// headsToolStripMenuItem
|
||||
//
|
||||
this.headsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.headToolStripMenuItem,
|
||||
this.headdToolStripMenuItem,
|
||||
this.headwsToolStripMenuItem});
|
||||
this.headdToolStripMenuItem});
|
||||
this.headsToolStripMenuItem.Name = "headsToolStripMenuItem";
|
||||
this.headsToolStripMenuItem.Size = new System.Drawing.Size(138, 22);
|
||||
this.headsToolStripMenuItem.Text = "Heads";
|
||||
|
|
@ -782,19 +739,11 @@ partial class ClientinfoEditor
|
|||
this.headdToolStripMenuItem.Text = "%headd%";
|
||||
this.headdToolStripMenuItem.Click += new System.EventHandler(this.variableToolStripMenuItem_Click);
|
||||
//
|
||||
// headwsToolStripMenuItem
|
||||
//
|
||||
this.headwsToolStripMenuItem.Name = "headwsToolStripMenuItem";
|
||||
this.headwsToolStripMenuItem.Size = new System.Drawing.Size(134, 22);
|
||||
this.headwsToolStripMenuItem.Text = "%headws%";
|
||||
this.headwsToolStripMenuItem.Click += new System.EventHandler(this.variableToolStripMenuItem_Click);
|
||||
//
|
||||
// tShirtsToolStripMenuItem
|
||||
//
|
||||
this.tShirtsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.tshirtToolStripMenuItem,
|
||||
this.tshirtdToolStripMenuItem,
|
||||
this.tshirtwsToolStripMenuItem});
|
||||
this.tshirtdToolStripMenuItem});
|
||||
this.tShirtsToolStripMenuItem.Name = "tShirtsToolStripMenuItem";
|
||||
this.tShirtsToolStripMenuItem.Size = new System.Drawing.Size(138, 22);
|
||||
this.tShirtsToolStripMenuItem.Text = "T-Shirts";
|
||||
|
|
@ -813,19 +762,11 @@ partial class ClientinfoEditor
|
|||
this.tshirtdToolStripMenuItem.Text = "%tshirtd%";
|
||||
this.tshirtdToolStripMenuItem.Click += new System.EventHandler(this.variableToolStripMenuItem_Click);
|
||||
//
|
||||
// tshirtwsToolStripMenuItem
|
||||
//
|
||||
this.tshirtwsToolStripMenuItem.Name = "tshirtwsToolStripMenuItem";
|
||||
this.tshirtwsToolStripMenuItem.Size = new System.Drawing.Size(135, 22);
|
||||
this.tshirtwsToolStripMenuItem.Text = "%tshirtws%";
|
||||
this.tshirtwsToolStripMenuItem.Click += new System.EventHandler(this.variableToolStripMenuItem_Click);
|
||||
//
|
||||
// shirtsToolStripMenuItem
|
||||
//
|
||||
this.shirtsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.shirtToolStripMenuItem,
|
||||
this.shirtdToolStripMenuItem,
|
||||
this.shirtwsToolStripMenuItem});
|
||||
this.shirtdToolStripMenuItem});
|
||||
this.shirtsToolStripMenuItem.Name = "shirtsToolStripMenuItem";
|
||||
this.shirtsToolStripMenuItem.Size = new System.Drawing.Size(138, 22);
|
||||
this.shirtsToolStripMenuItem.Text = "Shirts";
|
||||
|
|
@ -844,19 +785,11 @@ partial class ClientinfoEditor
|
|||
this.shirtdToolStripMenuItem.Text = "%shirtd%";
|
||||
this.shirtdToolStripMenuItem.Click += new System.EventHandler(this.variableToolStripMenuItem_Click);
|
||||
//
|
||||
// shirtwsToolStripMenuItem
|
||||
//
|
||||
this.shirtwsToolStripMenuItem.Name = "shirtwsToolStripMenuItem";
|
||||
this.shirtwsToolStripMenuItem.Size = new System.Drawing.Size(131, 22);
|
||||
this.shirtwsToolStripMenuItem.Text = "%shirtws%";
|
||||
this.shirtwsToolStripMenuItem.Click += new System.EventHandler(this.variableToolStripMenuItem_Click);
|
||||
//
|
||||
// pantsToolStripMenuItem
|
||||
//
|
||||
this.pantsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.pantsToolStripMenuItem1,
|
||||
this.pantsdToolStripMenuItem,
|
||||
this.pantswsToolStripMenuItem});
|
||||
this.pantsdToolStripMenuItem});
|
||||
this.pantsToolStripMenuItem.Name = "pantsToolStripMenuItem";
|
||||
this.pantsToolStripMenuItem.Size = new System.Drawing.Size(138, 22);
|
||||
this.pantsToolStripMenuItem.Text = "Pants";
|
||||
|
|
@ -875,22 +808,13 @@ partial class ClientinfoEditor
|
|||
this.pantsdToolStripMenuItem.Text = "%pantsd%";
|
||||
this.pantsdToolStripMenuItem.Click += new System.EventHandler(this.variableToolStripMenuItem_Click);
|
||||
//
|
||||
// pantswsToolStripMenuItem
|
||||
//
|
||||
this.pantswsToolStripMenuItem.Name = "pantswsToolStripMenuItem";
|
||||
this.pantswsToolStripMenuItem.Size = new System.Drawing.Size(137, 22);
|
||||
this.pantswsToolStripMenuItem.Text = "%pantsws%";
|
||||
this.pantswsToolStripMenuItem.Click += new System.EventHandler(this.variableToolStripMenuItem_Click);
|
||||
//
|
||||
// extraToolStripMenuItem
|
||||
//
|
||||
this.extraToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.extraToolStripMenuItem1,
|
||||
this.extradToolStripMenuItem,
|
||||
this.extrawsToolStripMenuItem,
|
||||
this.hat4ToolStripMenuItem,
|
||||
this.hat4dToolStripMenuItem,
|
||||
this.hat4wsToolStripMenuItem,
|
||||
this.iconeToolStripMenuItem,
|
||||
this.iconToolStripMenuItem});
|
||||
this.extraToolStripMenuItem.Name = "extraToolStripMenuItem";
|
||||
|
|
@ -911,13 +835,6 @@ partial class ClientinfoEditor
|
|||
this.extradToolStripMenuItem.Text = "%extrad%";
|
||||
this.extradToolStripMenuItem.Click += new System.EventHandler(this.variableToolStripMenuItem_Click);
|
||||
//
|
||||
// extrawsToolStripMenuItem
|
||||
//
|
||||
this.extrawsToolStripMenuItem.Name = "extrawsToolStripMenuItem";
|
||||
this.extrawsToolStripMenuItem.Size = new System.Drawing.Size(134, 22);
|
||||
this.extrawsToolStripMenuItem.Text = "%extraws%";
|
||||
this.extrawsToolStripMenuItem.Click += new System.EventHandler(this.variableToolStripMenuItem_Click);
|
||||
//
|
||||
// hat4ToolStripMenuItem
|
||||
//
|
||||
this.hat4ToolStripMenuItem.Name = "hat4ToolStripMenuItem";
|
||||
|
|
@ -932,13 +849,6 @@ partial class ClientinfoEditor
|
|||
this.hat4dToolStripMenuItem.Text = "%hat4d%";
|
||||
this.hat4dToolStripMenuItem.Click += new System.EventHandler(this.variableToolStripMenuItem_Click);
|
||||
//
|
||||
// hat4wsToolStripMenuItem
|
||||
//
|
||||
this.hat4wsToolStripMenuItem.Name = "hat4wsToolStripMenuItem";
|
||||
this.hat4wsToolStripMenuItem.Size = new System.Drawing.Size(134, 22);
|
||||
this.hat4wsToolStripMenuItem.Text = "%hat4ws%";
|
||||
this.hat4wsToolStripMenuItem.Click += new System.EventHandler(this.variableToolStripMenuItem_Click);
|
||||
//
|
||||
// iconeToolStripMenuItem
|
||||
//
|
||||
this.iconeToolStripMenuItem.Name = "iconeToolStripMenuItem";
|
||||
|
|
@ -1231,9 +1141,6 @@ partial class ClientinfoEditor
|
|||
private System.Windows.Forms.ToolStripMenuItem hat1dToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem hat2dToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem hat3dToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem hat1wsToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem hat2wsToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem hat3wsToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem facesToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem headsToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem tShirtsToolStripMenuItem;
|
||||
|
|
@ -1249,24 +1156,17 @@ partial class ClientinfoEditor
|
|||
private System.Windows.Forms.ToolStripMenuItem argsToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem faceToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem facedToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem facewsToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem headToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem headdToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem headwsToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem tshirtToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem tshirtdToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem tshirtwsToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem shirtToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem shirtdToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem shirtwsToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem pantsToolStripMenuItem1;
|
||||
private System.Windows.Forms.ToolStripMenuItem pantsdToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem pantswsToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem extraToolStripMenuItem1;
|
||||
private System.Windows.Forms.ToolStripMenuItem extradToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem extrawsToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem hat4dToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem hat4wsToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem donothingToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem charappToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem documentationToolStripMenuItem1;
|
||||
|
|
|
|||
47
query.php
47
query.php
|
|
@ -1,24 +1,20 @@
|
|||
<?php
|
||||
//NOVETUS MASTER SERVER QUERY CODE
|
||||
//maybe convert this shit to c# and implement it on the master server...
|
||||
|
||||
//so we can save the server list in shareddata so the server can load it.
|
||||
chdir('shareddata');
|
||||
|
||||
//server name
|
||||
$name = $argv[1];
|
||||
$name = $_GET["name"];
|
||||
//server ip
|
||||
$ip = $argv[2];
|
||||
$ip = $_GET["ip"];
|
||||
//server port
|
||||
$port = $argv[3];
|
||||
$port = $_GET["port"];
|
||||
//client name
|
||||
$client = $argv[4];
|
||||
$client = $_GET["client"];
|
||||
//players
|
||||
$players = $argv[5];
|
||||
$players = $_GET["players"];
|
||||
//maxplayers
|
||||
$maxplayers = $argv[6];
|
||||
$maxplayers = $_GET["maxplayers"];
|
||||
//online status
|
||||
$online = $argv[7];
|
||||
$online = $_GET["online"];
|
||||
|
||||
//strings
|
||||
$deleteentry = 1;
|
||||
|
|
@ -26,24 +22,39 @@ $status = "Offline";
|
|||
|
||||
//ONLY the $name and $client arguments will show up in the master server!
|
||||
$file = 'serverlist.txt';
|
||||
$text = "$name|$ip|$port|$client|$players|$maxplayers\r\n";
|
||||
$text = "$name|$ip|$port|$client";
|
||||
|
||||
if ($online == 1)
|
||||
{
|
||||
$deleteentry = 0;
|
||||
$file_contents = file_get_contents($file);
|
||||
if (strpos($file_contents, $text) === false)
|
||||
|
||||
foreach(file($file) as $line)
|
||||
{
|
||||
file_put_contents($file, $text, FILE_APPEND);
|
||||
if (strpos($line, $text) !== false)
|
||||
{
|
||||
$file_contents = file_get_contents($file);
|
||||
$contents = str_replace($line, '', $file_contents);
|
||||
file_put_contents($file, $contents);
|
||||
}
|
||||
}
|
||||
|
||||
$fulltext = $text."|$players|$maxplayers\r\n";
|
||||
file_put_contents($file, $fulltext, FILE_APPEND);
|
||||
|
||||
$status = "Online";
|
||||
}
|
||||
|
||||
if ($deleteentry == 1)
|
||||
{
|
||||
$file_contents = file_get_contents($file);
|
||||
$contents = str_replace($text, '', $file_contents);
|
||||
file_put_contents($file, $contents);
|
||||
foreach(file($file) as $line)
|
||||
{
|
||||
if (strpos($line, $text) !== false)
|
||||
{
|
||||
$file_contents = file_get_contents($file);
|
||||
$contents = str_replace($line, '', $file_contents);
|
||||
file_put_contents($file, $contents);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Display the server info to browsers.
|
||||
|
|
|
|||
|
|
@ -212,15 +212,15 @@ function LoadTripcode(Player)
|
|||
end
|
||||
end
|
||||
|
||||
function InitalizeClientName(Location)
|
||||
local newName = Instance.new("StringValue",Location)
|
||||
newName.Value = "2006S-Shaders"
|
||||
newName.Name = "Name"
|
||||
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 .. "&players=" .. PlayerService.NumPlayers .. "&maxplayers=" .. PlayerService.MaxPlayers
|
||||
game:httpGet(pingURL .. "&online=" .. online)
|
||||
end
|
||||
|
||||
print("ROBLOX Client version '0.3.512.0' loaded.")
|
||||
|
||||
function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Notifications)
|
||||
function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Notifications,ServerBrowserName,ServerBrowserAddress,ServerIP,Client)
|
||||
Server = game:GetService("NetworkServer")
|
||||
RunService = game:GetService("RunService")
|
||||
PlayerService = game:GetService("Players")
|
||||
|
|
@ -263,6 +263,8 @@ function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Noti
|
|||
Child.Name = "ServerReplicator"
|
||||
end
|
||||
|
||||
PingMasterServer(1, ServerBrowserAddress, ServerBrowserName, ServerIP, Port, Client)
|
||||
|
||||
coroutine.resume(coroutine.create(function()
|
||||
while Player ~= nil do
|
||||
wait(0.1)
|
||||
|
|
@ -285,11 +287,13 @@ function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Noti
|
|||
if (showServerNotifications) then
|
||||
game.Players:Chat("Player '" .. Player.Name .. "' left")
|
||||
end
|
||||
|
||||
PingMasterServer(1, ServerBrowserAddress, ServerBrowserName, ServerIP, Port, Client)
|
||||
end)
|
||||
pcall(function() game.Close:connect(function() Server:Stop() end) end)
|
||||
InitalizeSecurityValues(game.Lighting,ClientEXEMD5,LauncherMD5,ClientScriptMD5)
|
||||
InitalizeClientName(game.Lighting)
|
||||
PingMasterServer(1, ServerBrowserAddress, ServerBrowserName, ServerIP, Port, Client)
|
||||
Server.IncommingConnection:connect(IncommingConnection)
|
||||
pcall(function() game.Close:connect(function() PingMasterServer(0, ServerBrowserAddress, ServerBrowserName, ServerIP, Port, Client) Server:Stop() end) end)
|
||||
end
|
||||
|
||||
function CSConnect(UserID,ServerIP,ServerPort,PlayerName,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,IconType,ItemID,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Tripcode,Ticket)
|
||||
|
|
|
|||
|
|
@ -212,15 +212,15 @@ function LoadTripcode(Player)
|
|||
end
|
||||
end
|
||||
|
||||
function InitalizeClientName(Location)
|
||||
local newName = Instance.new("StringValue",Location)
|
||||
newName.Value = "2006S"
|
||||
newName.Name = "Name"
|
||||
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 .. "&players=" .. PlayerService.NumPlayers .. "&maxplayers=" .. PlayerService.MaxPlayers
|
||||
game:httpGet(pingURL .. "&online=" .. online)
|
||||
end
|
||||
|
||||
print("ROBLOX Client version '0.3.512.0' loaded.")
|
||||
|
||||
function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Notifications)
|
||||
function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Notifications,ServerBrowserName,ServerBrowserAddress,ServerIP,Client)
|
||||
Server = game:GetService("NetworkServer")
|
||||
RunService = game:GetService("RunService")
|
||||
PlayerService = game:GetService("Players")
|
||||
|
|
@ -263,6 +263,8 @@ function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Noti
|
|||
Child.Name = "ServerReplicator"
|
||||
end
|
||||
|
||||
PingMasterServer(1, ServerBrowserAddress, ServerBrowserName, ServerIP, Port, Client)
|
||||
|
||||
coroutine.resume(coroutine.create(function()
|
||||
while Player ~= nil do
|
||||
wait(0.1)
|
||||
|
|
@ -285,11 +287,13 @@ function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Noti
|
|||
if (showServerNotifications) then
|
||||
game.Players:Chat("Player '" .. Player.Name .. "' left")
|
||||
end
|
||||
|
||||
PingMasterServer(1, ServerBrowserAddress, ServerBrowserName, ServerIP, Port, Client)
|
||||
end)
|
||||
pcall(function() game.Close:connect(function() Server:Stop() end) end)
|
||||
InitalizeSecurityValues(game.Lighting,ClientEXEMD5,LauncherMD5,ClientScriptMD5)
|
||||
InitalizeClientName(game.Lighting)
|
||||
PingMasterServer(1, ServerBrowserAddress, ServerBrowserName, ServerIP, Port, Client)
|
||||
Server.IncommingConnection:connect(IncommingConnection)
|
||||
pcall(function() game.Close:connect(function() PingMasterServer(0, ServerBrowserAddress, ServerBrowserName, ServerIP, Port, Client) Server:Stop() end) end)
|
||||
end
|
||||
|
||||
function CSConnect(UserID,ServerIP,ServerPort,PlayerName,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,IconType,ItemID,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Tripcode,Ticket)
|
||||
|
|
|
|||
|
|
@ -262,15 +262,15 @@ function LoadTripcode(Player)
|
|||
end
|
||||
end
|
||||
|
||||
function InitalizeClientName(Location)
|
||||
local newName = Instance.new("StringValue",Location)
|
||||
newName.Value = "2007E"
|
||||
newName.Name = "Name"
|
||||
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 .. "&players=" .. PlayerService.numPlayers .. "&maxplayers=" .. PlayerService.maxPlayers
|
||||
game:httpGet(pingURL .. "&online=" .. online)
|
||||
end
|
||||
|
||||
print("ROBLOX Client version '0.3.368.0' loaded.")
|
||||
|
||||
function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Notifications)
|
||||
function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Notifications,ServerBrowserName,ServerBrowserAddress,ServerIP,Client)
|
||||
Server = game:service("NetworkServer")
|
||||
RunService = game:service("RunService")
|
||||
PlayerService = game:service("Players")
|
||||
|
|
@ -313,6 +313,8 @@ function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Noti
|
|||
Child.Name = "ServerReplicator"
|
||||
end
|
||||
|
||||
PingMasterServer(1, ServerBrowserAddress, ServerBrowserName, ServerIP, Port, Client)
|
||||
|
||||
coroutine.resume(coroutine.create(function()
|
||||
while Player ~= nil do
|
||||
wait(0.1)
|
||||
|
|
@ -335,11 +337,13 @@ function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Noti
|
|||
if (showServerNotifications) then
|
||||
game.Players:Chat("Player '" .. Player.Name .. "' left")
|
||||
end
|
||||
|
||||
PingMasterServer(1, ServerBrowserAddress, ServerBrowserName, ServerIP, Port, Client)
|
||||
end)
|
||||
pcall(function() game.Close:connect(function() Server:stop() end) end)
|
||||
InitalizeSecurityValues(game.Lighting,ClientEXEMD5,LauncherMD5,ClientScriptMD5)
|
||||
InitalizeClientName(game.Lighting)
|
||||
PingMasterServer(1, ServerBrowserAddress, ServerBrowserName, ServerIP, Port, Client)
|
||||
Server.IncommingConnection:connect(IncommingConnection)
|
||||
pcall(function() game.Close:connect(function() PingMasterServer(0, ServerBrowserAddress, ServerBrowserName, ServerIP, Port, Client) Server:stop() end) end)
|
||||
end
|
||||
|
||||
function CSConnect(UserID,ServerIP,ServerPort,PlayerName,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,IconType,ItemID,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Tripcode,Ticket)
|
||||
|
|
|
|||
|
|
@ -308,15 +308,15 @@ function LoadTripcode(Player)
|
|||
end
|
||||
end
|
||||
|
||||
function InitalizeClientName(Location)
|
||||
local newName = Instance.new("StringValue",Location)
|
||||
newName.Value = "2007M-Shaders"
|
||||
newName.Name = "Name"
|
||||
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 .. "&players=" .. PlayerService.NumPlayers .. "&maxplayers=" .. PlayerService.MaxPlayers
|
||||
game:httpGet(pingURL .. "&online=" .. online)
|
||||
end
|
||||
|
||||
print("ROBLOX Client version '0.3.512.0' loaded.")
|
||||
|
||||
function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Notifications)
|
||||
function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Notifications,ServerBrowserName,ServerBrowserAddress,ServerIP,Client)
|
||||
Server = game:GetService("NetworkServer")
|
||||
RunService = game:GetService("RunService")
|
||||
PlayerService = game:GetService("Players")
|
||||
|
|
@ -359,6 +359,8 @@ function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Noti
|
|||
Child.Name = "ServerReplicator"
|
||||
end
|
||||
|
||||
PingMasterServer(1, ServerBrowserAddress, ServerBrowserName, ServerIP, Port, Client)
|
||||
|
||||
coroutine.resume(coroutine.create(function()
|
||||
while Player ~= nil do
|
||||
wait(0.1)
|
||||
|
|
@ -381,11 +383,13 @@ function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Noti
|
|||
if (showServerNotifications) then
|
||||
game.Players:Chat("Player '" .. Player.Name .. "' left")
|
||||
end
|
||||
|
||||
PingMasterServer(1, ServerBrowserAddress, ServerBrowserName, ServerIP, Port, Client)
|
||||
end)
|
||||
pcall(function() game.Close:connect(function() Server:stop() end) end)
|
||||
InitalizeSecurityValues(game.Lighting,ClientEXEMD5,LauncherMD5,ClientScriptMD5)
|
||||
InitalizeClientName(game.Lighting)
|
||||
PingMasterServer(1, ServerBrowserAddress, ServerBrowserName, ServerIP, Port, Client)
|
||||
Server.IncommingConnection:connect(IncommingConnection)
|
||||
pcall(function() game.Close:connect(function() PingMasterServer(0, ServerBrowserAddress, ServerBrowserName, ServerIP, Port, Client) Server:stop() end) end)
|
||||
end
|
||||
|
||||
function CSConnect(UserID,ServerIP,ServerPort,PlayerName,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,IconType,ItemID,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Tripcode,Ticket)
|
||||
|
|
|
|||
|
|
@ -308,15 +308,15 @@ function LoadTripcode(Player)
|
|||
end
|
||||
end
|
||||
|
||||
function InitalizeClientName(Location)
|
||||
local newName = Instance.new("StringValue",Location)
|
||||
newName.Value = "2007M"
|
||||
newName.Name = "Name"
|
||||
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 .. "&players=" .. PlayerService.NumPlayers .. "&maxplayers=" .. PlayerService.MaxPlayers
|
||||
game:httpGet(pingURL .. "&online=" .. online)
|
||||
end
|
||||
|
||||
print("ROBLOX Client version '0.3.512.0' loaded.")
|
||||
|
||||
function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Notifications)
|
||||
function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Notifications,ServerBrowserName,ServerBrowserAddress,ServerIP,Client)
|
||||
Server = game:GetService("NetworkServer")
|
||||
RunService = game:GetService("RunService")
|
||||
PlayerService = game:GetService("Players")
|
||||
|
|
@ -359,6 +359,8 @@ function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Noti
|
|||
Child.Name = "ServerReplicator"
|
||||
end
|
||||
|
||||
PingMasterServer(1, ServerBrowserAddress, ServerBrowserName, ServerIP, Port, Client)
|
||||
|
||||
coroutine.resume(coroutine.create(function()
|
||||
while Player ~= nil do
|
||||
wait(0.1)
|
||||
|
|
@ -381,11 +383,13 @@ function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Noti
|
|||
if (showServerNotifications) then
|
||||
game.Players:Chat("Player '" .. Player.Name .. "' left")
|
||||
end
|
||||
|
||||
PingMasterServer(1, ServerBrowserAddress, ServerBrowserName, ServerIP, Port, Client)
|
||||
end)
|
||||
pcall(function() game.Close:connect(function() Server:stop() end) end)
|
||||
InitalizeSecurityValues(game.Lighting,ClientEXEMD5,LauncherMD5,ClientScriptMD5)
|
||||
InitalizeClientName(game.Lighting)
|
||||
PingMasterServer(1, ServerBrowserAddress, ServerBrowserName, ServerIP, Port, Client)
|
||||
Server.IncommingConnection:connect(IncommingConnection)
|
||||
pcall(function() game.Close:connect(function() PingMasterServer(0, ServerBrowserAddress, ServerBrowserName, ServerIP, Port, Client) Server:stop() end) end)
|
||||
end
|
||||
|
||||
function CSConnect(UserID,ServerIP,ServerPort,PlayerName,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,IconType,ItemID,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Tripcode,Ticket)
|
||||
|
|
|
|||
|
|
@ -399,16 +399,16 @@ function LoadTripcode(Player)
|
|||
end
|
||||
end
|
||||
|
||||
function InitalizeClientName(Location)
|
||||
local newName = Instance.new("StringValue",Location)
|
||||
newName.Value = "2008M"
|
||||
newName.Name = "Name"
|
||||
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 .. "&players=" .. PlayerService.NumPlayers .. "&maxplayers=" .. PlayerService.MaxPlayers
|
||||
game:HttpGet(pingURL .. "&online=" .. online)
|
||||
end
|
||||
|
||||
rbxversion = version()
|
||||
print("ROBLOX Client version '" .. rbxversion .. "' loaded.")
|
||||
|
||||
function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Notifications)
|
||||
function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Notifications,ServerBrowserName,ServerBrowserAddress,ServerIP,Client)
|
||||
Server = game:GetService("NetworkServer")
|
||||
RunService = game:GetService("RunService")
|
||||
Server:start(Port, 20)
|
||||
|
|
@ -451,6 +451,8 @@ function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Noti
|
|||
Child.Name = "ServerReplicator"
|
||||
end
|
||||
|
||||
PingMasterServer(1, ServerBrowserAddress, ServerBrowserName, ServerIP, Port, Client)
|
||||
|
||||
while true do
|
||||
wait(0.001)
|
||||
if (Player.Character ~= nil) then
|
||||
|
|
@ -471,11 +473,13 @@ function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Noti
|
|||
if (showServerNotifications) then
|
||||
game.Players:Chat("Player '" .. Player.Name .. "' left")
|
||||
end
|
||||
|
||||
PingMasterServer(1, ServerBrowserAddress, ServerBrowserName, ServerIP, Port, Client)
|
||||
end)
|
||||
pcall(function() game.Close:connect(function() Server:Stop() end) end)
|
||||
InitalizeSecurityValues(game.Lighting,ClientEXEMD5,LauncherMD5,ClientScriptMD5)
|
||||
InitalizeClientName(game.Lighting)
|
||||
PingMasterServer(1, ServerBrowserAddress, ServerBrowserName, ServerIP, Port, Client)
|
||||
Server.IncommingConnection:connect(IncommingConnection)
|
||||
pcall(function() game.Close:connect(function() PingMasterServer(0, ServerBrowserAddress, ServerBrowserName, ServerIP, Port, Client) Server:Stop() end) end)
|
||||
end
|
||||
|
||||
function CSConnect(UserID,ServerIP,ServerPort,PlayerName,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,IconType,ItemID,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Tripcode,Ticket)
|
||||
|
|
|
|||
|
|
@ -459,16 +459,16 @@ function LoadTripcode(Player)
|
|||
end
|
||||
end
|
||||
|
||||
function InitalizeClientName(Location)
|
||||
local newName = Instance.new("StringValue",Location)
|
||||
newName.Value = "2009E"
|
||||
newName.Name = "Name"
|
||||
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 .. "&players=" .. PlayerService.NumPlayers .. "&maxplayers=" .. PlayerService.MaxPlayers
|
||||
game:HttpGet(pingURL .. "&online=" .. online)
|
||||
end
|
||||
|
||||
rbxversion = version()
|
||||
print("ROBLOX Client version '" .. rbxversion .. "' loaded.")
|
||||
|
||||
function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Notifications)
|
||||
function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Notifications,ServerBrowserName,ServerBrowserAddress,ServerIP,Client)
|
||||
Server = game:GetService("NetworkServer")
|
||||
RunService = game:GetService("RunService")
|
||||
Server:start(Port, 20)
|
||||
|
|
@ -511,6 +511,8 @@ function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Noti
|
|||
Child.Name = "ServerReplicator"
|
||||
end
|
||||
|
||||
PingMasterServer(1, ServerBrowserAddress, ServerBrowserName, ServerIP, Port, Client)
|
||||
|
||||
while true do
|
||||
wait(0.001)
|
||||
if (Player.Character ~= nil) then
|
||||
|
|
@ -531,12 +533,15 @@ function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Noti
|
|||
if (showServerNotifications) then
|
||||
game.Players:Chat("Player '" .. Player.Name .. "' left")
|
||||
end
|
||||
|
||||
PingMasterServer(1, ServerBrowserAddress, ServerBrowserName, ServerIP, Port, Client)
|
||||
end)
|
||||
pcall(function() game.Close:connect(function() Server:Stop() end) end)
|
||||
InitalizeSecurityValues(game.Lighting,ClientEXEMD5,LauncherMD5,ClientScriptMD5)
|
||||
InitalizeClientName(game.Lighting)
|
||||
PingMasterServer(1, ServerBrowserAddress, ServerBrowserName, ServerIP, Port, Client)
|
||||
Server.IncommingConnection:connect(IncommingConnection)
|
||||
pcall(function() game.Close:connect(function() PingMasterServer(0, ServerBrowserAddress, ServerBrowserName, ServerIP, Port, Client) Server:Stop() end) end)
|
||||
end
|
||||
|
||||
function CSConnect(UserID,ServerIP,ServerPort,PlayerName,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,IconType,ItemID,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Tripcode,Ticket)
|
||||
pcall(function() game:SetPlaceID(-1, false) end)
|
||||
pcall(function() game:GetService("Players"):SetChatStyle(Enum.ChatStyle.ClassicAndBubble) end)
|
||||
|
|
|
|||
|
|
@ -462,16 +462,16 @@ function LoadTripcode(Player)
|
|||
end
|
||||
end
|
||||
|
||||
function InitalizeClientName(Location)
|
||||
local newName = Instance.new("StringValue",Location)
|
||||
newName.Value = "2009L"
|
||||
newName.Name = "Name"
|
||||
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 .. "&players=" .. PlayerService.NumPlayers .. "&maxplayers=" .. PlayerService.MaxPlayers
|
||||
game:HttpGet(pingURL .. "&online=" .. online)
|
||||
end
|
||||
|
||||
rbxversion = version()
|
||||
print("ROBLOX Client version '" .. rbxversion .. "' loaded.")
|
||||
|
||||
function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Notifications)
|
||||
function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Notifications,ServerBrowserName,ServerBrowserAddress,ServerIP,Client)
|
||||
assert((type(Port)~="number" or tonumber(Port)~=nil or Port==nil),"CSRun Error: Port must be nil or a number.")
|
||||
local NetworkServer=game:GetService("NetworkServer")
|
||||
local RunService = game:GetService("RunService")
|
||||
|
|
@ -511,6 +511,8 @@ function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Noti
|
|||
for _,Child in pairs(NetworkServer:GetChildren()) do
|
||||
Child.Name = "ServerReplicator"
|
||||
end
|
||||
|
||||
PingMasterServer(1, ServerBrowserAddress, ServerBrowserName, ServerIP, Port, Client)
|
||||
end)
|
||||
|
||||
Player.Changed:connect(function(Property)
|
||||
|
|
@ -532,13 +534,15 @@ function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Noti
|
|||
if (showServerNotifications) then
|
||||
game.Players:Chat("Player '" .. Player.Name .. "' left")
|
||||
end
|
||||
|
||||
PingMasterServer(1, ServerBrowserAddress, ServerBrowserName, ServerIP, Port, Client)
|
||||
end)
|
||||
RunService:Run()
|
||||
game.Workspace:InsertContent("rbxasset://Fonts//libraries.rbxm")
|
||||
InitalizeSecurityValues(game.Lighting,ClientEXEMD5,LauncherMD5,ClientScriptMD5)
|
||||
InitalizeClientName(game.Lighting)
|
||||
pcall(function() game.Close:connect(function() NetworkServer:Stop() end) end)
|
||||
PingMasterServer(1, ServerBrowserAddress, ServerBrowserName, ServerIP, Port, Client)
|
||||
NetworkServer.IncommingConnection:connect(IncommingConnection)
|
||||
pcall(function() game.Close:connect(function() PingMasterServer(0, ServerBrowserAddress, ServerBrowserName, ServerIP, Port, Client) NetworkServer:Stop() end) end)
|
||||
end
|
||||
|
||||
function CSConnect(UserID,ServerIP,ServerPort,PlayerName,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,IconType,ItemID,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Tripcode,Ticket)
|
||||
|
|
|
|||
|
|
@ -462,16 +462,16 @@ function LoadTripcode(Player)
|
|||
end
|
||||
end
|
||||
|
||||
function InitalizeClientName(Location)
|
||||
local newName = Instance.new("StringValue",Location)
|
||||
newName.Value = "2010L"
|
||||
newName.Name = "Name"
|
||||
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 .. "&players=" .. PlayerService.NumPlayers .. "&maxplayers=" .. PlayerService.MaxPlayers
|
||||
game:HttpGet(pingURL .. "&online=" .. online)
|
||||
end
|
||||
|
||||
rbxversion = version()
|
||||
print("ROBLOX Client version '" .. rbxversion .. "' loaded.")
|
||||
|
||||
function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Notifications)
|
||||
function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Notifications,ServerBrowserName,ServerBrowserAddress,ServerIP,Client)
|
||||
assert((type(Port)~="number" or tonumber(Port)~=nil or Port==nil),"CSRun Error: Port must be nil or a number.")
|
||||
local NetworkServer=game:GetService("NetworkServer")
|
||||
local RunService = game:GetService("RunService")
|
||||
|
|
@ -511,6 +511,8 @@ function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Noti
|
|||
for _,Child in pairs(NetworkServer:GetChildren()) do
|
||||
Child.Name = "ServerReplicator"
|
||||
end
|
||||
|
||||
PingMasterServer(1, ServerBrowserAddress, ServerBrowserName, ServerIP, Port, Client)
|
||||
end)
|
||||
|
||||
Player.Changed:connect(function(Property)
|
||||
|
|
@ -532,13 +534,15 @@ function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Noti
|
|||
if (showServerNotifications) then
|
||||
game.Players:Chat("Player '" .. Player.Name .. "' left")
|
||||
end
|
||||
|
||||
PingMasterServer(1, ServerBrowserAddress, ServerBrowserName, ServerIP, Port, Client)
|
||||
end)
|
||||
RunService:Run()
|
||||
game.Workspace:InsertContent("rbxasset://Fonts//libraries.rbxm")
|
||||
InitalizeSecurityValues(game.Lighting,ClientEXEMD5,LauncherMD5,ClientScriptMD5)
|
||||
InitalizeClientName(game.Lighting)
|
||||
pcall(function() game.Close:connect(function() NetworkServer:Stop() end) end)
|
||||
PingMasterServer(1, ServerBrowserAddress, ServerBrowserName, ServerIP, Port, Client)
|
||||
NetworkServer.IncommingConnection:connect(IncommingConnection)
|
||||
pcall(function() game.Close:connect(function() PingMasterServer(0, ServerBrowserAddress, ServerBrowserName, ServerIP, Port, Client) NetworkServer:Stop() end) end)
|
||||
end
|
||||
|
||||
function CSConnect(UserID,ServerIP,ServerPort,PlayerName,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,IconType,ItemID,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Tripcode,Ticket)
|
||||
|
|
|
|||
|
|
@ -480,16 +480,16 @@ function LoadTripcode(Player)
|
|||
end
|
||||
end
|
||||
|
||||
function InitalizeClientName(Location)
|
||||
local newName = Instance.new("StringValue",Location)
|
||||
newName.Value = "2011E"
|
||||
newName.Name = "Name"
|
||||
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 .. "&players=" .. PlayerService.NumPlayers .. "&maxplayers=" .. PlayerService.MaxPlayers
|
||||
game:HttpGet(pingURL .. "&online=" .. online)
|
||||
end
|
||||
|
||||
rbxversion = version()
|
||||
print("ROBLOX Client version '" .. rbxversion .. "' loaded.")
|
||||
|
||||
function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Notifications)
|
||||
function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Notifications,ServerBrowserName,ServerBrowserAddress,ServerIP,Client)
|
||||
assert((type(Port)~="number" or tonumber(Port)~=nil or Port==nil),"CSRun Error: Port must be nil or a number.")
|
||||
local NetworkServer=game:GetService("NetworkServer")
|
||||
local RunService = game:GetService("RunService")
|
||||
|
|
@ -524,6 +524,8 @@ function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Noti
|
|||
if (char ~= nil) then
|
||||
LoadCharacterNew(newWaitForChildSecurity(Player,"Appearance"),char)
|
||||
end
|
||||
|
||||
PingMasterServer(1, ServerBrowserAddress, ServerBrowserName, ServerIP, Port, Client)
|
||||
end)
|
||||
|
||||
Player.Changed:connect(function(Property)
|
||||
|
|
@ -545,13 +547,15 @@ function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Noti
|
|||
if (showServerNotifications) then
|
||||
game.Players:Chat("Player '" .. Player.Name .. "' left")
|
||||
end
|
||||
|
||||
PingMasterServer(1, ServerBrowserAddress, ServerBrowserName, ServerIP, Port, Client)
|
||||
end)
|
||||
RunService:Run()
|
||||
game.Workspace:InsertContent("rbxasset://Fonts//libraries.rbxm")
|
||||
InitalizeSecurityValues(game.Lighting,ClientEXEMD5,LauncherMD5,ClientScriptMD5)
|
||||
InitalizeClientName(game.Lighting)
|
||||
pcall(function() game.Close:connect(function() NetworkServer:Stop() end) end)
|
||||
PingMasterServer(1, ServerBrowserAddress, ServerBrowserName, ServerIP, Port, Client)
|
||||
NetworkServer.IncommingConnection:connect(IncommingConnection)
|
||||
pcall(function() game.Close:connect(function() PingMasterServer(0, ServerBrowserAddress, ServerBrowserName, ServerIP, Port, Client) NetworkServer:Stop() end) end)
|
||||
end
|
||||
|
||||
function CSConnect(UserID,ServerIP,ServerPort,PlayerName,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,IconType,ItemID,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Tripcode,Ticket)
|
||||
|
|
|
|||
|
|
@ -471,16 +471,16 @@ function LoadTripcode(Player)
|
|||
end
|
||||
end
|
||||
|
||||
function InitalizeClientName(Location)
|
||||
local newName = Instance.new("StringValue",Location)
|
||||
newName.Value = "2011M"
|
||||
newName.Name = "Name"
|
||||
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 .. "&players=" .. PlayerService.NumPlayers .. "&maxplayers=" .. PlayerService.MaxPlayers
|
||||
game:HttpGet(pingURL .. "&online=" .. online)
|
||||
end
|
||||
|
||||
rbxversion = version()
|
||||
print("ROBLOX Client version '" .. rbxversion .. "' loaded.")
|
||||
|
||||
function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Notifications)
|
||||
function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Notifications,ServerBrowserName,ServerBrowserAddress,ServerIP,Client)
|
||||
assert((type(Port)~="number" or tonumber(Port)~=nil or Port==nil),"CSRun Error: Port must be nil or a number.")
|
||||
local NetworkServer=game:GetService("NetworkServer")
|
||||
local RunService = game:GetService("RunService")
|
||||
|
|
@ -515,6 +515,8 @@ function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Noti
|
|||
if (char ~= nil) then
|
||||
LoadCharacterNew(newWaitForChildSecurity(Player,"Appearance"),char)
|
||||
end
|
||||
|
||||
PingMasterServer(1, ServerBrowserAddress, ServerBrowserName, ServerIP, Port, Client)
|
||||
end)
|
||||
|
||||
Player.Changed:connect(function(Property)
|
||||
|
|
@ -536,13 +538,15 @@ function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Noti
|
|||
if (showServerNotifications) then
|
||||
game.Players:Chat("Player '" .. Player.Name .. "' left")
|
||||
end
|
||||
|
||||
PingMasterServer(1, ServerBrowserAddress, ServerBrowserName, ServerIP, Port, Client)
|
||||
end)
|
||||
RunService:Run()
|
||||
game.Workspace:InsertContent("rbxasset://Fonts//libraries.rbxm")
|
||||
InitalizeSecurityValues(game.Lighting,ClientEXEMD5,LauncherMD5,ClientScriptMD5)
|
||||
InitalizeClientName(game.Lighting)
|
||||
pcall(function() game.Close:connect(function() NetworkServer:Stop() end) end)
|
||||
PingMasterServer(1, ServerBrowserAddress, ServerBrowserName, ServerIP, Port, Client)
|
||||
NetworkServer.IncommingConnection:connect(IncommingConnection)
|
||||
pcall(function() game.Close:connect(function() PingMasterServer(0, ServerBrowserAddress, ServerBrowserName, ServerIP, Port, Client) NetworkServer:Stop() end) end)
|
||||
end
|
||||
|
||||
function CSConnect(UserID,ServerIP,ServerPort,PlayerName,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,IconType,ItemID,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Tripcode,Ticket)
|
||||
|
|
|
|||
Loading…
Reference in New Issue