Changeset 174 for binary-improvements/7dtd-server-fixes
- Timestamp:
- Sep 7, 2014, 8:16:54 PM (10 years ago)
- Location:
- binary-improvements/7dtd-server-fixes
- Files:
-
- 1 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
binary-improvements/7dtd-server-fixes/7dtd-server-fixes.csproj
r164 r174 118 118 <Compile Include="src\CustomCommands\TeleportPlayer.cs" /> 119 119 <Compile Include="src\NetConnections\Servers\Web\API\GetPlayerInventory.cs" /> 120 <Compile Include="src\NetConnections\Servers\Web\API\GetLandClaims.cs" /> 120 121 </ItemGroup> 121 122 <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> -
binary-improvements/7dtd-server-fixes/src/CustomCommands/ShowInventory.cs
r145 r174 38 38 PersistentData.Inventory inv = p.Inventory; 39 39 40 m_Console.SendResult ("Belt of player :");40 m_Console.SendResult ("Belt of player " + p.Name + ":"); 41 41 for (int i = 0; i < inv.belt.Count; i++) { 42 42 if (inv.belt [i] != null) … … 44 44 } 45 45 m_Console.SendResult (string.Empty); 46 m_Console.SendResult ("Bagpack of player :");46 m_Console.SendResult ("Bagpack of player " + p.Name + ":"); 47 47 for (int i = 0; i < inv.bag.Count; i++) { 48 48 if (inv.bag [i] != null) -
binary-improvements/7dtd-server-fixes/src/CustomCommands/TeleportPlayer.cs
r163 r174 54 54 p.Entity.position.y = y; 55 55 p.Entity.position.z = z; 56 NetPackage_EntityPosAndRot pkg = new NetPackage_EntityPosAndRot (p.Entity);56 NetPackage_EntityPosAndRot pkg = new NetPackage_EntityPosAndRot (p.Entity); 57 57 58 p.ClientInfo.netConnection [0].mdv0005(pkg);58 p.ClientInfo.netConnection [0].Send (pkg); 59 59 } 60 60 } catch (Exception e) { … … 62 62 } 63 63 } 64 64 65 } 65 66 } -
binary-improvements/7dtd-server-fixes/src/NetConnections/Servers/Telnet/TelnetConnection.cs
r142 r174 41 41 if (!IsClosed () && stream.CanWrite) { 42 42 byte[] utfData = Encoding.UTF8.GetBytes (s); 43 stream.Write (utfData, 0, utfData.Length);43 stream.Write (utfData, 0, utfData.Length); 44 44 WriteByte (13); 45 45 WriteByte (10); … … 80 80 int b = stream.ReadByte (); 81 81 if (b == '\r' || b == '\n') { 82 if (lineBufferLength > 0) 82 if (lineBufferLength > 0) { 83 83 return true; 84 } 84 85 } else if (b >= 0) { 85 lineBuffer [lineBufferLength] = (byte)b;86 lineBuffer [lineBufferLength] = (byte)b; 86 87 lineBufferLength++; 87 88 } … … 92 93 public string GetLine () 93 94 { 94 string res = Encoding.UTF8.GetString (lineBuffer, 0, lineBufferLength);;95 string res = Encoding.UTF8.GetString (lineBuffer, 0, lineBufferLength); 95 96 lineBufferLength = 0; 96 97 return res; -
binary-improvements/7dtd-server-fixes/src/NetConnections/Servers/Web/ApiHandler.cs
r163 r174 16 16 { 17 17 this.staticPart = staticPart; 18 apis.Add ("getlandclaims", new GetLandClaims ()); 18 19 apis.Add ("getplayersonline", new GetPlayersOnline ()); 19 20 apis.Add ("getplayerslocation", new GetPlayersLocation ());
Note:
See TracChangeset
for help on using the changeset viewer.