- Timestamp:
- Apr 18, 2015, 4:27:57 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
binary-improvements/AllocsCommands/Commands/ListKnownPlayers.cs
r224 r230 5 5 namespace AllocsFixes.CustomCommands 6 6 { 7 public class ListKnownPlayers : ConsoleC ommand7 public class ListKnownPlayers : ConsoleCmdAbstract 8 8 { 9 public ListKnownPlayers (ConsoleSdtd cons) : base(cons) 10 { 11 } 12 13 public override string Description () 9 public override string GetDescription () 14 10 { 15 11 return "lists all players that were ever online (optionally filtered)"; 16 12 } 17 13 18 public override string[] Names ()14 public override string[] GetCommands () 19 15 { 20 16 return new string[] { "listknownplayers", "lkp" }; 21 17 } 22 18 23 public override void Run (string[] _params)19 public override void Execute (List<string> _params, CommandSenderInfo _senderInfo) 24 20 { 25 21 try { 26 AdminTools admTools = CommonMappingFunctions.GetGameManager ().adminTools;22 AdminTools admTools = GameManager.Instance.adminTools; 27 23 28 24 bool onlineOnly = false; … … 30 26 string nameFilter = string.Empty; 31 27 32 if (_params. Length== 1) {28 if (_params.Count == 1) { 33 29 if (_params [0].ToLower ().Equals ("-online")) { 34 30 onlineOnly = true; … … 49 45 && (nameFilter.Length == 0 || p.Name.ToLower ().Contains (nameFilter)) 50 46 ) { 51 m_Console.SendResult (String.Format ("{0}. {1}, id={2}, steamid={3}, online={4}, ip={5}, playtime={6} m, seen={7}",47 SdtdConsole.Instance.Output (String.Format ("{0}. {1}, id={2}, steamid={3}, online={4}, ip={5}, playtime={6} m, seen={7}", 52 48 ++num, p.Name, p.EntityID, sid, p.IsOnline, p.IP, 53 49 p.TotalPlayTime / 60, … … 56 52 } 57 53 } 58 m_Console.SendResult ("Total of " + PersistentContainer.Instance.Players.Count + " known");54 SdtdConsole.Instance.Output ("Total of " + PersistentContainer.Instance.Players.Count + " known"); 59 55 } catch (Exception e) { 60 56 Log.Out ("Error in ListKnownPlayers.Run: " + e);
Note:
See TracChangeset
for help on using the changeset viewer.