Changeset 326 for binary-improvements/AllocsCommands/Commands
- Timestamp:
- Sep 4, 2018, 2:33:52 PM (6 years ago)
- Location:
- binary-improvements/AllocsCommands/Commands
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
binary-improvements/AllocsCommands/Commands/Give.cs
r325 r326 47 47 iv = new ItemValue (iv.type, true); 48 48 49 int n = int.MinValue;49 int n; 50 50 if (!int.TryParse (_params [2], out n) || n <= 0) { 51 51 SdtdConsole.Instance.Output ("Amount is not an integer or not greater than zero."); -
binary-improvements/AllocsCommands/Commands/ListKnownPlayers.cs
r325 r326 35 35 36 36 if (_params.Count == 1) { 37 long steamid = -1;38 if (_params [0]. ToLower ().Equals("-online")) {37 long steamid; 38 if (_params [0].EqualsCaseInsensitive ("-online")) { 39 39 onlineOnly = true; 40 } else if (_params [0]. ToLower ().Equals("-notbanned")) {40 } else if (_params [0].EqualsCaseInsensitive ("-notbanned")) { 41 41 notBannedOnly = true; 42 42 } else if (_params [0].Length == 17 && long.TryParse (_params [0], out steamid)) { 43 43 isSteamId = true; 44 44 } else { 45 nameFilter = _params [0] .ToLower ();45 nameFilter = _params [0]; 46 46 } 47 47 } … … 53 53 SdtdConsole.Instance.Output (string.Format ( 54 54 "{0}. {1}, id={2}, steamid={3}, online={4}, ip={5}, playtime={6} m, seen={7}", 55 0, p.Name, p.EntityID, nameFilter, p.IsOnline, p.IP,55 0, p.Name, p.EntityID, _params [0], p.IsOnline, p.IP, 56 56 p.TotalPlayTime / 60, 57 57 p.LastOnline.ToString ("yyyy-MM-dd HH:mm")) 58 58 ); 59 59 } else { 60 SdtdConsole.Instance.Output (string.Format ("SteamID {0} unknown!", nameFilter));60 SdtdConsole.Instance.Output (string.Format ("SteamID {0} unknown!", _params [0])); 61 61 } 62 62 } else { … … 68 68 (!onlineOnly || p.IsOnline) 69 69 && (!notBannedOnly || !admTools.IsBanned (sid)) 70 && (nameFilter.Length == 0 || p.Name. ToLower ().Contains(nameFilter))70 && (nameFilter.Length == 0 || p.Name.ContainsCaseInsensitive (nameFilter)) 71 71 ) { 72 72 SdtdConsole.Instance.Output (string.Format ( -
binary-improvements/AllocsCommands/Commands/ListLandProtection.cs
r325 r326 27 27 try { 28 28 if (_senderInfo.RemoteClientInfo != null) { 29 if (_params.Count >= 1 && _params [0]. ToLower ().Equals("nearby")) {29 if (_params.Count >= 1 && _params [0].EqualsCaseInsensitive ("nearby")) { 30 30 _params.Add (_senderInfo.RemoteClientInfo.playerId); 31 31 } … … 50 50 long tempLong; 51 51 52 if (_params [0]. ToLower ().Equals("summary")) {52 if (_params [0].EqualsCaseInsensitive ("summary")) { 53 53 summaryOnly = true; 54 54 } else if (_params [0].Length == 17 && long.TryParse (_params [0], out tempLong)) { … … 64 64 } 65 65 } else if (_params.Count >= 2) { 66 if (_params [0]. ToLower ().Equals("nearby")) {66 if (_params [0].EqualsCaseInsensitive ("nearby")) { 67 67 try { 68 68 if (_params.Count == 3) { … … 123 123 } 124 124 125 if (st eamIdFilter.Length == 0) {125 if (string.IsNullOrEmpty (steamIdFilter)) { 126 126 SdtdConsole.Instance.Output ("Total of " + ppl.m_lpBlockMap.Count + " keystones in the game"); 127 127 } -
binary-improvements/AllocsCommands/Commands/RemoveLandProtection.cs
r325 r326 59 59 private void removeByPosition (List<string> _coords) { 60 60 try { 61 int x = int.MinValue;61 int x, y, z; 62 62 int.TryParse (_coords [0], out x); 63 int y = int.MinValue;64 63 int.TryParse (_coords [1], out y); 65 int z = int.MinValue;66 64 int.TryParse (_coords [2], out z); 67 65
Note:
See TracChangeset
for help on using the changeset viewer.