Пример #1
0
        public void Disconnect()
        {
            try
            {
                if (Habbo != null)
                {
                    using (IQueryAdapter dbClient = PlusEnvironment.GetDatabaseManager().GetQueryReactor())
                    {
                        dbClient.RunQuery(Habbo.GetQueryString);
                    }

                    Habbo.OnDisconnect();
                }
            }
            catch (Exception e)
            {
                ExceptionLogger.LogException(e);
            }

            if (!_disconnected)
            {
                if (_connection != null)
                {
                    _connection.Dispose();
                }
                _disconnected = true;
            }
        }
Пример #2
0
        public void Dispose()
        {
            if (Habbo != null)
            {
                Habbo.OnDisconnect();
            }

            MachineId     = string.Empty;
            _disconnected = true;
            Habbo         = null;
            _connection   = null;
            Rc4Client     = null;
            _packetParser = null;
        }
Пример #3
0
        internal void Stop()
        {
            if (GetMessageHandler() != null)
            {
                MessageHandler.Destroy();
            }
            if (GetHabbo() != null)
            {
                Habbo.OnDisconnect();
            }

            MessageHandler = null;
            Habbo          = null;
            Connection     = null;
        }
Пример #4
0
        internal void Stop()
        {
            if (GetMessageHandler() != null)
            {
                MessageHandler.Destroy();
            }

            if (GetHabbo() != null)
            {
                Habbo.OnDisconnect();
            }
            CurrentRoomUserID = -1;

            this.MessageHandler = null;
            this.Habbo          = null;
            this.Connection     = null;
        }
Пример #5
0
        /// <summary>
        /// Stops this instance.
        /// </summary>
        internal void Stop()
        {
            if (GetMessageHandler() != null)
            {
                _messageHandler.Destroy();
            }

            if (GetHabbo() != null)
            {
                _habbo.OnDisconnect("Logged out");
            }

            CurrentRoomUserId = -1;
            _messageHandler   = null;
            _habbo            = null;
            _connection       = null;
        }