Adds a version command to chat bot (#73)

* Adds a version command

* Update Chat.cs
This commit is contained in:
Jordan Brown
2017-06-22 13:37:53 -04:00
committed by GitHub
parent ce75b450aa
commit 33a2d6c812
3 changed files with 7 additions and 2 deletions
+4 -1
View File
@@ -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 <target>";
return NameCheck(parameters[0], speaker);
case "version":
return TGServerService.Version;
case "kek":
return "kek";
}
+1 -1
View File
@@ -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
+2
View File
@@ -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);