upadte code to latest codebase

This commit is contained in:
Bitl 2021-10-31 21:05:22 -07:00
parent e172361db6
commit 1de430d04a
21 changed files with 143 additions and 118 deletions

View File

@ -10,7 +10,7 @@ using System.Runtime.InteropServices;
[assembly: AssemblyConfiguration("")] [assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Bitl")] [assembly: AssemblyCompany("Bitl")]
[assembly: AssemblyProduct("Novetus")] [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: AssemblyTrademark("")]
[assembly: AssemblyCulture("")] [assembly: AssemblyCulture("")]

View File

@ -12,7 +12,7 @@ using System.Runtime.InteropServices;
[assembly: AssemblyConfiguration("")] [assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Bitl")] [assembly: AssemblyCompany("Bitl")]
[assembly: AssemblyProduct("Novetus")] [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: AssemblyTrademark("")]
[assembly: AssemblyCulture("")] [assembly: AssemblyCulture("")]

View File

@ -10,7 +10,7 @@ using System.Runtime.InteropServices;
[assembly: AssemblyConfiguration("")] [assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Bitl")] [assembly: AssemblyCompany("Bitl")]
[assembly: AssemblyProduct("ReleasePreparer")] [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: AssemblyTrademark("")]
[assembly: AssemblyCulture("")] [assembly: AssemblyCulture("")]

View File

@ -174,6 +174,7 @@ namespace NovetusCMD
static void ProgramClose(object sender, EventArgs e) static void ProgramClose(object sender, EventArgs e)
{ {
//add check for open server
if (GlobalVars.ProcessID != 0) if (GlobalVars.ProcessID != 0)
{ {
if (LocalFuncs.ProcessExists(GlobalVars.ProcessID)) if (LocalFuncs.ProcessExists(GlobalVars.ProcessID))
@ -317,7 +318,8 @@ namespace NovetusCMD
static void ServerExited(object sender, EventArgs e) 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); Environment.Exit(0);
} }
#endregion #endregion

View File

@ -11,7 +11,7 @@ using System.Runtime.InteropServices;
[assembly: AssemblyConfiguration("")] [assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Bitl")] [assembly: AssemblyCompany("Bitl")]
[assembly: AssemblyProduct("Novetus")] [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: AssemblyTrademark("")]
[assembly: AssemblyCulture("")] [assembly: AssemblyCulture("")]

View File

@ -70,6 +70,7 @@ public class FileFormat
ServerBrowserServerAddress = "localhost"; ServerBrowserServerAddress = "localhost";
Priority = ProcessPriorityClass.RealTime; Priority = ProcessPriorityClass.RealTime;
InitialBootup = true; InitialBootup = true;
FirstServerLaunch = true;
} }
public string SelectedClient { get; set; } public string SelectedClient { get; set; }
@ -99,6 +100,7 @@ public class FileFormat
public string ServerBrowserServerAddress { get; set; } public string ServerBrowserServerAddress { get; set; }
public ProcessPriorityClass Priority { get; set; } public ProcessPriorityClass Priority { get; set; }
public bool InitialBootup { get; set; } public bool InitialBootup { get; set; }
public bool FirstServerLaunch { get; set; }
} }
#endregion #endregion

View File

@ -152,6 +152,7 @@ public class GlobalFuncs
ini.IniWriteValue(section, "ServerBrowserServerAddress", GlobalVars.UserConfiguration.ServerBrowserServerAddress.ToString()); ini.IniWriteValue(section, "ServerBrowserServerAddress", GlobalVars.UserConfiguration.ServerBrowserServerAddress.ToString());
ini.IniWriteValue(section, "ClientLaunchPriority", ((int)GlobalVars.UserConfiguration.Priority).ToString()); ini.IniWriteValue(section, "ClientLaunchPriority", ((int)GlobalVars.UserConfiguration.Priority).ToString());
ini.IniWriteValue(section, "InitialBootup", GlobalVars.UserConfiguration.InitialBootup.ToString()); ini.IniWriteValue(section, "InitialBootup", GlobalVars.UserConfiguration.InitialBootup.ToString());
ini.IniWriteValue(section, "FirstServerLaunch", GlobalVars.UserConfiguration.FirstServerLaunch.ToString());
} }
else else
{ {
@ -162,7 +163,8 @@ public class GlobalFuncs
map, port, limit, upnp, map, port, limit, upnp,
disablehelpmessage, tripcode, discord, mappath, mapsnip, disablehelpmessage, tripcode, discord, mappath, mapsnip,
graphics, reshade, qualitylevel, style, savebackups, altIP, 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); INIFile ini = new INIFile(cfgpath);
@ -193,6 +195,7 @@ public class GlobalFuncs
SB_Address = ini.IniReadValue(section, "ServerBrowserServerAddress", GlobalVars.UserConfiguration.ServerBrowserServerAddress.ToString()); SB_Address = ini.IniReadValue(section, "ServerBrowserServerAddress", GlobalVars.UserConfiguration.ServerBrowserServerAddress.ToString());
priority = ini.IniReadValue(section, "ClientLaunchPriority", ((int)GlobalVars.UserConfiguration.Priority).ToString()); priority = ini.IniReadValue(section, "ClientLaunchPriority", ((int)GlobalVars.UserConfiguration.Priority).ToString());
initialBootup = ini.IniReadValue(section, "InitialBootup", GlobalVars.UserConfiguration.InitialBootup.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); GlobalVars.UserConfiguration.CloseOnLaunch = Convert.ToBoolean(closeonlaunch);
@ -256,6 +259,7 @@ public class GlobalFuncs
GlobalVars.UserConfiguration.ServerBrowserServerAddress = SB_Address; GlobalVars.UserConfiguration.ServerBrowserServerAddress = SB_Address;
GlobalVars.UserConfiguration.Priority = (ProcessPriorityClass)Convert.ToInt32(priority); GlobalVars.UserConfiguration.Priority = (ProcessPriorityClass)Convert.ToInt32(priority);
GlobalVars.UserConfiguration.InitialBootup = Convert.ToBoolean(initialBootup); GlobalVars.UserConfiguration.InitialBootup = Convert.ToBoolean(initialBootup);
GlobalVars.UserConfiguration.FirstServerLaunch = Convert.ToBoolean(firstServerLaunch);
} }
#if URI || LAUNCHER || CMD #if URI || LAUNCHER || CMD
catch (Exception ex) catch (Exception ex)
@ -1808,6 +1812,36 @@ public class GlobalFuncs
#endif #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 #if LAUNCHER
ReadClientValues(ClientName, box); ReadClientValues(ClientName, box);
#else #else
@ -1918,13 +1952,14 @@ public class GlobalFuncs
if (type.Equals(ScriptType.Server)) if (type.Equals(ScriptType.Server))
{ {
GlobalVars.IsServerOpen = true;
#if LAUNCHER #if LAUNCHER
if (box != null) if (box != null)
{ {
PingMasterServer(1, box); PingMasterServer(1, "Server will now display on the defined master server.", box);
} }
#elif CMD #elif CMD
PingMasterServer(1); PingMasterServer(1, "Server will now display on the defined master server.");
#endif #endif
} }
} }
@ -1958,9 +1993,9 @@ public class GlobalFuncs
} }
#if LAUNCHER #if LAUNCHER
public static void PingMasterServer(int online, RichTextBox box) public static void PingMasterServer(int online, string reason, RichTextBox box)
#else #else
public static void PingMasterServer(int online) public static void PingMasterServer(int online, string reason)
#endif #endif
{ {
string pingURL = "http://" + GlobalVars.UserConfiguration.ServerBrowserServerAddress + string pingURL = "http://" + GlobalVars.UserConfiguration.ServerBrowserServerAddress +
@ -1972,15 +2007,15 @@ public class GlobalFuncs
"&online=" + online; "&online=" + online;
#if LAUNCHER #if LAUNCHER
ConsolePrint("Pinging master server.", 4, box); ConsolePrint("Pinging master server. " + reason, 4, box);
#elif CMD #elif CMD
ConsolePrint("Pinging master server.", 4); ConsolePrint("Pinging master server. " + reason, 4);
#endif #endif
string response = HttpGet(pingURL); string response = HttpGet(pingURL);
#if LAUNCHER #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 #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 #endif
} }

