Esempio n. 1
0
        internal void Accept(NetConnection connection, WebInterface.WebPlayerInfoResponse info)
        {
            if (_activeConnections.Contains(connection))
            {
                return;                                          //Stupid shield
            }
            var player = new ServerPlayer(Server, new NetworkPlayer
            {
                IsPremium = info.Premium,
                UniqueId  = info.Id,
                Username  = info.Username
            })
            {
                Connection = connection
            };

            Server.AddPlayer(player);

            _activeConnections.Add(connection);
            _playersReverseTable.Add(connection, player);
        }