mirror of
https://github.com/Novetus/Novetus_src.git
synced 2025-01-31 09:41:33 +02:00
snapshot updates
This commit is contained in:
parent
8722ec2309
commit
34d19ba432
@ -156,4 +156,4 @@ _G.CSScript_OnLoadCharacter=OnLoadCharacter
|
|||||||
_G.CSScript_OnPlayerAdded=OnPlayerAdded
|
_G.CSScript_OnPlayerAdded=OnPlayerAdded
|
||||||
_G.CSScript_OnPlayerRemoved=OnPlayerRemoved
|
_G.CSScript_OnPlayerRemoved=OnPlayerRemoved
|
||||||
_G.CSScript_OnPlayerKicked=OnPlayerKicked
|
_G.CSScript_OnPlayerKicked=OnPlayerKicked
|
||||||
_G.CSScript_OnPrePlayerKicked=OnPrePlayerKicked
|
_G.CSScript_OnPrePlayerKicked=OnPrePlayerKicked
|
||||||
|
@ -21,6 +21,8 @@ public class GlobalPaths
|
|||||||
public static readonly string DataDir = BinDir + @"\\data";
|
public static readonly string DataDir = BinDir + @"\\data";
|
||||||
public static readonly string ClientDir = BasePath + @"\\clients";
|
public static readonly string ClientDir = BasePath + @"\\clients";
|
||||||
public static readonly string MapsDir = BasePath + @"\\maps";
|
public static readonly string MapsDir = BasePath + @"\\maps";
|
||||||
|
public static readonly string AddonDir = BasePath + @"\\addons";
|
||||||
|
public static readonly string AddonCoreDir = AddonDir + @"\\core";
|
||||||
public static readonly string MapsDirCustom = MapsDir + @"\\Custom";
|
public static readonly string MapsDirCustom = MapsDir + @"\\Custom";
|
||||||
public static readonly string MapsDirBase = "maps";
|
public static readonly string MapsDirBase = "maps";
|
||||||
public static readonly string BaseGameDir = "rbxasset://../../../";
|
public static readonly string BaseGameDir = "rbxasset://../../../";
|
||||||
@ -109,6 +111,7 @@ public class GlobalPaths
|
|||||||
public static readonly string ServerInfoFileName = "serverinfo.txt";
|
public static readonly string ServerInfoFileName = "serverinfo.txt";
|
||||||
public static readonly string ConsoleHelpFileName = "consolehelp.txt";
|
public static readonly string ConsoleHelpFileName = "consolehelp.txt";
|
||||||
public static readonly string ClientScriptDocumentationFileName = "documentation.txt";
|
public static readonly string ClientScriptDocumentationFileName = "documentation.txt";
|
||||||
|
public static readonly string AddonLoaderFileName = "AddonLoader.lua";
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
#region Usings
|
#region Usings
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Diagnostics;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
@ -330,6 +330,8 @@ public static class Util
|
|||||||
|
|
||||||
File.Copy(src, dest, overwrite);
|
File.Copy(src, dest, overwrite);
|
||||||
File.SetAttributes(dest, FileAttributes.Normal);
|
File.SetAttributes(dest, FileAttributes.Normal);
|
||||||
|
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void FixedFileDelete(string src)
|
public static void FixedFileDelete(string src)
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
#region Usings
|
#region Usings
|
||||||
using Ionic.Zip;
|
using Ionic.Zip;
|
||||||
using System;
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
@ -17,7 +18,14 @@ public class ModManager
|
|||||||
ModCreation
|
ModCreation
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public enum ModType
|
||||||
|
{
|
||||||
|
ModPackage,
|
||||||
|
AddonScript
|
||||||
|
}
|
||||||
|
|
||||||
private ModMode globalMode;
|
private ModMode globalMode;
|
||||||
|
private ModType globalType;
|
||||||
private OpenFileDialog openFileDialog1;
|
private OpenFileDialog openFileDialog1;
|
||||||
private SaveFileDialog saveFileDialog1;
|
private SaveFileDialog saveFileDialog1;
|
||||||
private string installOutcome = "";
|
private string installOutcome = "";
|
||||||
@ -49,8 +57,8 @@ public class ModManager
|
|||||||
default:
|
default:
|
||||||
openFileDialog1 = new OpenFileDialog()
|
openFileDialog1 = new OpenFileDialog()
|
||||||
{
|
{
|
||||||
FileName = "Select a mod .zip file",
|
FileName = "Select a mod .zip or addon *.lua file",
|
||||||
Filter = "Compressed zip files (*.zip)|*.zip",
|
Filter = "Compressed zip files (*.zip)|*.zip|LUA Script (*.lua)|*.lua",
|
||||||
Title = "Open mod .zip"
|
Title = "Open mod .zip"
|
||||||
};
|
};
|
||||||
break;
|
break;
|
||||||
@ -79,52 +87,93 @@ public class ModManager
|
|||||||
|
|
||||||
if (openFileDialog1.ShowDialog() == DialogResult.OK)
|
if (openFileDialog1.ShowDialog() == DialogResult.OK)
|
||||||
{
|
{
|
||||||
MessageBox.Show("Your mod is loading. You will recieve a notification when it is installed. Please keep the launcher open. You can see the installation progress in the Console.", "Novetus - Mod Loading");
|
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
int filecount = 0;
|
globalType = (ModType)(openFileDialog1.FilterIndex - 1);
|
||||||
StringBuilder filelistbuilder = new StringBuilder();
|
|
||||||
StringBuilder filelistcutdown = new StringBuilder();
|
|
||||||
|
|
||||||
using (Stream str = openFileDialog1.OpenFile())
|
if (globalType == ModType.ModPackage)
|
||||||
{
|
{
|
||||||
using (var zipFile = ZipFile.Read(str))
|
MessageBox.Show("Your mod is loading. You will recieve a notification when it is installed. Please keep the launcher open. You can see the installation progress in the Console.", "Novetus - Mod Loading");
|
||||||
|
|
||||||
|
int filecount = 0;
|
||||||
|
StringBuilder filelistbuilder = new StringBuilder();
|
||||||
|
StringBuilder filelistcutdown = new StringBuilder();
|
||||||
|
|
||||||
|
using (Stream str = openFileDialog1.OpenFile())
|
||||||
{
|
{
|
||||||
zipFile.ExtractProgress += ExtractProgress;
|
using (var zipFile = ZipFile.Read(str))
|
||||||
ZipEntry[] entries = zipFile.Entries.ToArray();
|
|
||||||
|
|
||||||
foreach (ZipEntry entry in entries)
|
|
||||||
{
|
{
|
||||||
filelistbuilder.Append(!entry.IsDirectory ? (entry.FileName + " (" + entry.UncompressedSize + " KB)" + Environment.NewLine) : "");
|
zipFile.ExtractProgress += ExtractProgress;
|
||||||
|
ZipEntry[] entries = zipFile.Entries.ToArray();
|
||||||
|
|
||||||
if (filecount < fileListDisplay)
|
foreach (ZipEntry entry in entries)
|
||||||
{
|
{
|
||||||
filelistcutdown.Append(!entry.IsDirectory ? (entry.FileName + " (" + entry.UncompressedSize + " KB)" + Environment.NewLine) : "");
|
filelistbuilder.Append(!entry.IsDirectory ? (entry.FileName + " (" + entry.UncompressedSize + " KB)" + Environment.NewLine) : "");
|
||||||
|
|
||||||
|
if (filecount < fileListDisplay)
|
||||||
|
{
|
||||||
|
filelistcutdown.Append(!entry.IsDirectory ? (entry.FileName + " (" + entry.UncompressedSize + " KB)" + Environment.NewLine) : "");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!entry.IsDirectory)
|
||||||
|
{
|
||||||
|
filecount++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!entry.IsDirectory)
|
tokenSource = new CancellationTokenSource();
|
||||||
{
|
var token = tokenSource.Token;
|
||||||
filecount++;
|
await Task.Factory.StartNew(() => zipFile.ExtractAll(GlobalPaths.BasePath, ExtractExistingFileAction.OverwriteSilently), token);
|
||||||
}
|
zipFile.Dispose();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
tokenSource = new CancellationTokenSource();
|
string filelist = filelistbuilder.ToString();
|
||||||
var token = tokenSource.Token;
|
|
||||||
await Task.Factory.StartNew(() => zipFile.ExtractAll(GlobalPaths.BasePath, ExtractExistingFileAction.OverwriteSilently), token);
|
if (filecount > fileListDisplay)
|
||||||
zipFile.Dispose();
|
{
|
||||||
|
installOutcome = "Mod " + openFileDialog1.SafeFileName + " installed! " + filecount + " files copied!" + Environment.NewLine + "Files added/modified:" + Environment.NewLine + Environment.NewLine + filelistcutdown + Environment.NewLine + "and " + (filecount - fileListDisplay) + " more files!";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
installOutcome = "Mod " + openFileDialog1.SafeFileName + " installed! " + filecount + " files copied!" + Environment.NewLine + "Files added/modified:" + Environment.NewLine + Environment.NewLine + filelist;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (globalType == ModType.AddonScript)
|
||||||
string filelist = filelistbuilder.ToString();
|
|
||||||
|
|
||||||
if (filecount > fileListDisplay)
|
|
||||||
{
|
{
|
||||||
installOutcome = "Mod " + openFileDialog1.SafeFileName + " installed! " + filecount + " files copied!" + Environment.NewLine + "Files added/modified:" + Environment.NewLine + Environment.NewLine + filelistcutdown + Environment.NewLine + "and " + (filecount - fileListDisplay) + " more files!";
|
try
|
||||||
}
|
{
|
||||||
else
|
Util.FixedFileCopy(openFileDialog1.FileName, GlobalPaths.AddonDir + @"\" + openFileDialog1.SafeFileName, false);
|
||||||
{
|
|
||||||
installOutcome = "Mod " + openFileDialog1.SafeFileName + " installed! " + filecount + " files copied!" + Environment.NewLine + "Files added/modified:" + Environment.NewLine + Environment.NewLine + filelist;
|
string AddonPath = GlobalPaths.AddonCoreDir + "\\" + GlobalPaths.AddonLoaderFileName;
|
||||||
|
var lines = File.ReadLines(AddonPath);
|
||||||
|
List<string> FileLines = lines.ToList();
|
||||||
|
for (var i = 0; i < FileLines.Count; i++)
|
||||||
|
{
|
||||||
|
if (FileLines[i].Contains("Addons"))
|
||||||
|
{
|
||||||
|
if (FileLines[i].Contains(Path.GetFileNameWithoutExtension(openFileDialog1.SafeFileName)))
|
||||||
|
{
|
||||||
|
installOutcome = "Error: Script has already been added.";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
string[] list = FileLines[i].Replace("Addons", "").Replace("=", "").Replace("{", "").Replace("}", "").Replace(" ", "").Split(',');
|
||||||
|
List<string> Addons = list.ToList();
|
||||||
|
Addons.Add("\"" + Path.GetFileNameWithoutExtension(openFileDialog1.SafeFileName) + "\"");
|
||||||
|
string newline = "Addons = {" + string.Join(", ", Addons) + "}";
|
||||||
|
FileLines[i] = newline;
|
||||||
|
File.WriteAllLines(AddonPath, FileLines.ToArray());
|
||||||
|
installOutcome = "Addon Script " + openFileDialog1.SafeFileName + " installed!";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Util.LogExceptions(ex);
|
||||||
|
installOutcome = "Error: Script has already been added.";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
|
@ -63,8 +63,6 @@ namespace NovetusLauncher
|
|||||||
private ToolTip contextToolTip;
|
private ToolTip contextToolTip;
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#region Form Event Functions
|
#region Form Event Functions
|
||||||
public void InitForm()
|
public void InitForm()
|
||||||
{
|
{
|
||||||
@ -183,7 +181,7 @@ namespace NovetusLauncher
|
|||||||
{
|
{
|
||||||
DiscordRPC.Shutdown();
|
DiscordRPC.Shutdown();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!GlobalVars.AppClosed)
|
if (!GlobalVars.AppClosed)
|
||||||
{
|
{
|
||||||
GlobalVars.AppClosed = true;
|
GlobalVars.AppClosed = true;
|
||||||
@ -433,7 +431,7 @@ namespace NovetusLauncher
|
|||||||
Parent.Visible = true;
|
Parent.Visible = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (GlobalVars.isConsoleOnly && !GlobalVars.isConsoleOnly)
|
if (GlobalVars.isConsoleOnly)
|
||||||
{
|
{
|
||||||
CloseEventInternal();
|
CloseEventInternal();
|
||||||
}
|
}
|
||||||
|
@ -777,14 +777,14 @@
|
|||||||
<Rectangle x:Name="mapsGroupBox" Fill="#FFDEDCDC" HorizontalAlignment="Left" Height="207" Margin="73,10,0,0" Stroke="Black" VerticalAlignment="Top" Width="509" Grid.Column="1" Grid.ColumnSpan="2"/>
|
<Rectangle x:Name="mapsGroupBox" Fill="#FFDEDCDC" HorizontalAlignment="Left" Height="207" Margin="73,10,0,0" Stroke="Black" VerticalAlignment="Top" Width="509" Grid.Column="1" Grid.ColumnSpan="2"/>
|
||||||
<Rectangle x:Name="mapsLabelBox" Fill="#FFAAA8A8" HorizontalAlignment="Left" Height="30" Margin="73,10,0,0" Stroke="Black" VerticalAlignment="Top" Width="509" Grid.Column="1" Grid.ColumnSpan="2"/>
|
<Rectangle x:Name="mapsLabelBox" Fill="#FFAAA8A8" HorizontalAlignment="Left" Height="30" Margin="73,10,0,0" Stroke="Black" VerticalAlignment="Top" Width="509" Grid.Column="1" Grid.ColumnSpan="2"/>
|
||||||
<Label x:Name="mapsLabel" Content="Places" HorizontalAlignment="Left" Margin="166,9,0,0" VerticalAlignment="Top" FontSize="15" Width="52" Grid.Column="2"/>
|
<Label x:Name="mapsLabel" Content="Places" HorizontalAlignment="Left" Margin="166,9,0,0" VerticalAlignment="Top" FontSize="15" Width="52" Grid.Column="2"/>
|
||||||
<TextBox x:Name="mapsDescBox" Grid.Column="2" HorizontalAlignment="Left" Height="147" Margin="298,64,0,0" TextWrapping="Wrap" FontFamily="Comic Sans MS" FontSize="12" VerticalAlignment="Top" Width="139" IsReadOnly="True" HorizontalContentAlignment="Left" VerticalContentAlignment="Top"/>
|
<TextBox x:Name="mapsDescBox" Grid.Column="2" HorizontalAlignment="Left" Height="168" Margin="298,43,0,0" TextWrapping="Wrap" FontFamily="Comic Sans MS" FontSize="12" VerticalAlignment="Top" Width="139" IsReadOnly="True" HorizontalContentAlignment="Left" VerticalContentAlignment="Top"/>
|
||||||
<WindowsFormsHost x:Name="formHost" Margin="82,64,154,48" Grid.Column="1" FontFamily="Comic Sans MS" FontSize="9" Background="#FFEDEDED" Grid.ColumnSpan="2">
|
<WindowsFormsHost x:Name="formHost" Margin="82,64,154,48" Grid.Column="1" FontFamily="Comic Sans MS" FontSize="9" Background="#FFEDEDED" Grid.ColumnSpan="2">
|
||||||
<wf:TreeView x:Name="mapsBox" AfterSelect="mapsBox_AfterSelect" BeforeSelect="mapsBox_BeforeSelect"/>
|
<wf:TreeView x:Name="mapsBox" AfterSelect="mapsBox_AfterSelect" BeforeSelect="mapsBox_BeforeSelect"/>
|
||||||
</WindowsFormsHost>
|
</WindowsFormsHost>
|
||||||
<TextBox x:Name="searchBox" Grid.Column="1" HorizontalAlignment="Left" Height="20" Margin="82,43,0,0" Text="" VerticalAlignment="Top" Width="346" HorizontalContentAlignment="Left" VerticalContentAlignment="Top" Grid.ColumnSpan="2"/>
|
<TextBox x:Name="searchBox" Grid.Column="1" HorizontalAlignment="Left" Height="20" Margin="82,43,0,0" Text="" VerticalAlignment="Top" Width="204" HorizontalContentAlignment="Left" VerticalContentAlignment="Top" Grid.ColumnSpan="2"/>
|
||||||
<Button x:Name="searchButton" Style="{DynamicResource SearchButton}" Content="" Grid.Column="2" HorizontalAlignment="Left" Margin="310,44,0,0" VerticalAlignment="Top" Width="24" Height="17" Click="searchButton_Click"/>
|
<Button x:Name="searchButton" Style="{DynamicResource SearchButton}" Content="" Grid.Column="2" HorizontalAlignment="Left" Margin="166,46,0,0" VerticalAlignment="Top" Width="24" Height="17" Click="searchButton_Click"/>
|
||||||
<Button x:Name="refreshButton" Style="{DynamicResource RefreshButton}" Content="" Grid.Column="2" HorizontalAlignment="Left" Margin="334,44,0,0" VerticalAlignment="Top" Width="26" Height="17" Click="refreshButton_Click"/>
|
<Button x:Name="refreshButton" Style="{DynamicResource RefreshButton}" Content="" Grid.Column="2" HorizontalAlignment="Left" Margin="190,46,0,0" VerticalAlignment="Top" Width="26" Height="17" Click="refreshButton_Click"/>
|
||||||
<Button x:Name="addMapButton" Content="Add Place" Grid.Column="2" HorizontalAlignment="Left" Margin="365,45,0,0" VerticalAlignment="Top" Width="72" Click="addMapButton_Click"/>
|
<Button x:Name="addMapButton" Content="Add Place" Grid.Column="2" HorizontalAlignment="Left" Margin="221,47,0,0" VerticalAlignment="Top" Width="72" Click="addMapButton_Click"/>
|
||||||
<Button x:Name="customizeButton" Style="{DynamicResource ImportantButton}" Content="Customize Player" HorizontalAlignment="Left" Margin="0,10,0,0" VerticalAlignment="Top" Width="169" Click="customizeButton_Click" Height="32" Grid.ColumnSpan="2"/>
|
<Button x:Name="customizeButton" Style="{DynamicResource ImportantButton}" Content="Customize Player" HorizontalAlignment="Left" Margin="0,10,0,0" VerticalAlignment="Top" Width="169" Click="customizeButton_Click" Height="32" Grid.ColumnSpan="2"/>
|
||||||
<Button x:Name="ServerButton" Style="{DynamicResource HostButton}" Content="" HorizontalAlignment="Left" Margin="156,223,0,0" VerticalAlignment="Top" Width="92" Height="32" RenderTransformOrigin="1.3,0.863" Click="ServerOptionsButton_Click" Grid.Column="2"/>
|
<Button x:Name="ServerButton" Style="{DynamicResource HostButton}" Content="" HorizontalAlignment="Left" Margin="156,223,0,0" VerticalAlignment="Top" Width="92" Height="32" RenderTransformOrigin="1.3,0.863" Click="ServerOptionsButton_Click" Grid.Column="2"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
@ -822,12 +822,11 @@
|
|||||||
<ColumnDefinition Width="409*"/>
|
<ColumnDefinition Width="409*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Rectangle Fill="#FFDEDCDC" HorizontalAlignment="Left" Height="245" Margin="0,10,0,0" Stroke="Black" VerticalAlignment="Top" Width="683" Grid.ColumnSpan="3"/>
|
<Rectangle Fill="#FFDEDCDC" HorizontalAlignment="Left" Height="245" Margin="0,10,0,0" Stroke="Black" VerticalAlignment="Top" Width="683" Grid.ColumnSpan="3"/>
|
||||||
<ListBox x:Name="clientListBox" HorizontalAlignment="Left" Height="102" Margin="10,19,0,0" VerticalAlignment="Top" Width="663" Grid.ColumnSpan="3" HorizontalContentAlignment="Left" VerticalContentAlignment="Top" SelectionChanged="clientListBox_SelectionChanged">
|
<ListBox x:Name="clientListBox" HorizontalAlignment="Left" Height="228" Margin="10,19,0,0" VerticalAlignment="Top" Width="327" Grid.ColumnSpan="3" HorizontalContentAlignment="Left" VerticalContentAlignment="Top" SelectionChanged="clientListBox_SelectionChanged" ScrollViewer.HorizontalScrollBarVisibility="Hidden">
|
||||||
<ListBox.ItemTemplate>
|
<ListBox.ItemTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<Grid Margin="0,2">
|
<Grid Margin="0,2">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="*" />
|
|
||||||
<ColumnDefinition Width="300" />
|
<ColumnDefinition Width="300" />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<TextBlock Text="{Binding ClientName}" />
|
<TextBlock Text="{Binding ClientName}" />
|
||||||
@ -835,14 +834,14 @@
|
|||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</ListBox.ItemTemplate>
|
</ListBox.ItemTemplate>
|
||||||
</ListBox>
|
</ListBox>
|
||||||
<TextBox x:Name="clientWarningBox" HorizontalAlignment="Left" Height="47" Margin="10,126,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="663" Grid.ColumnSpan="3" IsReadOnly="True" Foreground="Red" FontWeight="Bold" Text="CLIENT WARNING" FontSize="10"/>
|
<TextBox x:Name="clientWarningBox" HorizontalAlignment="Left" Height="103" Margin="68,19,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="331" IsReadOnly="True" Foreground="Red" FontWeight="Bold" Text="CLIENT WARNING" FontSize="10" Grid.Column="2"/>
|
||||||
<TextBox x:Name="clientDescBox" HorizontalAlignment="Left" Height="65" Margin="10,178,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="663" Grid.ColumnSpan="3" IsReadOnly="True" HorizontalContentAlignment="Left" VerticalContentAlignment="Top" FontFamily="Comic Sans MS"/>
|
<TextBox x:Name="clientDescBox" HorizontalAlignment="Left" Height="120" Margin="68,127,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="331" IsReadOnly="True" HorizontalContentAlignment="Left" VerticalContentAlignment="Top" FontFamily="Comic Sans MS" Grid.Column="2"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</TabItem>
|
</TabItem>
|
||||||
<TabItem x:Name="changesTab" Header="CHANGES" Style="{DynamicResource TabItemStyleSeperatorsInbetween}" BorderBrush="{x:Null}" Background="#FFEDEDED" Foreground="White" IsSelected="True">
|
<TabItem x:Name="changesTab" Header="CHANGES" Style="{DynamicResource TabItemStyleSeperatorsInbetween}" BorderBrush="{x:Null}" Background="#FFEDEDED" Foreground="White" IsSelected="True">
|
||||||
<Grid Background="#FFEDEDED">
|
<Grid Background="#FFEDEDED">
|
||||||
<Rectangle x:Name="changelogGroupBox" Fill="#FFDEDCDC" HorizontalAlignment="Left" Height="245" Margin="0,10,0,0" Stroke="Black" VerticalAlignment="Top" Width="683"/>
|
<Rectangle x:Name="changelogGroupBox" Fill="#FFDEDCDC" HorizontalAlignment="Left" Height="245" Margin="0,10,0,0" Stroke="Black" VerticalAlignment="Top" Width="683"/>
|
||||||
<TextBox x:Name="changelogBox" HorizontalAlignment="Left" Height="224" Margin="10,19,0,0" TextWrapping="Wrap" Text="" VerticalAlignment="Top" Width="663" HorizontalContentAlignment="Left" VerticalContentAlignment="Top" IsReadOnly="True" FontFamily="Comic Sans MS"/>
|
<TextBox x:Name="changelogBox" HorizontalAlignment="Left" Height="228" Margin="10,19,0,0" TextWrapping="Wrap" Text="" VerticalAlignment="Top" Width="663" HorizontalContentAlignment="Left" VerticalContentAlignment="Top" IsReadOnly="True" FontFamily="Comic Sans MS"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</TabItem>
|
</TabItem>
|
||||||
<TabItem x:Name="optionsTab" Header="OPTIONS" Style="{DynamicResource TabItemStyleNoSeperators}" BorderBrush="{x:Null}" Background="#FFEDEDED" Foreground="White" IsSelected="True">
|
<TabItem x:Name="optionsTab" Header="OPTIONS" Style="{DynamicResource TabItemStyleNoSeperators}" BorderBrush="{x:Null}" Background="#FFEDEDED" Foreground="White" IsSelected="True">
|
||||||
|
@ -1,3 +1,11 @@
|
|||||||
|
1.3 Snapshot v22.8297.27455.1
|
||||||
|
Enhancements:
|
||||||
|
- Added the ability to install Addon Scripts with the "Install Mod Package" feature.
|
||||||
|
- Changed the look of the Versions tab in Stylish.
|
||||||
|
|
||||||
|
Fixes:
|
||||||
|
- Fixed the Novetus Console not exiting when the client is closed.
|
||||||
|
----------------------------------------------------------------------------
|
||||||
1.3 Snapshot v22.8297.22678.1
|
1.3 Snapshot v22.8297.22678.1
|
||||||
Enhancements:
|
Enhancements:
|
||||||
- Added most NovetusCMD server command line parameters to the Novetus Console.
|
- Added most NovetusCMD server command line parameters to the Novetus Console.
|
||||||
|
83
old/query.php
Normal file
83
old/query.php
Normal file
@ -0,0 +1,83 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
This file is part of Novetus, but unlike the rest of the program where it is under the MIT license,
|
||||||
|
this file is under the GPL 3.0 license.
|
||||||
|
|
||||||
|
Novetus's query.php is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
Novetus's query.php is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with Novetus's query.php. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
//NOVETUS MASTER SERVER QUERY CODE
|
||||||
|
//thanks to idkwhatnametoget for the port fix
|
||||||
|
|
||||||
|
//name
|
||||||
|
$name = $_GET["name"];
|
||||||
|
//port
|
||||||
|
$port = $_GET["port"];
|
||||||
|
//client
|
||||||
|
$client = $_GET["client"];
|
||||||
|
//version
|
||||||
|
$version = $_GET["version"];
|
||||||
|
|
||||||
|
if (!empty($port) and $port < 65535 and is_numeric($port) and !empty($name) and !empty($client) and !empty($version))
|
||||||
|
{
|
||||||
|
//server ip
|
||||||
|
$ip = $_GET["ip"];
|
||||||
|
//online status
|
||||||
|
$online = $_GET["online"];
|
||||||
|
|
||||||
|
//strings
|
||||||
|
$deleteentry = 1;
|
||||||
|
$status = "Offline";
|
||||||
|
|
||||||
|
$file = 'serverlist.txt';
|
||||||
|
|
||||||
|
//ONLY the $name and $client arguments will show up in the master server!
|
||||||
|
$text = base64_encode(base64_encode($name).'|'.base64_encode($ip).'|'.base64_encode($port).'|'.base64_encode($client).'|'.base64_encode($version))."\r\n";
|
||||||
|
|
||||||
|
if ($online == 1)
|
||||||
|
{
|
||||||
|
$deleteentry = 0;
|
||||||
|
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
file_put_contents($file, $text, FILE_APPEND);
|
||||||
|
|
||||||
|
$status = "Online";
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($deleteentry == 1)
|
||||||
|
{
|
||||||
|
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.
|
||||||
|
echo "" . htmlspecialchars($name) . ". A " . htmlspecialchars($client) . " server running on ". htmlspecialchars($version) .". Server Status: " . htmlspecialchars($status) . "";
|
||||||
|
}
|
||||||
|
?>
|
Loading…
Reference in New Issue
Block a user