View File

@ -42,6 +42,7 @@ public static class GlobalVars
public static string ExternalIP = SecurityFuncs.GetExternalIPAddress(); public static string ExternalIP = SecurityFuncs.GetExternalIPAddress();
public static int DefaultRobloxPort = 53640; public static int DefaultRobloxPort = 53640;
public static int JoinPort = DefaultRobloxPort; public static int JoinPort = DefaultRobloxPort;
public static bool IsServerOpen = false;
#endregion #endregion
#region NovetusCMD #region NovetusCMD

View File

@ -73,7 +73,7 @@ public class ScriptFuncs
+ GlobalVars.UserConfiguration.RobloxPort + "," + GlobalVars.UserConfiguration.RobloxPort + ","
+ GlobalVars.UserConfiguration.PlayerLimit + "," + GlobalVars.UserConfiguration.PlayerLimit + ","
+ md5s + "," + md5s + ","
+ GlobalVars.UserConfiguration.ShowServerNotifications.ToString().ToLower() + "');"; + GlobalVars.UserConfiguration.ShowServerNotifications.ToString().ToLower() + ");";
case ScriptType.Solo: case ScriptType.Solo:
case ScriptType.EasterEgg: case ScriptType.EasterEgg:
return "_G.CSSolo(" return "_G.CSSolo("

