mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-25 22:17:51 +01:00
Merge branch 'master' into MassageGroups
This commit is contained in:
Generated
+15
-13
@@ -32,6 +32,7 @@
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Main));
|
||||
this.Panels = new System.Windows.Forms.TabControl();
|
||||
this.RepoPanel = new System.Windows.Forms.TabPage();
|
||||
this.RepoRefreshButton = new System.Windows.Forms.Button();
|
||||
this.BackupTagsList = new System.Windows.Forms.ListBox();
|
||||
this.ResetRemote = new System.Windows.Forms.Button();
|
||||
this.RecloneButton = new System.Windows.Forms.Button();
|
||||
@@ -166,7 +167,6 @@
|
||||
this.WorldStatusTimer = new System.Windows.Forms.Timer(this.components);
|
||||
this.FullUpdateWorker = new System.ComponentModel.BackgroundWorker();
|
||||
this.ServerStartBGW = new System.ComponentModel.BackgroundWorker();
|
||||
this.RepoRefreshButton = new System.Windows.Forms.Button();
|
||||
this.Panels.SuspendLayout();
|
||||
this.RepoPanel.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.TestmergeSelector)).BeginInit();
|
||||
@@ -235,6 +235,18 @@
|
||||
this.RepoPanel.TabIndex = 0;
|
||||
this.RepoPanel.Text = "Repository";
|
||||
//
|
||||
// RepoRefreshButton
|
||||
//
|
||||
this.RepoRefreshButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.RepoRefreshButton.Location = new System.Drawing.Point(722, 296);
|
||||
this.RepoRefreshButton.Name = "RepoRefreshButton";
|
||||
this.RepoRefreshButton.Size = new System.Drawing.Size(140, 29);
|
||||
this.RepoRefreshButton.TabIndex = 35;
|
||||
this.RepoRefreshButton.Text = "Refresh";
|
||||
this.RepoRefreshButton.UseVisualStyleBackColor = true;
|
||||
this.RepoRefreshButton.Visible = false;
|
||||
this.RepoRefreshButton.Click += new System.EventHandler(this.RepoRefreshButton_Click);
|
||||
//
|
||||
// BackupTagsList
|
||||
//
|
||||
this.BackupTagsList.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
@@ -242,6 +254,7 @@
|
||||
"None"});
|
||||
this.BackupTagsList.Location = new System.Drawing.Point(122, 142);
|
||||
this.BackupTagsList.Name = "BackupTagsList";
|
||||
this.BackupTagsList.ScrollAlwaysVisible = true;
|
||||
this.BackupTagsList.Size = new System.Drawing.Size(535, 95);
|
||||
this.BackupTagsList.TabIndex = 34;
|
||||
this.BackupTagsList.Visible = false;
|
||||
@@ -325,6 +338,7 @@
|
||||
"None"});
|
||||
this.TestMergeListLabel.Location = new System.Drawing.Point(122, 260);
|
||||
this.TestMergeListLabel.Name = "TestMergeListLabel";
|
||||
this.TestMergeListLabel.ScrollAlwaysVisible = true;
|
||||
this.TestMergeListLabel.Size = new System.Drawing.Size(535, 95);
|
||||
this.TestMergeListLabel.TabIndex = 21;
|
||||
this.TestMergeListLabel.Visible = false;
|
||||
@@ -1838,18 +1852,6 @@
|
||||
//
|
||||
this.ServerStartBGW.DoWork += new System.ComponentModel.DoWorkEventHandler(this.ServerStartBGW_DoWork);
|
||||
//
|
||||
// RepoRefreshButton
|
||||
//
|
||||
this.RepoRefreshButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.RepoRefreshButton.Location = new System.Drawing.Point(722, 296);
|
||||
this.RepoRefreshButton.Name = "RepoRefreshButton";
|
||||
this.RepoRefreshButton.Size = new System.Drawing.Size(140, 29);
|
||||
this.RepoRefreshButton.TabIndex = 35;
|
||||
this.RepoRefreshButton.Text = "Refresh";
|
||||
this.RepoRefreshButton.UseVisualStyleBackColor = true;
|
||||
this.RepoRefreshButton.Visible = false;
|
||||
this.RepoRefreshButton.Click += new System.EventHandler(this.RepoRefreshButton_Click);
|
||||
//
|
||||
// Main
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
|
||||
@@ -122,7 +122,8 @@ namespace TGServerService
|
||||
return "Use this command in the admin channel!";
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
//cleanup
|
||||
void DisposeChat()
|
||||
{
|
||||
if (ChatProvider != null)
|
||||
@@ -177,6 +178,8 @@ namespace TGServerService
|
||||
foreach(var I in PRs)
|
||||
res += I.Number + " ";
|
||||
return res;
|
||||
case "version":
|
||||
return TGServerService.Version;
|
||||
case "kek":
|
||||
return "kek";
|
||||
}
|
||||
|
||||
@@ -49,6 +49,8 @@ namespace TGServerService
|
||||
bool compilationCancellationRequestation = false;
|
||||
bool canCancelCompilation = false;
|
||||
|
||||
bool UpdateStaged = false;
|
||||
|
||||
//deletes leftovers and checks current status
|
||||
void InitCompiler()
|
||||
{
|
||||
@@ -365,7 +367,7 @@ namespace TGServerService
|
||||
using (var DM = new Process()) //will kill the process if the thread is terminated
|
||||
{
|
||||
DM.StartInfo.FileName = ByondDirectory + "/bin/dm.exe";
|
||||
DM.StartInfo.Arguments = dmePath;
|
||||
DM.StartInfo.Arguments = String.Format("-clean {0}", dmePath);
|
||||
DM.StartInfo.RedirectStandardOutput = true;
|
||||
DM.StartInfo.UseShellExecute = false;
|
||||
var OutputList = new StringBuilder();
|
||||
@@ -446,11 +448,14 @@ namespace TGServerService
|
||||
}
|
||||
}
|
||||
}
|
||||
var msg = String.Format("Compile complete!{0}", DaemonStatus() == TGDreamDaemonStatus.Offline ? "" : " Server will update next round.");
|
||||
var staged = DaemonStatus() != TGDreamDaemonStatus.Offline;
|
||||
var msg = String.Format("Compile complete!{0}", !staged ? "" : " Server will update next round.");
|
||||
SendMessage("DM: " + msg);
|
||||
TGServerService.WriteInfo(msg, TGServerService.EventID.DMCompileSuccess);
|
||||
lock (CompilerLock)
|
||||
{
|
||||
if (staged)
|
||||
UpdateStaged = true;
|
||||
lastCompilerError = null;
|
||||
compilerCurrentStatus = TGCompilerStatus.Initialized; //still fairly valid
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace TGServerService
|
||||
irc = new IrcFeatures() { SupportNonRfc = true };
|
||||
irc.OnChannelMessage += Irc_OnChannelMessage;
|
||||
irc.OnQueryMessage += Irc_OnQueryMessage;
|
||||
irc.CtcpUserInfo = "/tg/station 13 Server Service " + System.Diagnostics.FileVersionInfo.GetVersionInfo(System.Reflection.Assembly.GetExecutingAssembly().Location).FileVersion;
|
||||
irc.CtcpUserInfo = TGServerService.Version;
|
||||
}
|
||||
|
||||
//public api
|
||||
|
||||
@@ -55,6 +55,14 @@ namespace TGServerService
|
||||
break;
|
||||
case SRWorldReboot:
|
||||
TGServerService.WriteInfo("World Rebooted", TGServerService.EventID.WorldReboot);
|
||||
lock (CompilerLock)
|
||||
{
|
||||
if (UpdateStaged)
|
||||
{
|
||||
UpdateStaged = false;
|
||||
TGServerService.WriteInfo("Staged update applied", TGServerService.EventID.ServerUpdateApplied);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,69 +13,72 @@ namespace TGServerService
|
||||
//only deprecate events, do not reuse them
|
||||
public enum EventID
|
||||
{
|
||||
ChatCommand = 1000,
|
||||
ChatConnectFail = 2000,
|
||||
ChatProviderStartFail = 3000,
|
||||
InvalidChatProvider = 4000,
|
||||
UpdateRequest = 5000,
|
||||
BYONDUpdateFail = 6000,
|
||||
BYONDUpdateStaged = 7000,
|
||||
BYONDUpdateComplete = 8000,
|
||||
ServerMoveFailed = 9000,
|
||||
ServerMovePartial = 10000,
|
||||
ServerMoveComplete = 11000,
|
||||
DMCompileCrash = 12000,
|
||||
DMInitializeCrash = 13000,
|
||||
DMCompileError = 14000,
|
||||
DMCompileSuccess = 15000,
|
||||
DMCompileCancel = 16000,
|
||||
DDReattachFail = 17000,
|
||||
DDReattachSuccess = 18000,
|
||||
DDWatchdogCrash = 19000,
|
||||
DDWatchdogExit = 20000,
|
||||
DDWatchdogRebootedServer = 21000,
|
||||
DDWatchdogRebootingServer = 22000,
|
||||
DDWatchdogRestart = 23000,
|
||||
DDWatchdogRestarted = 24000,
|
||||
DDWatchdogStarted = 25000,
|
||||
ChatSend = 26000,
|
||||
ChatBroadcast = 27000,
|
||||
ChatAdminBroadcast = 28000,
|
||||
ChatDisconnectFail = 29000,
|
||||
TopicSent = 300000,
|
||||
TopicFailed = 31000,
|
||||
CommsKeySet = 32000,
|
||||
NudgeStartFail = 33000,
|
||||
NudgeCrash = 34000,
|
||||
RepoClone = 35000,
|
||||
RepoCloneFail = 36000,
|
||||
RepoCheckout = 37000,
|
||||
RepoCheckoutFail = 38000,
|
||||
RepoHardUpdate = 39000,
|
||||
RepoHardUpdateFail = 40000,
|
||||
RepoMergeUpdate = 41000,
|
||||
RepoMergeUpdateFail = 42000,
|
||||
RepoBackupTag = 43000,
|
||||
RepoBackupTagFail = 44000,
|
||||
RepoResetTracked = 45000,
|
||||
RepoResetTrackedFail = 46000,
|
||||
RepoReset = 47000,
|
||||
RepoResetFail = 48000,
|
||||
RepoPRListError = 49000,
|
||||
RepoPRMerge = 50000,
|
||||
RepoPRMergeFail = 51000,
|
||||
RepoCommit = 52000,
|
||||
RepoCommitFail = 53000,
|
||||
RepoPush = 54000,
|
||||
RepoPushFail = 55000,
|
||||
RepoChangelog = 56000,
|
||||
RepoChangelogFail = 57000,
|
||||
ServiceShutdownFail = 61000,
|
||||
WorldReboot = 62000,
|
||||
ChatCommand = 100,
|
||||
ChatConnectFail = 200,
|
||||
ChatProviderStartFail = 300,
|
||||
InvalidChatProvider = 400,
|
||||
UpdateRequest = 500,
|
||||
BYONDUpdateFail = 600,
|
||||
BYONDUpdateStaged = 700,
|
||||
BYONDUpdateComplete = 800,
|
||||
ServerMoveFailed = 900,
|
||||
ServerMovePartial = 1000,
|
||||
ServerMoveComplete = 1100,
|
||||
DMCompileCrash = 1200,
|
||||
DMInitializeCrash = 1300,
|
||||
DMCompileError = 1400,
|
||||
DMCompileSuccess = 1500,
|
||||
DMCompileCancel = 1600,
|
||||
DDReattachFail = 1700,
|
||||
DDReattachSuccess = 1800,
|
||||
DDWatchdogCrash = 1900,
|
||||
DDWatchdogExit = 2000,
|
||||
DDWatchdogRebootedServer = 2100,
|
||||
DDWatchdogRebootingServer = 2200,
|
||||
DDWatchdogRestart = 2300,
|
||||
DDWatchdogRestarted = 2400,
|
||||
DDWatchdogStarted = 2500,
|
||||
ChatSend = 2600,
|
||||
ChatBroadcast = 2700,
|
||||
ChatAdminBroadcast = 2800,
|
||||
ChatDisconnectFail = 2900,
|
||||
TopicSent = 3000,
|
||||
TopicFailed = 3100,
|
||||
CommsKeySet = 3200,
|
||||
NudgeStartFail = 3300,
|
||||
NudgeCrash = 3400,
|
||||
RepoClone = 3500,
|
||||
RepoCloneFail = 3600,
|
||||
RepoCheckout = 3700,
|
||||
RepoCheckoutFail = 3800,
|
||||
RepoHardUpdate = 3900,
|
||||
RepoHardUpdateFail = 4000,
|
||||
RepoMergeUpdate = 4100,
|
||||
RepoMergeUpdateFail = 4200,
|
||||
RepoBackupTag = 4300,
|
||||
RepoBackupTagFail = 4400,
|
||||
RepoResetTracked = 4500,
|
||||
RepoResetTrackedFail = 4600,
|
||||
RepoReset = 4700,
|
||||
RepoResetFail = 4800,
|
||||
RepoPRListError = 4900,
|
||||
RepoPRMerge = 5000,
|
||||
RepoPRMergeFail = 5100,
|
||||
RepoCommit = 5200,
|
||||
RepoCommitFail = 5300,
|
||||
RepoPush = 5400,
|
||||
RepoPushFail = 5500,
|
||||
RepoChangelog = 5600,
|
||||
RepoChangelogFail = 5700,
|
||||
ServiceShutdownFail = 6100,
|
||||
WorldReboot = 6200,
|
||||
ServerUpdateApplied = 6300,
|
||||
}
|
||||
|
||||
static TGServerService ActiveService; //So everyone else can write to our eventlog
|
||||
|
||||
public static readonly string Version = "/tg/station 13 Server Service " + FileVersionInfo.GetVersionInfo(System.Reflection.Assembly.GetExecutingAssembly().Location).FileVersion;
|
||||
|
||||
public static void WriteInfo(string message, EventID id)
|
||||
{
|
||||
ActiveService.EventLog.WriteEntry(message, EventLogEntryType.Information, (int)id);
|
||||
|
||||
Reference in New Issue
Block a user