internal void method_6(string string_0) { try { UserDataFactory @class = new UserDataFactory(string_0, this.GetConnection().String_0, true); if (this.GetConnection().String_0 == "127.0.0.1" && [email protected]) { @class = new UserDataFactory(string_0, "::1", true); } if ([email protected]) { Console.ForegroundColor = ConsoleColor.Red; string str = ""; if (ServerConfiguration.EnableSSO) { str = HabboIMEnvironment.GetExternalText("emu_sso_wrong_secure") + "(" + this.GetConnection().String_0 + ")"; } ServerMessage Message = new ServerMessage(161u); Message.AppendStringWithBreak(HabboIMEnvironment.GetExternalText("emu_sso_wrong") + str); this.GetConnection().SendMessage(Message); Console.ForegroundColor = ConsoleColor.Gray; this.method_12(); return; } Habbo class2 = Authenticator.CreateHabbo(string_0, this, @class, @class); HabboIM.GetGame().GetClientManager().method_25(class2.Id); this.Habbo = class2; this.Habbo.method_2(@class); } catch (Exception ex) { Console.WriteLine("Logging login error because you are on alpha test!"); Logging.LogException(ex.ToString()); if (this != null) { this.SendNotification(ex.ToString()); this.method_12(); } return; } try { HabboIM.GetGame().GetBanManager().method_1(this); } catch (ModerationBanException gException) { this.NotifyBan(gException.Message); this.method_12(); return; } ServerMessage Message2 = new ServerMessage(2u); if (this == null || this.GetHabbo() == null) { return; } if (this.GetHabbo().IsVIP || ServerConfiguration.HabboClubForClothes) { Message2.AppendInt32(2); } else { if (this.GetHabbo().GetSubscriptionManager().HasSubscription("habbo_club")) { Message2.AppendInt32(1); } else { Message2.AppendInt32(0); } } if (this.GetHabbo().HasFuse("acc_anyroomowner")) { Message2.AppendInt32(7); } else { if (this.GetHabbo().HasFuse("acc_anyroomrights")) { Message2.AppendInt32(5); } else { if (this.GetHabbo().HasFuse("acc_supporttool")) { Message2.AppendInt32(4); } else { if (this.GetHabbo().IsVIP || ServerConfiguration.HabboClubForClothes || this.GetHabbo().GetSubscriptionManager().HasSubscription("habbo_club")) { Message2.AppendInt32(2); } else { Message2.AppendInt32(0); } } } } this.SendMessage(Message2); this.SendMessage(this.GetHabbo().GetEffectsInventoryComponent().method_6()); ServerMessage Message3 = new ServerMessage(290u); Message3.AppendBoolean(true); Message3.AppendBoolean(false); this.SendMessage(Message3); ServerMessage Message5_ = new ServerMessage(3u); this.SendMessage(Message5_); if (this.GetHabbo().HasFuse("acc_supporttool")) { this.SendMessage(HabboIM.GetGame().GetModerationTool().method_0()); HabboIM.GetGame().GetModerationTool().method_4(this); } ServerMessage UserLogging = new ServerMessage(517u); UserLogging.AppendBoolean(true); this.SendMessage(UserLogging); if (HabboIM.GetGame().GetPixelManager().method_2(this)) { HabboIM.GetGame().GetPixelManager().method_3(this); } if (GetHabbo().Rank > 5u) { HabboIM.GetGame().GetClientManager().method_18ONLINE(GetHabbo().Username); } ServerMessage Message5 = new ServerMessage(455u); Message5.AppendUInt(this.GetHabbo().HomeRoomId); this.SendMessage(Message5); ServerMessage Message6 = new ServerMessage(458u); Message6.AppendInt32(30); Message6.AppendInt32(this.GetHabbo().list_1.Count); foreach (uint current in this.GetHabbo().list_1) { Message6.AppendUInt(current); } this.SendMessage(Message6); this.GetHabbo().CheckTotalTimeOnlineAchievements(); this.GetHabbo().CheckHappyHourAchievements(); this.GetHabbo().CheckTrueHabboAchievements(); this.GetHabbo().CheckRegularVisitorAchievements(); this.GetHabbo().CheckFootballGoalHostScoreAchievements(); this.GetHabbo().CheckStaffPicksAchievement(); try { if (HabboIM.UserAdType >= 0 && HabboIM.UserAdType <= 2 && HabboIM.UserAdMessage.Count > 0) { if (!(int.Parse(HabboIM.GetConfig().data["ads.disable"]) == 1)) { if (!(int.Parse(HabboIM.GetConfig().data["ads.allowedonlyrandomads"]) == 0)) { int random = HabboIMEnvironment.GetRandomNumber(1, 100); if (random <= 5) { if (HabboIM.UserAdType == 0) { this.SendNotification(string.Join("\r\n", HabboIM.UserAdMessage), 0); } if (HabboIM.UserAdType == 1) { this.SendNotification(string.Join("\r\n", HabboIM.UserAdMessage), 2); } else if (HabboIM.UserAdType == 2 && HabboIM.UserAdLink != "") { ServerMessage Message = new ServerMessage(161u); Message.AppendStringWithBreak(string.Concat(new string[] { " >>>>>>>>>>>>>>>>>> Ad <<<<<<<<<<<<<<<<<< ", "\r\n", string.Join("\r\n", HabboIM.UserAdMessage), })); Message.AppendStringWithBreak(HabboIM.UserAdLink); this.SendMessage(Message); } } } else { if (HabboIM.UserAdType == 0) { this.SendNotification(string.Join("\r\n", HabboIM.UserAdMessage), 0); } if (HabboIM.UserAdType == 1) { this.SendNotification(string.Join("\r\n", HabboIM.UserAdMessage), 2); } else if (HabboIM.UserAdType == 2 && HabboIM.UserAdLink != "") { ServerMessage Message = new ServerMessage(161u); Message.AppendStringWithBreak(string.Concat(new string[] { " >>>>>>>>>>>>>>>>>> Ad <<<<<<<<<<<<<<<<<< ", "\r\n", string.Join("\r\n", HabboIM.UserAdMessage), })); Message.AppendStringWithBreak(HabboIM.UserAdLink); this.SendMessage(Message); } } } } } catch { } if (ServerConfiguration.MOTD != "") { this.SendNotification(ServerConfiguration.MOTD, 2); } for (uint num = (uint)HabboIM.GetGame().GetRoleManager().method_9(); num > 1u; num -= 1u) { if (HabboIM.GetGame().GetRoleManager().method_8(num).Length > 0) { if (!this.GetHabbo().GetBadgeComponent().HasBadge(HabboIM.GetGame().GetRoleManager().method_8(num)) && this.GetHabbo().Rank == num) { this.GetHabbo().GetBadgeComponent().SendBadge(this, HabboIM.GetGame().GetRoleManager().method_8(num), true); } else { if (this.GetHabbo().GetBadgeComponent().HasBadge(HabboIM.GetGame().GetRoleManager().method_8(num)) && this.GetHabbo().Rank < num) { this.GetHabbo().GetBadgeComponent().RemoveBadge(HabboIM.GetGame().GetRoleManager().method_8(num)); } } } } if (this.GetHabbo().GetSubscriptionManager().HasSubscription("habbo_club")) { this.GetHabbo().CheckHCAchievements(); } if (this.GetHabbo().IsVIP&& !this.GetHabbo().GetBadgeComponent().HasBadge("VIP")) { this.GetHabbo().GetBadgeComponent().SendBadge(this, "VIP", true); } else { if (!this.GetHabbo().IsVIP&& this.GetHabbo().GetBadgeComponent().HasBadge("VIP")) { this.GetHabbo().GetBadgeComponent().RemoveBadge("VIP"); } } if (this.GetHabbo().CurrentQuestId > 0u) { HabboIM.GetGame().GetQuestManager().method_7(this.GetHabbo().CurrentQuestId, this); } if (!Regex.IsMatch(this.GetHabbo().Username, "^[-a-zA-Z0-9._:,]+$")) { ServerMessage Message5_2 = new ServerMessage(573u); this.SendMessage(Message5_2); } this.GetHabbo().Motto = HabboIM.FilterString(this.GetHabbo().Motto); DataTable dataTable = null; using (DatabaseClient class3 = HabboIM.GetDatabase().GetClient()) { dataTable = class3.ReadDataTable("SELECT achievement,achlevel FROM achievements_owed WHERE user = '******'"); } if (dataTable != null) { foreach (DataRow dataRow in dataTable.Rows) { HabboIM.GetGame().GetAchievementManager().addAchievement(this, (uint)dataRow["achievement"], (int)dataRow["achlevel"]); using (DatabaseClient class3 = HabboIM.GetDatabase().GetClient()) { class3.ExecuteQuery(string.Concat(new object[] { "DELETE FROM achievements_owed WHERE achievement = '", (uint)dataRow["achievement"], "' AND user = '******' LIMIT 1" })); } } } }