View File

@ -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

View File

@ -305,7 +305,7 @@ namespace NovetusLauncher
if (!hasFoundDir) 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(); Close();
} }

View File

@ -586,7 +586,7 @@ namespace NovetusLauncher
this.tabPage3.Size = new System.Drawing.Size(405, 258); this.tabPage3.Size = new System.Drawing.Size(405, 258);
this.tabPage3.TabIndex = 4; this.tabPage3.TabIndex = 4;
this.tabPage3.Text = "VERSIONS"; 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; this.tabPage3.UseVisualStyleBackColor = true;
// //
// textBox6 // textBox6

View File

@ -900,7 +900,7 @@ namespace NovetusLauncher
this.tabPage3.Size = new System.Drawing.Size(625, 265); this.tabPage3.Size = new System.Drawing.Size(625, 265);
this.tabPage3.TabIndex = 4; this.tabPage3.TabIndex = 4;
this.tabPage3.Text = "VERSIONS"; 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; this.tabPage3.UseVisualStyleBackColor = true;
// //
// textBox6 // textBox6

View File

@ -293,15 +293,25 @@ namespace NovetusLauncher
{ {
if (GlobalVars.AdminMode) 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); ShowCloseWarning("You are in Admin Mode.", "Admin Mode", e);
if (closeNovetus == DialogResult.No) }
{
e.Cancel = true; if (GlobalVars.IsServerOpen)
} {
else ShowCloseWarning("A server is open.", "Server", e);
{ }
CloseEventInternal(); }
}
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) 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; bool nomapLegacy = false;
switch (result) switch (result)
@ -530,7 +540,8 @@ namespace NovetusLauncher
void ServerExited(object sender, EventArgs e) 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); ClientExitedBase(sender, e);
} }
@ -1272,9 +1283,9 @@ namespace NovetusLauncher
{ {
using (var ofd = new OpenFileDialog()) 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.FilterIndex = 1;
ofd.Title = "Load ROBLOX map"; ofd.Title = "Load Roblox map";
if (ofd.ShowDialog() == DialogResult.OK) if (ofd.ShowDialog() == DialogResult.OK)
{ {
if (!Directory.Exists(GlobalPaths.MapsDirCustom)) if (!Directory.Exists(GlobalPaths.MapsDirCustom))

View File

@ -102,7 +102,7 @@ public partial class AssetSDK : Form
{ {
if (!GlobalVars.UserConfiguration.DisabledItemMakerHelp) 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); MessageBox.Show(helptext, "Novetus Asset SDK", MessageBoxButtons.OK, MessageBoxIcon.Information);
} }
@ -525,20 +525,20 @@ public partial class AssetSDK : Form
switch (type) switch (type)
{ {
case RobloxFileType.RBXL: case RobloxFileType.RBXL:
typeFilter = "ROBLOX Level (*.rbxl)|*.rbxl|ROBLOX Level (*.rbxlx)|*.rbxlx"; typeFilter = "Roblox Level (*.rbxl)|*.rbxl|ROBLOX Level (*.rbxlx)|*.rbxlx";
break; break;
/*case RobloxFileType.Script: /*case RobloxFileType.Script:
typeFilter = "Lua Script (*.lua)|*.lua"; typeFilter = "Lua Script (*.lua)|*.lua";
break;*/ break;*/
default: default:
typeFilter = "ROBLOX Model (*.rbxm)|*.rbxm"; typeFilter = "Roblox Model (*.rbxm)|*.rbxm";
break; break;
} }
OpenFileDialog openFileDialog1 = new OpenFileDialog OpenFileDialog openFileDialog1 = new OpenFileDialog
{ {
Filter = typeFilter, Filter = typeFilter,
Title = "Open ROBLOX level or model", Title = "Open Roblox level or model",
}; };
return openFileDialog1; return openFileDialog1;
@ -1225,7 +1225,7 @@ public partial class AssetSDK : Form
proc.EnableRaisingEvents = true; proc.EnableRaisingEvents = true;
proc.Exited += new EventHandler(OBJ2MeshV1Exited); proc.Exited += new EventHandler(OBJ2MeshV1Exited);
proc.Start(); 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(); output = proc.StandardOutput.ReadToEnd();
proc.WaitForExit(); proc.WaitForExit();
} }

View File

@ -27,7 +27,7 @@ using System.Windows.Forms;
{ {
using (var ofd = new OpenFileDialog()) 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.FilterIndex = 1;
ofd.FileName = "diogenes.fnt"; ofd.FileName = "diogenes.fnt";
ofd.Title = "Load diogenes.fnt"; ofd.Title = "Load diogenes.fnt";

View File

@ -50,7 +50,7 @@ namespace NovetusLauncher
// //
// MasterServerBox // 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))); | System.Windows.Forms.AnchorStyles.Right)));
this.MasterServerBox.Location = new System.Drawing.Point(135, 10); this.MasterServerBox.Location = new System.Drawing.Point(135, 10);
this.MasterServerBox.Name = "MasterServerBox"; this.MasterServerBox.Name = "MasterServerBox";
@ -81,8 +81,8 @@ namespace NovetusLauncher
// //
// ServerListView // ServerListView
// //
this.ServerListView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 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.Left)
| System.Windows.Forms.AnchorStyles.Right))); | System.Windows.Forms.AnchorStyles.Right)));
this.ServerListView.HideSelection = false; this.ServerListView.HideSelection = false;
this.ServerListView.Location = new System.Drawing.Point(10, 37); this.ServerListView.Location = new System.Drawing.Point(10, 37);

