Changeset 107 for binary-improvements/7dtd-server-fixes/src/TelnetCommands
- Timestamp:
- Jul 26, 2014, 4:41:11 PM (10 years ago)
- Location:
- binary-improvements/7dtd-server-fixes/src/TelnetCommands
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
binary-improvements/7dtd-server-fixes/src/TelnetCommands/GetGamePrefs.cs
r103 r107 65 65 } 66 66 foreach (string s in sortedList.Keys) { 67 m_Console. md000a(sortedList [s]);67 m_Console.SendResult (sortedList [s]); 68 68 } 69 69 } else { 70 70 if (prefAccessAllowed (enumGamePrefs)) 71 m_Console. md000a(string.Format ("{0} = {1}", enumGamePrefs, GamePrefs.GetObject (enumGamePrefs)));71 m_Console.SendResult (string.Format ("{0} = {1}", enumGamePrefs, GamePrefs.GetObject (enumGamePrefs))); 72 72 else 73 m_Console. md000a("Access to requested preference is forbidden");73 m_Console.SendResult ("Access to requested preference is forbidden"); 74 74 } 75 75 } catch (Exception e) { -
binary-improvements/7dtd-server-fixes/src/TelnetCommands/GetTime.cs
r103 r107 28 28 } 29 29 int min = (int)(time % 1000) * 60 / 1000; 30 m_Console. md000a(String.Format ("Day {0}, {1:00}:{2:00} ", day, hour, min));30 m_Console.SendResult (String.Format ("Day {0}, {1:00}:{2:00} ", day, hour, min)); 31 31 } catch (Exception e) { 32 32 Log.Out ("Error in GetTime.Run: " + e); -
binary-improvements/7dtd-server-fixes/src/TelnetCommands/ListPlayersExtended.cs
r103 r107 29 29 ip = ci.networkPlayer.ipAddress; 30 30 } 31 m_Console. md000a(string.Concat (new object[]31 m_Console.SendResult (string.Concat (new object[] 32 32 { 33 33 string.Empty, … … 63 63 ); 64 64 } 65 m_Console. md000a("Total of " + w.playerEntities.list.Count + " in the game");65 m_Console.SendResult ("Total of " + w.playerEntities.list.Count + " in the game"); 66 66 } catch (Exception e) { 67 67 Log.Out ("Error in ListPlayersExtended.Run: " + e); -
binary-improvements/7dtd-server-fixes/src/TelnetCommands/SayToPlayer.cs
r103 r107 23 23 new object[] { _message, -1, _sender + " (PM)", true }); 24 24 string receiverName = CommonMappingFunctions.GetPlayerName (_receiver); 25 m_Console. md000a("Message to player " + (receiverName != null ? "\"" + receiverName + "\"" : "unknownName") + " sent with sender \"" + _sender + "\"");25 m_Console.SendResult ("Message to player " + (receiverName != null ? "\"" + receiverName + "\"" : "unknownName") + " sent with sender \"" + _sender + "\""); 26 26 } 27 27 … … 29 29 { 30 30 if (_params.Length < 2) { 31 m_Console. md000a("Usage: sayplayer <playername|entityid> <message>");31 m_Console.SendResult ("Usage: sayplayer <playername|entityid> <message>"); 32 32 return; 33 33 } … … 42 42 SendMessage (ci, _sender, message); 43 43 } else { 44 m_Console. md000a("Playername or entity ID not found.");44 m_Console.SendResult ("Playername or entity ID not found."); 45 45 } 46 46 } -
binary-improvements/7dtd-server-fixes/src/TelnetCommands/SetTimeReal.cs
r103 r107 21 21 try { 22 22 if (_params.Length != 3) { 23 m_Console. md000a("Usage: settimereal <day> <hour> <min>");23 m_Console.SendResult ("Usage: settimereal <day> <hour> <min>"); 24 24 return; 25 25 } … … 27 27 int day, hour, min; 28 28 if (!int.TryParse (_params [0], out day)) { 29 m_Console. md000a("Could not parse day number \"" + _params [0] + "\"");29 m_Console.SendResult ("Could not parse day number \"" + _params [0] + "\""); 30 30 return; 31 31 } 32 32 if (day < 1) { 33 m_Console. md000a("Day must be >= 1");33 m_Console.SendResult ("Day must be >= 1"); 34 34 return; 35 35 } 36 36 if (!int.TryParse (_params [1], out hour)) { 37 m_Console. md000a("Could not parse hour \"" + _params [1] + "\"");37 m_Console.SendResult ("Could not parse hour \"" + _params [1] + "\""); 38 38 return; 39 39 } 40 40 if (hour > 23) { 41 m_Console. md000a("Hour must be <= 23");41 m_Console.SendResult ("Hour must be <= 23"); 42 42 return; 43 43 } 44 44 if (!int.TryParse (_params [2], out min)) { 45 m_Console. md000a("Could not parse minute \"" + _params [2] + "\"");45 m_Console.SendResult ("Could not parse minute \"" + _params [2] + "\""); 46 46 return; 47 47 } 48 48 if (min > 59) { 49 m_Console. md000a("Minute must be <= 59");49 m_Console.SendResult ("Minute must be <= 59"); 50 50 return; 51 51 } 52 52 if ((day < 1) || (hour < 8 && day < 1)) { 53 m_Console. md000a("Time may not be prior to day 1, 8:00");53 m_Console.SendResult ("Time may not be prior to day 1, 8:00"); 54 54 return; 55 55 } … … 57 57 ulong time = ((ulong)(day - 1) * 24000) + ((ulong)hour * 1000) + ((ulong)min * 1000 / 60) - 8000; 58 58 m_Console.gameManager.World.gameTime = time; 59 m_Console. md000a(String.Format ("Set time to Day {0}, {1:00}:{2:00} = {3}", day, hour, min, time));59 m_Console.SendResult (String.Format ("Set time to Day {0}, {1:00}:{2:00} = {3}", day, hour, min, time)); 60 60 } catch (Exception e) { 61 61 Log.Out ("Error in SetTimeReal.Run: " + e); -
binary-improvements/7dtd-server-fixes/src/TelnetCommands/ShowInventory.cs
r103 r107 25 25 try { 26 26 if (_params.Length < 1) { 27 m_Console. md000a("Usage: showinventory <playername|entityid>");27 m_Console.SendResult ("Usage: showinventory <playername|entityid>"); 28 28 return; 29 29 } … … 47 47 48 48 if (items == null) { 49 m_Console. md000a("Playername or entity id not found or no inventory saved (first saved after a player has been online for 30s).");49 m_Console.SendResult ("Playername or entity id not found or no inventory saved (first saved after a player has been online for 30s)."); 50 50 return; 51 51 } 52 52 53 m_Console. md000a("Belt of player:");53 m_Console.SendResult ("Belt of player:"); 54 54 foreach (KeyValuePair<string, int> kvp in items.belt) { 55 m_Console. md000a(string.Format (" {0:000} * {1}", kvp.Value, kvp.Key));55 m_Console.SendResult (string.Format (" {0:000} * {1}", kvp.Value, kvp.Key)); 56 56 } 57 m_Console. md000a(string.Empty);58 m_Console. md000a("Bagpack of player:");57 m_Console.SendResult (string.Empty); 58 m_Console.SendResult ("Bagpack of player:"); 59 59 foreach (KeyValuePair<string, int> kvp in items.bag) { 60 m_Console. md000a(string.Format (" {0:000} * {1}", kvp.Value, kvp.Key));60 m_Console.SendResult (string.Format (" {0:000} * {1}", kvp.Value, kvp.Key)); 61 61 } 62 m_Console. md000a(string.Empty);62 m_Console.SendResult (string.Empty); 63 63 } catch (Exception e) { 64 64 Log.Out ("Error in ShowInventory.Run: " + e);
Note:
See TracChangeset
for help on using the changeset viewer.