Changeset 76 for binary-improvements/7dtd-server-fixes/src
- Timestamp:
 - Jul 17, 2014, 1:46:42 AM (11 years ago)
 - Location:
 - binary-improvements/7dtd-server-fixes/src
 - Files:
 - 
      
- 2 edited
 
- 
          
  AllocsRequestToSpawnPlayer.cs (modified) (2 diffs)
 - 
          
  TelnetCommands/ListPlayersExtended.cs (modified) (2 diffs)
 
 
Legend:
- Unmodified
 - Added
 - Removed
 
- 
      
binary-improvements/7dtd-server-fixes/src/AllocsRequestToSpawnPlayer.cs
r75 r76 1 1 using System; 2 using System.Collections.Generic; 2 3 3 4 public class AllocsRequestToSpawnPlayer … … 6 7 { 7 8 string ip = manager.connectionManager.connectedClients [_clientId].networkPlayer.ipAddress; 8 Log.Out ("Player connected, clientid=" + _clientId + ", ip=" + ip); 9 string name = string.Empty; 10 int entityId = -1; 11 Dictionary<int,int> d = manager.connectionManager.mapClientToEntity; 12 if (d.ContainsKey (_clientId)) { 13 entityId = d [_clientId]; 14 World w = manager.World; 15 name = w.playerEntities.dict [entityId].EntityName; 16 } 17 18 Log.Out ("Player connected, clientid=" + _clientId + 19 ", entityid=" + entityId + 20 ", name=" + name + 21 ", steamid=" + SingletonMonoBehaviour<Authenticator>.Instance.GetPlayerId (name) + 22 ", ip=" + ip); 9 23 } 10 24 }  - 
      
binary-improvements/7dtd-server-fixes/src/TelnetCommands/ListPlayersExtended.cs
r75 r76 22 22 foreach (KeyValuePair<int, EntityPlayer> current in w.playerEntities.dict) 23 23 { 24 int clientId = -1; 25 Dictionary<int,int> d = this.m_Console.gameManager.connectionManager.mapClientToEntity; 26 foreach (KeyValuePair<int, int> mapping in d) { 27 if (mapping.Value == current.Value.fd0087) { 28 clientId = mapping.Key; 29 } 30 } 31 string ip = string.Empty; 32 if (clientId >= 0) { 33 ip = this.m_Console.gameManager.connectionManager.connectedClients [clientId].networkPlayer.ipAddress; 34 } 24 35 m_Console.md000a (string.Concat (new object[] 25 36 { … … 46 57 ", score=", 47 58 current.Value.Score, 48 ", ", 49 SingletonMonoBehaviour<Authenticator>.Instance.GetPlayerId (current.Value.EntityName) 59 ", steamid=", 60 SingletonMonoBehaviour<Authenticator>.Instance.GetPlayerId (current.Value.EntityName), 61 ", ip=", 62 ip 50 63 })); 51 64 }  
  Note:
 See   TracChangeset
 for help on using the changeset viewer.
  ![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)