mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-29 16:11:05 +01:00
Adds a version command to chat bot (#73)
* Adds a version command * Update Chat.cs
This commit is contained in:
@@ -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";
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user