View File

@ -4,7 +4,7 @@ using System.Collections.Generic;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using System.Net; using System.Net;
using System.Net.NetworkInformation; using System.Net.Sockets;
using System.Reflection; using System.Reflection;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Windows.Forms; using System.Windows.Forms;
@ -136,7 +136,7 @@ namespace NovetusLauncher
{ {
string DecodedLine = SecurityFuncs.Base64DecodeOld(line); string DecodedLine = SecurityFuncs.Base64DecodeOld(line);
string[] serverInfo = DecodedLine.Split('|'); 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()) if (gameServer.IsValid())
{ {
serverList.Add(gameServer); serverList.Add(gameServer);
@ -176,11 +176,11 @@ namespace NovetusLauncher
ColumnClient.Width = 75; ColumnClient.Width = 75;
ServerListView.Columns.Add(ColumnClient); ServerListView.Columns.Add(ColumnClient);
var ColumnStatus = new ColumnHeader(); var ColumnVersion = new ColumnHeader();
ColumnStatus.Text = "Status"; ColumnVersion.Text = "Version";
ColumnStatus.TextAlign = HorizontalAlignment.Center; ColumnVersion.TextAlign = HorizontalAlignment.Center;
ColumnStatus.Width = 75; ColumnVersion.Width = 110;
ServerListView.Columns.Add(ColumnStatus); ServerListView.Columns.Add(ColumnVersion);
foreach (var server in serverList) foreach (var server in serverList)
{ {
@ -189,8 +189,8 @@ namespace NovetusLauncher
var serverClient = new ListViewItem.ListViewSubItem(serverItem, server.ServerClient); var serverClient = new ListViewItem.ListViewSubItem(serverItem, server.ServerClient);
serverItem.SubItems.Add(serverClient); serverItem.SubItems.Add(serverClient);
var serverStatus = new ListViewItem.ListViewSubItem(serverItem, server.GetStatusString()); var serverVersion = new ListViewItem.ListViewSubItem(serverItem, server.ServerVersion);
serverItem.SubItems.Add(serverStatus); serverItem.SubItems.Add(serverVersion);
ServerListView.Items.Add(serverItem); ServerListView.Items.Add(serverItem);
} }
@ -223,4 +223,44 @@ namespace NovetusLauncher
#endregion #endregion
} }
#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
} }

