diff --git a/TGServerService/Chat.cs b/TGServerService/Chat.cs index ceac94db14..3c1ab9b2e4 100644 --- a/TGServerService/Chat.cs +++ b/TGServerService/Chat.cs @@ -122,7 +122,8 @@ namespace TGServerService return "Use this command in the admin channel!"; return null; } - + + //cleanup void DisposeChat() { if (ChatProvider != null) @@ -167,6 +168,8 @@ namespace TGServerService if (parameters.Count < 1) return "Usage: namecheck "; return NameCheck(parameters[0], speaker); + case "version": + return TGServerService.Version; case "kek": return "kek"; } diff --git a/TGServerService/IRC.cs b/TGServerService/IRC.cs index ef71516300..d6016aef35 100644 --- a/TGServerService/IRC.cs +++ b/TGServerService/IRC.cs @@ -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 diff --git a/TGServerService/ServerService.cs b/TGServerService/ServerService.cs index eae04d0c09..c7fbc1d1bb 100644 --- a/TGServerService/ServerService.cs +++ b/TGServerService/ServerService.cs @@ -77,6 +77,8 @@ namespace TGServerService 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);