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

Last change on this file since 105 was 103, checked in by alloc, 10 years ago

fixes

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