private static void UnregisterHandlers(IonTcpConnection connection)
 {
     connection
     .AddHandler(206, PacketHandlerPriority.DefaultAction, ProcessEncryptionRequest)
     .AddHandler(204, PacketHandlerPriority.DefaultAction, ProcessSSOTicket)
     .AddHandler(2002, PacketHandlerPriority.DefaultAction, ProcessSessionRequest);
 }
Esempio n. 2
0
        /// <summary>
        /// Stops the client, removes this user from room, updates last online values etc.
        /// </summary>
        public void Stop()
        {
            // Leave room
            // Update last online
            mHabbo      = null;
            mConnection = null;

            mMessageHandler.Destroy();
            mMessageHandler = null;
        }
Esempio n. 3
0
File: User.cs Progetto: habb0/IHI
        /// <summary>
        /// Ensure that the online values are present.
        /// ALWAYS CALL StopLoggedInValues() WHEN YOU ARE FINISHED!
        /// </summary>
        public void StartLoggedInValues(IonTcpConnection Connection)
        {
            OnlineValueCounter++;
            if (OnlineValueCounter == 1)
            {
                this.fPonged = true;

                this.fFuseRights    = Core.GetFuseManager().GetUserRights(this.fID);
                this.fSessionValues = new Dictionary <object, object>();
            }
        }
Esempio n. 4
0
        internal PacketProcessor(User User)
        {
            this.fUser = User;

            IonTcpConnection Connection = this.fUser.GetConnection();
            Type             ThisType   = typeof(PacketProcessor);

            Connection.AddHandler(196, PacketHandlerPriority.DefaultAction, ThisType.GetMethod("Process_Pong"));
            Connection.AddHandler(204, PacketHandlerPriority.DefaultAction, ThisType.GetMethod("Process_SSOTicket"));
            Connection.AddHandler(206, PacketHandlerPriority.DefaultAction, ThisType.GetMethod("Process_InitCrypto"));
        }
Esempio n. 5
0
File: User.cs Progetto: habb0/IHI
 /// <summary>
 /// Cleans up the online values when nobody is using them.
 /// </summary>
 public void StopLoggedInValues()
 {
     OnlineValueCounter--;
     if (OnlineValueCounter == 0)
     {
         this.fConnection      = null;
         this.fPacketSender    = null;
         this.fPacketProcessor = null;
         this.fSessionValues   = null;
         this.fFuseRights      = null;
     }
 }
        private static void RegisterHandlers(object source, ConnectionEventArgs args)
        {
            IonTcpConnection connection = source as IonTcpConnection;

            if (connection == null)
            {
                return;
            }

            connection.
            AddHandler(2002, PacketHandlerPriority.DefaultAction, ProcessSessionRequest).
            AddHandler(206, PacketHandlerPriority.DefaultAction, ProcessEncryptionRequest).
            AddHandler(204, PacketHandlerPriority.DefaultAction, ProcessSSOTicket);
        }
Esempio n. 7
0
 /// <summary>
 /// Creates a minimal User object.
 /// This is not cached and is only used after the user connects but before logging in.
 /// Do not use this user for custom features. Use a cached version.
 /// </summary>
 /// <param name="Connection">The connection this user is for.</param>
 /// <returns>A mostly non-function user.</returns>
 public User GetPreLoginUser(IonTcpConnection Connection)
 {
     return(new User(Connection));
 }
Esempio n. 8
0
File: Habbo.cs Progetto: habb0/IHI
 /// <summary>
 ///   Construct a prelogin User object.
 ///   DO NOT USE THIS FOR GETTING A USER - USE THE USER DISTRIBUTOR
 /// </summary>
 internal Habbo(IonTcpConnection connection)
 {
     _connection = connection;
 }
Esempio n. 9
0
File: Habbo.cs Progetto: habb0/IHI
        public void LoginMerge(Habbo loggedInUser)
        {
            _connection = loggedInUser._connection;

            _connection.Habbo = this;
        }
Esempio n. 10
0
File: User.cs Progetto: habb0/IHI
 /// <summary>
 /// Construct a prelogin User object.
 /// DO NOT USE THIS FOR GETTING A USER - USE THE USER DISTRIBUTOR
 /// </summary>
 internal User(IonTcpConnection Connection)
 {
     this.fConnection      = Connection;
     this.fPacketSender    = new PacketSender(this);
     this.fPacketProcessor = new PacketProcessor(this);
 }
Esempio n. 11
0
 /// <summary>
 ///   Creates a minimal Habbo object.
 ///   This is not cached and is only used after the Habbo connects but before logging in.
 ///   Do not use this Habbo for custom features. Use a cached version.
 /// </summary>
 /// <param name = "connection">The Connection this Habbo is for.</param>
 /// <returns>A mostly non-function Habbo.</returns>
 public Habbo GetPreLoginHabbo(IonTcpConnection connection)
 {
     return(new Habbo(connection));
 }
Esempio n. 12
0
 /// <summary>
 /// Constructs a GameClient instance for a given client ID.
 /// </summary>
 /// <param name="clientID">The ID of this client.</param>
 public GameClient(uint clientID)
 {
     mID             = clientID;
     mConnection     = IonEnvironment.GetTcpConnections().GetConnection(clientID);
     mMessageHandler = new ClientMessageHandler(this);
 }