public static void ShowPlugins() { int pluginCount = plugins.Count; TextTools.TextTable tt = new TextTools.TextTable(new string[] { "# ", "name", "author", "version" }); tt.Header[0].Alignment = TextTools.Align.Right; numberFormatCounter = 0; var data = from h in plugins select new string [] { NumberFormat(pluginCount), h.Name, h.Author, h.Version.ToString() }; Server.Print("Currently loaded plugins:\n"); tt.Render(data.ToArray(), Server.Print, Console.WindowWidth); Server.Print("{0} Plugins\n", plugins.Count); }
public override void Execute(Player player) { if (player != null && !player.Privileges.HasPrivilege("status")) { WriteLine(player, "You have no status privileges"); return; } var data = from p in Player.Players select new string [] { p.Index.ToString(), p.Name, p.AuthID, string.Format("#{0}", p.UserID), p.Privileges.PrivilegesString }; // TODO: do something about this hack playerInstance = player; table.Render(data.ToArray(), write, Console.WindowWidth); }
public static void ShowPlugins() { int pluginCount = plugins.Count; TextTools.TextTable tt = new TextTools.TextTable(new string[] { "# ", "name", "author", "version" }); tt.Header[0].Alignment = TextTools.Align.Right; numberFormatCounter = 0; var data = from h in plugins select new string [] { NumberFormat(pluginCount), h.Name, h.Author, h.Version.ToString() }; Server.Print("Currently loaded plugins:\n"); tt.Render(data.ToArray(), Server.Print, Console.WindowWidth); Server.Print("{0} Plugins\n", plugins.Count); }