View File

@ -158,7 +158,6 @@
<DependentUpon>CharacterCustomizationExtended.cs</DependentUpon> <DependentUpon>CharacterCustomizationExtended.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="Classes\Launcher\AddonLoader.cs" /> <Compile Include="Classes\Launcher\AddonLoader.cs" />
<Compile Include="Classes\Launcher\GameServer.cs" />
<Compile Include="Classes\Launcher\SplashLoader.cs" /> <Compile Include="Classes\Launcher\SplashLoader.cs" />
<Compile Include="Classes\Launcher\TreeNodeHelper.cs" /> <Compile Include="Classes\Launcher\TreeNodeHelper.cs" />
<Compile Include="Classes\LocalVars.cs" /> <Compile Include="Classes\LocalVars.cs" />

View File

@ -8,11 +8,11 @@ using System.Runtime.InteropServices;
// set of attributes. Change these attribute values to modify the information // set of attributes. Change these attribute values to modify the information
// associated with an assembly. // associated with an assembly.
[assembly: AssemblyTitle ("Novetus")] [assembly: AssemblyTitle ("Novetus")]
[assembly: AssemblyDescription("Launcher for old ROBLOX clients.")] [assembly: AssemblyDescription("Launcher for old Roblox clients.")]
[assembly: AssemblyConfiguration ("")] [assembly: AssemblyConfiguration ("")]
[assembly: AssemblyCompany ("Bitl")] [assembly: AssemblyCompany ("Bitl")]
[assembly: AssemblyProduct ("Novetus")] [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: AssemblyTrademark ("")]
[assembly: AssemblyCulture ("")] [assembly: AssemblyCulture ("")]
// This sets the default COM visibility of types in the assembly to invisible. // This sets the default COM visibility of types in the assembly to invisible.

View File

@ -11,7 +11,7 @@ using System.Runtime.InteropServices;
[assembly: AssemblyConfiguration("")] [assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Bitl")] [assembly: AssemblyCompany("Bitl")]
[assembly: AssemblyProduct("Novetus")] [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: AssemblyTrademark("")]
[assembly: AssemblyCulture("")] [assembly: AssemblyCulture("")]