// // openmapi.org - IRC <--> Jabber bridge - VersionCommand.cs // // (C) 2009 by Johannes Roith // // Author: Johannes Roith // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as // published by the Free Software Foundation, either version 3 of the // License, or (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Affero General Public License for more details. // namespace Jonfo.Jabber.IRC { using System; using System.Reflection; using jabber; /// /// Command that prints version information. /// public sealed class VersionCommand : Command { public VersionCommand (IRCJabberBridge bridge) : base (bridge) { } public override string Description { get { return "Show version"; } } public override string CommandStr { get { return "version"; } } public override void Run (JID from, string args) { Assembly asm = Assembly.GetExecutingAssembly (); string version = asm.GetName().Version.ToString (); bridge.JabberClient.Message (from, "OpenMapi.org IRC-Jabber " + "Bridge Bot v" + version + " - 15.01.09; Author: Johannes Roith; " + "Licensed under the AGPL."); } } }