diff --git a/Novetus/Novetus.Bootstrapper/Properties/AssemblyInfo.cs b/Novetus/Novetus.Bootstrapper/Properties/AssemblyInfo.cs index 0c88c44..78caa37 100644 --- a/Novetus/Novetus.Bootstrapper/Properties/AssemblyInfo.cs +++ b/Novetus/Novetus.Bootstrapper/Properties/AssemblyInfo.cs @@ -10,7 +10,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Bitl")] [assembly: AssemblyProduct("Novetus")] -[assembly: AssemblyCopyright("(c) Bitl 2018-2020. All rights to ROBLOX go to the ROBLOX Corporation.")] +[assembly: AssemblyCopyright("(c) Bitl 2018-2021. All rights to Roblox go to the Roblox Corporation.")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] diff --git a/Novetus/Novetus.ClientScriptTester/Properties/AssemblyInfo.cs b/Novetus/Novetus.ClientScriptTester/Properties/AssemblyInfo.cs index 1650cf5..63b9fe1 100644 --- a/Novetus/Novetus.ClientScriptTester/Properties/AssemblyInfo.cs +++ b/Novetus/Novetus.ClientScriptTester/Properties/AssemblyInfo.cs @@ -12,7 +12,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Bitl")] [assembly: AssemblyProduct("Novetus")] -[assembly: AssemblyCopyright("(c) Bitl 2018-2020. All rights to ROBLOX go to the ROBLOX Corporation.")] +[assembly: AssemblyCopyright("(c) Bitl 2018-2021. All rights to Roblox go to the Roblox Corporation.")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] diff --git a/Novetus/Novetus.ReleasePreparer/Properties/AssemblyInfo.cs b/Novetus/Novetus.ReleasePreparer/Properties/AssemblyInfo.cs index daedc1b..441fdf7 100644 --- a/Novetus/Novetus.ReleasePreparer/Properties/AssemblyInfo.cs +++ b/Novetus/Novetus.ReleasePreparer/Properties/AssemblyInfo.cs @@ -10,7 +10,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Bitl")] [assembly: AssemblyProduct("ReleasePreparer")] -[assembly: AssemblyCopyright("Copyright © 2020")] +[assembly: AssemblyCopyright("(c) Bitl 2018-2021. All rights to Roblox go to the Roblox Corporation.")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] diff --git a/Novetus/NovetusCMD/NovetusCMD.cs b/Novetus/NovetusCMD/NovetusCMD.cs index c69a6e7..be346d2 100644 --- a/Novetus/NovetusCMD/NovetusCMD.cs +++ b/Novetus/NovetusCMD/NovetusCMD.cs @@ -174,6 +174,7 @@ namespace NovetusCMD static void ProgramClose(object sender, EventArgs e) { + //add check for open server if (GlobalVars.ProcessID != 0) { if (LocalFuncs.ProcessExists(GlobalVars.ProcessID)) @@ -317,7 +318,8 @@ namespace NovetusCMD static void ServerExited(object sender, EventArgs e) { - GlobalFuncs.PingMasterServer(0); + GlobalVars.IsServerOpen = false; + GlobalFuncs.PingMasterServer(0, "The server has removed itself from the master server list."); Environment.Exit(0); } #endregion diff --git a/Novetus/NovetusCMD/Properties/AssemblyInfo.cs b/Novetus/NovetusCMD/Properties/AssemblyInfo.cs index 3aa1ebf..4026398 100644 --- a/Novetus/NovetusCMD/Properties/AssemblyInfo.cs +++ b/Novetus/NovetusCMD/Properties/AssemblyInfo.cs @@ -11,7 +11,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Bitl")] [assembly: AssemblyProduct("Novetus")] -[assembly: AssemblyCopyright("(c) Bitl 2018-2020. All rights to ROBLOX go to the ROBLOX Corporation.")] +[assembly: AssemblyCopyright("(c) Bitl 2018-2021. All rights to Roblox go to the Roblox Corporation.")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] diff --git a/Novetus/NovetusCore/Classes/FileFormat.cs b/Novetus/NovetusCore/Classes/FileFormat.cs index 8c27431..b87e67d 100644 --- a/Novetus/NovetusCore/Classes/FileFormat.cs +++ b/Novetus/NovetusCore/Classes/FileFormat.cs @@ -70,6 +70,7 @@ public class FileFormat ServerBrowserServerAddress = "localhost"; Priority = ProcessPriorityClass.RealTime; InitialBootup = true; + FirstServerLaunch = true; } public string SelectedClient { get; set; } @@ -99,6 +100,7 @@ public class FileFormat public string ServerBrowserServerAddress { get; set; } public ProcessPriorityClass Priority { get; set; } public bool InitialBootup { get; set; } + public bool FirstServerLaunch { get; set; } } #endregion diff --git a/Novetus/NovetusCore/StorageAndFunctions/GlobalFuncs.cs b/Novetus/NovetusCore/StorageAndFunctions/GlobalFuncs.cs index 07597b2..266e5c0 100644 --- a/Novetus/NovetusCore/StorageAndFunctions/GlobalFuncs.cs +++ b/Novetus/NovetusCore/StorageAndFunctions/GlobalFuncs.cs @@ -152,6 +152,7 @@ public class GlobalFuncs ini.IniWriteValue(section, "ServerBrowserServerAddress", GlobalVars.UserConfiguration.ServerBrowserServerAddress.ToString()); ini.IniWriteValue(section, "ClientLaunchPriority", ((int)GlobalVars.UserConfiguration.Priority).ToString()); ini.IniWriteValue(section, "InitialBootup", GlobalVars.UserConfiguration.InitialBootup.ToString()); + ini.IniWriteValue(section, "FirstServerLaunch", GlobalVars.UserConfiguration.FirstServerLaunch.ToString()); } else { @@ -162,7 +163,8 @@ public class GlobalFuncs map, port, limit, upnp, disablehelpmessage, tripcode, discord, mappath, mapsnip, graphics, reshade, qualitylevel, style, savebackups, altIP, - disReshadeDel, showNotifs, SB_Name, SB_Address, priority, initialBootup; + disReshadeDel, showNotifs, SB_Name, SB_Address, priority, initialBootup, + firstServerLaunch; INIFile ini = new INIFile(cfgpath); @@ -193,6 +195,7 @@ public class GlobalFuncs SB_Address = ini.IniReadValue(section, "ServerBrowserServerAddress", GlobalVars.UserConfiguration.ServerBrowserServerAddress.ToString()); priority = ini.IniReadValue(section, "ClientLaunchPriority", ((int)GlobalVars.UserConfiguration.Priority).ToString()); initialBootup = ini.IniReadValue(section, "InitialBootup", GlobalVars.UserConfiguration.InitialBootup.ToString()); + firstServerLaunch = ini.IniReadValue(section, "FirstServerLaunch", GlobalVars.UserConfiguration.FirstServerLaunch.ToString()); GlobalVars.UserConfiguration.CloseOnLaunch = Convert.ToBoolean(closeonlaunch); @@ -256,6 +259,7 @@ public class GlobalFuncs GlobalVars.UserConfiguration.ServerBrowserServerAddress = SB_Address; GlobalVars.UserConfiguration.Priority = (ProcessPriorityClass)Convert.ToInt32(priority); GlobalVars.UserConfiguration.InitialBootup = Convert.ToBoolean(initialBootup); + GlobalVars.UserConfiguration.FirstServerLaunch = Convert.ToBoolean(firstServerLaunch); } #if URI || LAUNCHER || CMD catch (Exception ex) @@ -1808,6 +1812,36 @@ public class GlobalFuncs #endif { + if (type.Equals(ScriptType.Server)) + { + if (GlobalVars.IsServerOpen) + { +#if LAUNCHER + if (box != null) + { + ConsolePrint("ERROR - Failed to launch Novetus. (A server is already running.)", 2, box); + } +#elif CMD + ConsolePrint("ERROR - Failed to launch Novetus. (A server is already running.)", 2); +#endif + +#if LAUNCHER + MessageBox.Show("Failed to launch Novetus. (Error: A server is already running.)", "Novetus - Error", MessageBoxButtons.OK, MessageBoxIcon.Error); +#endif + return; + } + else if (GlobalVars.UserConfiguration.FirstServerLaunch) + { +#if LAUNCHER + MessageBox.Show("For your first time hosting a server, make sure your server's port forwarded (set up in your router), going through a tunnel server, or running from UPnP.\nIf your port is forwarded or you are going through a tunnel server, make sure your port is set up as UDP, not TCP.\nRoblox does NOT use TCP, only UDP.", "Novetus - Hosting Tips", MessageBoxButtons.OK, MessageBoxIcon.Error); +#elif CMD + ConsolePrint("For your first time hosting a server, make sure your server's port forwarded (set up in your router), going through a tunnel server, or running from UPnP.\nIf your port is forwarded or you are going through a tunnel server, make sure your port is set up as UDP, not TCP.\nRoblox does NOT use TCP, only UDP.\nPress any key to continue...", 4); + Console.ReadKey(); +#endif + GlobalVars.UserConfiguration.FirstServerLaunch = false; + } + } + #if LAUNCHER ReadClientValues(ClientName, box); #else @@ -1918,13 +1952,14 @@ public class GlobalFuncs if (type.Equals(ScriptType.Server)) { + GlobalVars.IsServerOpen = true; #if LAUNCHER if (box != null) { - PingMasterServer(1, box); + PingMasterServer(1, "Server will now display on the defined master server.", box); } #elif CMD - PingMasterServer(1); + PingMasterServer(1, "Server will now display on the defined master server."); #endif } } @@ -1958,9 +1993,9 @@ public class GlobalFuncs } #if LAUNCHER - public static void PingMasterServer(int online, RichTextBox box) + public static void PingMasterServer(int online, string reason, RichTextBox box) #else - public static void PingMasterServer(int online) + public static void PingMasterServer(int online, string reason) #endif { string pingURL = "http://" + GlobalVars.UserConfiguration.ServerBrowserServerAddress + @@ -1972,15 +2007,15 @@ public class GlobalFuncs "&online=" + online; #if LAUNCHER - ConsolePrint("Pinging master server.", 4, box); + ConsolePrint("Pinging master server. " + reason, 4, box); #elif CMD - ConsolePrint("Pinging master server.", 4); + ConsolePrint("Pinging master server. " + reason, 4); #endif string response = HttpGet(pingURL); #if LAUNCHER - ConsolePrint(!response.Contains("ERROR:") ? "Pinging done. Response from the server was: " + response : response, response.Contains("ERROR:") ? 2 : 4, box); + ConsolePrint(!response.Contains("ERROR:") ? "Pinging was successful." : "Unable to connect to the master server. Error: " + response, response.Contains("ERROR:") ? 2 : 4, box); #elif CMD - ConsolePrint(!response.Contains("ERROR:") ? "Pinging done. Response from the server was: " + response : response, response.Contains("ERROR:") ? 2 : 4); + ConsolePrint(!response.Contains("ERROR:") ? "Pinging was successful." : "Unable to connect to the master server. Error: " + response, response.Contains("ERROR:") ? 2 : 4); #endif } diff --git a/Novetus/NovetusCore/StorageAndFunctions/GlobalVars.cs b/Novetus/NovetusCore/StorageAndFunctions/GlobalVars.cs index 4e2506a..a7ac3a2 100644 --- a/Novetus/NovetusCore/StorageAndFunctions/GlobalVars.cs +++ b/Novetus/NovetusCore/StorageAndFunctions/GlobalVars.cs @@ -42,6 +42,7 @@ public static class GlobalVars public static string ExternalIP = SecurityFuncs.GetExternalIPAddress(); public static int DefaultRobloxPort = 53640; public static int JoinPort = DefaultRobloxPort; + public static bool IsServerOpen = false; #endregion #region NovetusCMD diff --git a/Novetus/NovetusCore/StorageAndFunctions/ScriptFuncs.cs b/Novetus/NovetusCore/StorageAndFunctions/ScriptFuncs.cs index 919559c..2c17bf0 100644 --- a/Novetus/NovetusCore/StorageAndFunctions/ScriptFuncs.cs +++ b/Novetus/NovetusCore/StorageAndFunctions/ScriptFuncs.cs @@ -73,7 +73,7 @@ public class ScriptFuncs + GlobalVars.UserConfiguration.RobloxPort + "," + GlobalVars.UserConfiguration.PlayerLimit + "," + md5s + "," - + GlobalVars.UserConfiguration.ShowServerNotifications.ToString().ToLower() + "');"; + + GlobalVars.UserConfiguration.ShowServerNotifications.ToString().ToLower() + ");"; case ScriptType.Solo: case ScriptType.EasterEgg: return "_G.CSSolo(" diff --git a/Novetus/NovetusLauncher/Classes/Launcher/GameServer.cs b/Novetus/NovetusLauncher/Classes/Launcher/GameServer.cs deleted file mode 100644 index 8c47961..0000000 --- a/Novetus/NovetusLauncher/Classes/Launcher/GameServer.cs +++ /dev/null @@ -1,65 +0,0 @@ -#region Usings -using System; -using System.Net.Sockets; -#endregion - -#region Game Server Definition -public class GameServer -{ - public GameServer(string name, string ip, string port, string client) - { - ServerName = SecurityFuncs.Base64DecodeOld(name); - ServerIP = SecurityFuncs.Base64DecodeOld(ip); - ServerPort = Convert.ToInt32(SecurityFuncs.Base64DecodeOld(port)); - ServerClient = SecurityFuncs.Base64DecodeOld(client); - ServerStatus = PingServer(ServerIP, ServerPort); - } - - public bool IsValid() - { - if (!string.IsNullOrWhiteSpace(ServerName) && - !string.IsNullOrWhiteSpace(ServerClient) && - !string.IsNullOrWhiteSpace(ServerIP) && - !string.IsNullOrWhiteSpace(ServerPort.ToString()) && - GlobalFuncs.IsClientValid(ServerClient) && - GlobalFuncs.IsIPValid(ServerIP) && - (!ServerIP.Equals("localhost") || !ServerIP.Equals("127.0.0.1")) && - !GetStatusString().Equals("Offline")) - { - return true; - } - else - { - return false; - } - } - - //Modified from https://stackoverflow.com/questions/22903861/how-to-check-remote-ip-and-port-is-available - public static bool PingServer(string hostUri, int portNumber) - { - try - { - using (var client = new UdpClient(hostUri, portNumber)) - return true; - } - catch (SocketException ex) - { -#if URI || LAUNCHER || CMD - GlobalFuncs.LogExceptions(ex); -#endif - return false; - } - } - - public string GetStatusString() - { - return (ServerStatus ? "Online" : "Offline"); - } - - public string ServerName { get; set; } - public string ServerIP { get; set; } - public int ServerPort { get; set; } - public string ServerClient { get; set; } - public bool ServerStatus { get; set; } -} -#endregion diff --git a/Novetus/NovetusLauncher/Forms/CustomGraphicsOptions.cs b/Novetus/NovetusLauncher/Forms/CustomGraphicsOptions.cs index e3711f5..64bda6c 100644 --- a/Novetus/NovetusLauncher/Forms/CustomGraphicsOptions.cs +++ b/Novetus/NovetusLauncher/Forms/CustomGraphicsOptions.cs @@ -305,7 +305,7 @@ namespace NovetusLauncher if (!hasFoundDir) { - MessageBox.Show("This client does not support setting adjustment through the Novetus Launcher.\nTry opening this client in ROBLOX Studio and adjust it through the settings in Tools -> Settings.", "Novetus - Error", MessageBoxButtons.OK, MessageBoxIcon.Error); + MessageBox.Show("This client does not support setting adjustment through the Novetus Launcher.\nTry opening this client in Roblox Studio and adjust it through the settings in Tools -> Settings.", "Novetus - Error", MessageBoxButtons.OK, MessageBoxIcon.Error); Close(); } diff --git a/Novetus/NovetusLauncher/Forms/LauncherForm/Compact/LauncherFormCompact.Designer.cs b/Novetus/NovetusLauncher/Forms/LauncherForm/Compact/LauncherFormCompact.Designer.cs index 78b8dbd..43ce37c 100644 --- a/Novetus/NovetusLauncher/Forms/LauncherForm/Compact/LauncherFormCompact.Designer.cs +++ b/Novetus/NovetusLauncher/Forms/LauncherForm/Compact/LauncherFormCompact.Designer.cs @@ -586,7 +586,7 @@ namespace NovetusLauncher this.tabPage3.Size = new System.Drawing.Size(405, 258); this.tabPage3.TabIndex = 4; this.tabPage3.Text = "VERSIONS"; - this.tabPage3.ToolTipText = "Select a ROBLOX Client to load your game"; + this.tabPage3.ToolTipText = "Select a Roblox Client to load your game"; this.tabPage3.UseVisualStyleBackColor = true; // // textBox6 diff --git a/Novetus/NovetusLauncher/Forms/LauncherForm/Extended/LauncherFormExtended.Designer.cs b/Novetus/NovetusLauncher/Forms/LauncherForm/Extended/LauncherFormExtended.Designer.cs index ca374d1..0844ced 100644 --- a/Novetus/NovetusLauncher/Forms/LauncherForm/Extended/LauncherFormExtended.Designer.cs +++ b/Novetus/NovetusLauncher/Forms/LauncherForm/Extended/LauncherFormExtended.Designer.cs @@ -900,7 +900,7 @@ namespace NovetusLauncher this.tabPage3.Size = new System.Drawing.Size(625, 265); this.tabPage3.TabIndex = 4; this.tabPage3.Text = "VERSIONS"; - this.tabPage3.ToolTipText = "Select a ROBLOX Client to load your game"; + this.tabPage3.ToolTipText = "Select a Roblox Client to load your game"; this.tabPage3.UseVisualStyleBackColor = true; // // textBox6 diff --git a/Novetus/NovetusLauncher/Forms/LauncherForm/LauncherFormShared.cs b/Novetus/NovetusLauncher/Forms/LauncherForm/LauncherFormShared.cs index 9b64adc..6a883c6 100644 --- a/Novetus/NovetusLauncher/Forms/LauncherForm/LauncherFormShared.cs +++ b/Novetus/NovetusLauncher/Forms/LauncherForm/LauncherFormShared.cs @@ -293,15 +293,25 @@ namespace NovetusLauncher { if (GlobalVars.AdminMode) { - DialogResult closeNovetus = MessageBox.Show("You are in Admin Mode.\nAre you sure you want to quit Novetus?", "Novetus - Admin Mode Warning", MessageBoxButtons.YesNo, MessageBoxIcon.Warning); - if (closeNovetus == DialogResult.No) - { - e.Cancel = true; - } - else - { - CloseEventInternal(); - } + ShowCloseWarning("You are in Admin Mode.", "Admin Mode", e); + } + + if (GlobalVars.IsServerOpen) + { + ShowCloseWarning("A server is open.", "Server", e); + } + } + + private void ShowCloseWarning(string text, string title, CancelEventArgs e) + { + DialogResult closeNovetus = MessageBox.Show(text + "\nAre you sure you want to quit Novetus?", "Novetus - " + title + " Warning", MessageBoxButtons.YesNo, MessageBoxIcon.Warning); + if (closeNovetus == DialogResult.No) + { + e.Cancel = true; + } + else + { + CloseEventInternal(); } } @@ -420,7 +430,7 @@ namespace NovetusLauncher { if (gameType == ScriptType.Studio) { - DialogResult result = MessageBox.Show("If you want to test out your place, you will have to save your place in Novetus's map folder, then launch your place in Play Solo.\n\nPress Yes to launch Studio with a map, or No to launch Studio without a map.", "Novetus - Launch ROBLOX Studio", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Information); + DialogResult result = MessageBox.Show("If you want to test out your place, you will have to save your place in Novetus's map folder, then launch your place in Play Solo.\n\nPress Yes to launch Studio with a map, or No to launch Studio without a map.", "Novetus - Launch Roblox Studio", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Information); bool nomapLegacy = false; switch (result) @@ -530,7 +540,8 @@ namespace NovetusLauncher void ServerExited(object sender, EventArgs e) { - GlobalFuncs.PingMasterServer(0, ConsoleBox); + GlobalVars.IsServerOpen = false; + GlobalFuncs.PingMasterServer(0, "The server has removed itself from the master server list.", ConsoleBox); ClientExitedBase(sender, e); } @@ -1272,9 +1283,9 @@ namespace NovetusLauncher { using (var ofd = new OpenFileDialog()) { - ofd.Filter = "ROBLOX Level (*.rbxl)|*.rbxl|ROBLOX Level (*.rbxlx)|*.rbxlx"; + ofd.Filter = "Roblox Level (*.rbxl)|*.rbxl|Roblox Level (*.rbxlx)|*.rbxlx"; ofd.FilterIndex = 1; - ofd.Title = "Load ROBLOX map"; + ofd.Title = "Load Roblox map"; if (ofd.ShowDialog() == DialogResult.OK) { if (!Directory.Exists(GlobalPaths.MapsDirCustom)) diff --git a/Novetus/NovetusLauncher/Forms/SDK/AssetSDK.cs b/Novetus/NovetusLauncher/Forms/SDK/AssetSDK.cs index a8e1128..8a59c20 100644 --- a/Novetus/NovetusLauncher/Forms/SDK/AssetSDK.cs +++ b/Novetus/NovetusLauncher/Forms/SDK/AssetSDK.cs @@ -102,7 +102,7 @@ public partial class AssetSDK : Form { if (!GlobalVars.UserConfiguration.DisabledItemMakerHelp) { - string helptext = "If you're trying to create a offline item, please use these file extension names when saving your files:\n.rbxm - ROBLOX Model/Item\n.rbxl - ROBLOX Place\n.mesh - ROBLOX Mesh\n.png - Texture/Icon\n.wav - Sound"; + string helptext = "If you're trying to create a offline item, please use these file extension names when saving your files:\n.rbxm - Roblox Model/Item\n.rbxl - Roblox Place\n.mesh - Roblox Mesh\n.png - Texture/Icon\n.wav - Sound"; MessageBox.Show(helptext, "Novetus Asset SDK", MessageBoxButtons.OK, MessageBoxIcon.Information); } @@ -525,20 +525,20 @@ public partial class AssetSDK : Form switch (type) { case RobloxFileType.RBXL: - typeFilter = "ROBLOX Level (*.rbxl)|*.rbxl|ROBLOX Level (*.rbxlx)|*.rbxlx"; + typeFilter = "Roblox Level (*.rbxl)|*.rbxl|ROBLOX Level (*.rbxlx)|*.rbxlx"; break; /*case RobloxFileType.Script: typeFilter = "Lua Script (*.lua)|*.lua"; break;*/ default: - typeFilter = "ROBLOX Model (*.rbxm)|*.rbxm"; + typeFilter = "Roblox Model (*.rbxm)|*.rbxm"; break; } OpenFileDialog openFileDialog1 = new OpenFileDialog { Filter = typeFilter, - Title = "Open ROBLOX level or model", + Title = "Open Roblox level or model", }; return openFileDialog1; @@ -1225,7 +1225,7 @@ public partial class AssetSDK : Form proc.EnableRaisingEvents = true; proc.Exited += new EventHandler(OBJ2MeshV1Exited); proc.Start(); - MeshConverter_StatusText.Text = "Converting OBJ to ROBLOX Mesh v" + MeshConverter_MeshVersionSelector.Text + "..."; + MeshConverter_StatusText.Text = "Converting OBJ to Roblox Mesh v" + MeshConverter_MeshVersionSelector.Text + "..."; output = proc.StandardOutput.ReadToEnd(); proc.WaitForExit(); } diff --git a/Novetus/NovetusLauncher/Forms/SDK/DiogenesEditor.cs b/Novetus/NovetusLauncher/Forms/SDK/DiogenesEditor.cs index 0c4ad01..90753ea 100644 --- a/Novetus/NovetusLauncher/Forms/SDK/DiogenesEditor.cs +++ b/Novetus/NovetusLauncher/Forms/SDK/DiogenesEditor.cs @@ -27,7 +27,7 @@ using System.Windows.Forms; { using (var ofd = new OpenFileDialog()) { - ofd.Filter = "ROBLOX Diogenes filter v2 (diogenes.fnt)|diogenes.fnt|ROBLOX Diogenes filter v1 (diogenes.fnt)|diogenes.fnt"; + ofd.Filter = "Roblox Diogenes filter v2 (diogenes.fnt)|diogenes.fnt|Roblox Diogenes filter v1 (diogenes.fnt)|diogenes.fnt"; ofd.FilterIndex = 1; ofd.FileName = "diogenes.fnt"; ofd.Title = "Load diogenes.fnt"; diff --git a/Novetus/NovetusLauncher/Forms/ServerBrowser.Designer.cs b/Novetus/NovetusLauncher/Forms/ServerBrowser.Designer.cs index e80d36f..663ad5a 100644 --- a/Novetus/NovetusLauncher/Forms/ServerBrowser.Designer.cs +++ b/Novetus/NovetusLauncher/Forms/ServerBrowser.Designer.cs @@ -50,7 +50,7 @@ namespace NovetusLauncher // // MasterServerBox // - this.MasterServerBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + this.MasterServerBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.MasterServerBox.Location = new System.Drawing.Point(135, 10); this.MasterServerBox.Name = "MasterServerBox"; @@ -81,8 +81,8 @@ namespace NovetusLauncher // // ServerListView // - this.ServerListView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) + this.ServerListView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.ServerListView.HideSelection = false; this.ServerListView.Location = new System.Drawing.Point(10, 37); diff --git a/Novetus/NovetusLauncher/Forms/ServerBrowser.cs b/Novetus/NovetusLauncher/Forms/ServerBrowser.cs index 8933f06..bf708d0 100644 --- a/Novetus/NovetusLauncher/Forms/ServerBrowser.cs +++ b/Novetus/NovetusLauncher/Forms/ServerBrowser.cs @@ -4,7 +4,7 @@ using System.Collections.Generic; using System.IO; using System.Linq; using System.Net; -using System.Net.NetworkInformation; +using System.Net.Sockets; using System.Reflection; using System.Threading.Tasks; using System.Windows.Forms; @@ -136,7 +136,7 @@ namespace NovetusLauncher { string DecodedLine = SecurityFuncs.Base64DecodeOld(line); string[] serverInfo = DecodedLine.Split('|'); - GameServer gameServer = new GameServer(serverInfo[0], serverInfo[1], serverInfo[2], serverInfo[3]); + GameServer gameServer = new GameServer(serverInfo[0], serverInfo[1], serverInfo[2], serverInfo[3], serverInfo[4]); if (gameServer.IsValid()) { serverList.Add(gameServer); @@ -176,11 +176,11 @@ namespace NovetusLauncher ColumnClient.Width = 75; ServerListView.Columns.Add(ColumnClient); - var ColumnStatus = new ColumnHeader(); - ColumnStatus.Text = "Status"; - ColumnStatus.TextAlign = HorizontalAlignment.Center; - ColumnStatus.Width = 75; - ServerListView.Columns.Add(ColumnStatus); + var ColumnVersion = new ColumnHeader(); + ColumnVersion.Text = "Version"; + ColumnVersion.TextAlign = HorizontalAlignment.Center; + ColumnVersion.Width = 110; + ServerListView.Columns.Add(ColumnVersion); foreach (var server in serverList) { @@ -189,8 +189,8 @@ namespace NovetusLauncher var serverClient = new ListViewItem.ListViewSubItem(serverItem, server.ServerClient); serverItem.SubItems.Add(serverClient); - var serverStatus = new ListViewItem.ListViewSubItem(serverItem, server.GetStatusString()); - serverItem.SubItems.Add(serverStatus); + var serverVersion = new ListViewItem.ListViewSubItem(serverItem, server.ServerVersion); + serverItem.SubItems.Add(serverVersion); ServerListView.Items.Add(serverItem); } @@ -223,4 +223,44 @@ namespace NovetusLauncher #endregion } #endregion + + #region Game Server Definition + public class GameServer + { + public GameServer(string name, string ip, string port, string client, string version) + { + ServerName = SecurityFuncs.Base64DecodeOld(name); + ServerIP = SecurityFuncs.Base64DecodeOld(ip); + ServerPort = Convert.ToInt32(SecurityFuncs.Base64DecodeOld(port)); + ServerClient = SecurityFuncs.Base64DecodeOld(client); + ServerVersion = SecurityFuncs.Base64DecodeOld(version); + } + + public bool IsValid() + { + if (!string.IsNullOrWhiteSpace(ServerName) && + !string.IsNullOrWhiteSpace(ServerClient) && + !string.IsNullOrWhiteSpace(ServerIP) && + !string.IsNullOrWhiteSpace(ServerPort.ToString()) && + !string.IsNullOrWhiteSpace(ServerVersion) && + GlobalFuncs.IsClientValid(ServerClient) && + GlobalFuncs.IsIPValid(ServerIP) && + ServerVersion == GlobalVars.ProgramInformation.Version && + (!ServerIP.Equals("localhost") || !ServerIP.Equals("127.0.0.1"))) + { + return true; + } + else + { + return false; + } + } + + public string ServerName { get; set; } + public string ServerIP { get; set; } + public int ServerPort { get; set; } + public string ServerClient { get; set; } + public string ServerVersion { get; set; } + } + #endregion } diff --git a/Novetus/NovetusLauncher/Novetus.Launcher.csproj b/Novetus/NovetusLauncher/Novetus.Launcher.csproj index 6db0286..f59b100 100644 --- a/Novetus/NovetusLauncher/Novetus.Launcher.csproj +++ b/Novetus/NovetusLauncher/Novetus.Launcher.csproj @@ -158,7 +158,6 @@ CharacterCustomizationExtended.cs - diff --git a/Novetus/NovetusLauncher/Properties/AssemblyInfo.cs b/Novetus/NovetusLauncher/Properties/AssemblyInfo.cs index 0025d54..9172081 100644 --- a/Novetus/NovetusLauncher/Properties/AssemblyInfo.cs +++ b/Novetus/NovetusLauncher/Properties/AssemblyInfo.cs @@ -8,11 +8,11 @@ using System.Runtime.InteropServices; // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle ("Novetus")] -[assembly: AssemblyDescription("Launcher for old ROBLOX clients.")] +[assembly: AssemblyDescription("Launcher for old Roblox clients.")] [assembly: AssemblyConfiguration ("")] [assembly: AssemblyCompany ("Bitl")] [assembly: AssemblyProduct ("Novetus")] -[assembly: AssemblyCopyright("(c) Bitl 2018-2020. All rights to ROBLOX go to the ROBLOX Corporation.")] +[assembly: AssemblyCopyright("(c) Bitl 2018-2021. All rights to Roblox go to the Roblox Corporation.")] [assembly: AssemblyTrademark ("")] [assembly: AssemblyCulture ("")] // This sets the default COM visibility of types in the assembly to invisible. diff --git a/Novetus/NovetusURI/Properties/AssemblyInfo.cs b/Novetus/NovetusURI/Properties/AssemblyInfo.cs index c265e28..62bcb43 100644 --- a/Novetus/NovetusURI/Properties/AssemblyInfo.cs +++ b/Novetus/NovetusURI/Properties/AssemblyInfo.cs @@ -11,7 +11,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Bitl")] [assembly: AssemblyProduct("Novetus")] -[assembly: AssemblyCopyright("(c) Bitl 2018-2020. All rights to ROBLOX go to the ROBLOX Corporation.")] +[assembly: AssemblyCopyright("(c) Bitl 2018-2021. All rights to Roblox go to the Roblox Corporation.")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")]