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

Last change on this file since 89 was 83, checked in by alloc, 10 years ago

server fixes

File size: 1.0 KB
RevLine 
[83]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 string ip = manager.connectionManager.connectedClients [_clientId].networkPlayer.ipAddress;
10 string name = string.Empty;
11 int entityId = -1;
12 Dictionary<int,int> d = manager.connectionManager.mapClientToEntity;
13 if (d.ContainsKey (_clientId)) {
14 entityId = d [_clientId];
15 World w = manager.World;
16 name = w.playerEntities.dict [entityId].EntityName;
17 }
18
19 Log.Out ("Player connected, clientid=" + _clientId +
20 ", entityid=" + entityId +
21 ", name=" + name +
22 ", steamid=" + SingletonMonoBehaviour<Authenticator>.Instance.GetPlayerId (name) +
23 ", ip=" + ip
24 );
25 }
26
27 public static void ExecuteCmdFromClient (ConsoleSdtd console, NetworkPlayer _networkPlayer, string _playerID, string _command)
28 {
29 Log.Out ("Executed command \"" + _command + "\" from player \"" + _playerID + "\"");
30 }
31}
Note: See TracBrowser for help on using the repository browser.