Ejemplo n.º 1
0
        public MessengerComponent(int UserId)
        {
            DataTable Data = Engine.dbManager.ReadTable("SELECT * FROM members_buddies WHERE userid = '" + UserId + "'");

            foreach (DataRow Row in Data.Rows)
            {
                Messenger Messenger = new Messenger()
                {
                    FriendID  = (int)Row["friendid"],
                    GetFriend = FluentUsers.GetFromID((int)Row["friendid"])
                };

                MessengerBuddy.Add(Messenger.FriendID, Messenger);
            }
        }
Ejemplo n.º 2
0
        public static void AuthenticateUser(Message Msg, Session Session)
        {
            string SSO = Msg.Read <string>();

            try
            {
                Session.User = FluentUsers.AuthenticateUser(SSO);

                fuseResponse.New(Opcodes.OpcodesOut.SendInterface);
                fuseResponse.Send(Session);

                fuseResponse.New(Opcodes.OpcodesOut.SendFriends);
                fuseResponse.Append <int>(300);
                fuseResponse.Append <int>(800);
                fuseResponse.Append <int>(1100);
                fuseResponse.Append <int>(1100);
                fuseResponse.Append <int>(0);
                fuseResponse.Append <int>(0);
                fuseResponse.Append <int>(100);
                fuseResponse.Append <int>(0);
                fuseResponse.Send(Session);

                fuseResponse.New(Opcodes.OpcodesOut.SendMinimailCount);
                fuseResponse.Append <int>(1);
                fuseResponse.Send(Session);

                fuseResponse.New(Opcodes.OpcodesOut.SendHomeRoom);
                fuseResponse.Append <int>(100);
                fuseResponse.Append <int>(0);
                fuseResponse.Send(Session);

                Session.SendAlert("Welcome to Ferri, " + Session.User.Username);

                fuseResponse.New(2367);
                fuseResponse.Append <int>(-1);
                fuseResponse.Append <int>(0);
                fuseResponse.Append <int>(0);
                fuseResponse.Append <bool>(true);
                fuseResponse.Append <bool>(true);
                fuseResponse.Append <bool>(true);
                fuseResponse.Append <bool>(true);
                fuseResponse.Append <bool>(true);
                fuseResponse.Append <bool>(true);
                fuseResponse.Append <bool>(true);
                fuseResponse.Append <int>(0);
                fuseResponse.Send(Session);

                fuseResponse.New(108);
                fuseResponse.Append <int>(9); // count? wtf?
                fuseResponse.Append <string>("CITIZEN");
                fuseResponse.Append <bool>(true);
                fuseResponse.Append <string>("");
                fuseResponse.Append <string>("VOTE_IN_COMPETITIONS");
                fuseResponse.Append <bool>(true);
                fuseResponse.Append <string>("");
                fuseResponse.Append <string>("JUDGE_CHAT_REVIEWS");
                fuseResponse.Append <bool>(true);
                fuseResponse.Append <string>("");
                fuseResponse.Append <string>("FULL_CHAT");
                fuseResponse.Append <bool>(true);
                fuseResponse.Append <string>("");
                fuseResponse.Append <string>("CALL_ON_HELPERS");
                fuseResponse.Append <bool>(true);
                fuseResponse.Append <string>("");
                fuseResponse.Append <string>("TRADE");
                fuseResponse.Append <bool>(true);
                fuseResponse.Append <string>("");
                fuseResponse.Append <string>("USE_GUIDE_TOOL");
                fuseResponse.Append <bool>(true);
                fuseResponse.Append <string>("");
                fuseResponse.Append <string>("SAFE_CHAT");
                fuseResponse.Append <bool>(true);
                fuseResponse.Append <string>("");
                fuseResponse.Append <string>("SAFE_CHAT");
                fuseResponse.Append <bool>(true);
                fuseResponse.Append <string>("");
                fuseResponse.Send(Session);

                Session.User.Emblems = new Habbo_Hotel.Users.Badges.EmblemsManager();
                Session.User.Emblems.LoadBadges(Session.User.ID);
                Session.User.MessengerComponent = new Habbo_Hotel.Users.Messenger.MessengerComponent(Session.User.ID);

                fuseResponse.New(Opcodes.OpcodesOut.SendFuserights);
                fuseResponse.Append <int>(2);
                fuseResponse.Append <int>(7);
                fuseResponse.Send(Session);
            }
            catch
            {
            }
        }