Rev | Line | |
---|
[224] | 1 | using System;
|
---|
| 2 | using System.Collections.Generic;
|
---|
| 3 | using System.Reflection;
|
---|
| 4 |
|
---|
| 5 | namespace AllocsFixes.CustomCommands
|
---|
| 6 | {
|
---|
| 7 | public class Version : ConsoleCommand
|
---|
| 8 | {
|
---|
| 9 | public Version (ConsoleSdtd cons) : base(cons)
|
---|
| 10 | {
|
---|
| 11 | }
|
---|
| 12 |
|
---|
| 13 | public override string Description ()
|
---|
| 14 | {
|
---|
| 15 | return "get the currently running version of the server fixes and loaded mods";
|
---|
| 16 | }
|
---|
| 17 |
|
---|
| 18 | public override string[] Names ()
|
---|
| 19 | {
|
---|
| 20 | return new string[] { "version", string.Empty };
|
---|
| 21 | }
|
---|
| 22 |
|
---|
| 23 | public override void Run (string[] _params)
|
---|
| 24 | {
|
---|
| 25 | try {
|
---|
| 26 | m_Console.SendResult ("Versions:");
|
---|
| 27 | m_Console.SendResult ("Server fixes: " + Assembly.GetExecutingAssembly ().GetName ().Version);
|
---|
| 28 | foreach (Mods.ModData md in Mods.LoadedMods ()) {
|
---|
| 29 | m_Console.SendResult ("Mod " + md.name + ": " + md.version);
|
---|
| 30 | }
|
---|
| 31 | } catch (Exception e) {
|
---|
| 32 | Log.Out ("Error in Version.Run: " + e);
|
---|
| 33 | }
|
---|
| 34 | }
|
---|
| 35 | }
|
---|
| 36 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.