source: binary-improvements/7dtd-server-fixes/src/AllocsLogFunctions.cs@ 136

Last change on this file since 136 was 130, checked in by alloc, 10 years ago

Fixes

File size: 927 bytes
Line 
1using System;
2using System.Collections.Generic;
3using UnityEngine;
4
5namespace AllocsFixes
6{
7 public class AllocsLogFunctions
8 {
9 public static void RequestToSpawnPlayer (GameManager manager, int _clientId, string _name, string _playerClassname, string _skinTexture, int _chunkViewDim)
10 {
11 try {
12 ClientInfo ci = CommonMappingFunctions.GetClientInfoFromClientID (_clientId);
13 int entityId = CommonMappingFunctions.GetEntityID (ci);
14 EntityPlayer ep = CommonMappingFunctions.GetEntityPlayer (ci);
15
16 string ip = ci.networkPlayer.ipAddress;
17 string name = string.Empty;
18
19 if (ep != null)
20 name = ep.EntityName;
21
22 Log.Out ("Player connected, clientid=" + _clientId +
23 ", entityid=" + entityId +
24 ", name=" + name +
25 ", steamid=" + CommonMappingFunctions.GetSteamID (ci) +
26 ", ip=" + ip
27 );
28 } catch (Exception e) {
29 Log.Out ("Error in RequestToSpawnPlayer: " + e);
30 }
31 }
32 }
33}
Note: See TracBrowser for help on using the repository browser.