void CompleteLoginProcess() { LevelPermission adminChatRank = CommandOtherPerms.FindPerm("adminchat", LevelPermission.Admin); SendUserMOTD(); SendMap(null); if (disconnected) { return; } loggedIn = true; PlayerInfo.Online.Add(this); connections.Remove(this); RemoveFromPending(); Server.s.PlayerListUpdate(); //OpenClassic Client Check SendBlockchange(0, 0, 0, 0); timeLogged = DateTime.Now; lastLogin = DateTime.Now; time = new TimeSpan(0, 0, 0, 1); DataTable playerDb = Database.Backend.GetRows("Players", "*", "WHERE Name=@0", name); if (playerDb.Rows.Count == 0) { InitPlayerStats(playerDb); } else { LoadPlayerStats(playerDb); } Server.Background.QueueOnce(ShowAltsTask, name, TimeSpan.Zero); CheckState(); ZombieStats stats = Server.zombie.LoadZombieStats(name); Game.MaxInfected = stats.MaxInfected; Game.TotalInfected = stats.TotalInfected; Game.MaxRoundsSurvived = stats.MaxRounds; Game.TotalRoundsSurvived = stats.TotalRounds; if (!Directory.Exists("players")) { Directory.CreateDirectory("players"); } PlayerDB.Load(this); Game.Team = Team.FindTeam(this); SetPrefix(); playerDb.Dispose(); LoadCpeData(); if (Server.verifyadmins && group.Permission >= Server.verifyadminsrank) { adminpen = true; } if (Server.noEmotes.Contains(name)) { parseEmotes = !Server.parseSmiley; } hidden = group.CanExecute("hide") && Server.hidden.Contains(name); if (hidden) { SendMessage("&8Reminder: You are still hidden."); } if (group.Permission >= adminChatRank && Server.adminsjoinsilent) { hidden = true; adminchat = true; } if (PlayerConnect != null) { PlayerConnect(this); } OnPlayerConnectEvent.Call(this); if (cancellogin) { cancellogin = false; return; } string joinm = "&a+ " + FullName + " %S" + PlayerDB.GetLoginMessage(this); if (hidden) { joinm = "&8(hidden)" + joinm; } const LevelPermission perm = LevelPermission.Guest; if (group.Permission > perm || (Server.guestJoinNotify && group.Permission <= perm)) { Player[] players = PlayerInfo.Online.Items; foreach (Player pl in players) { if (Entities.CanSee(pl, this)) { Player.Message(pl, joinm); } } } if (Server.agreetorulesonentry && group.Permission == LevelPermission.Guest && !Server.agreed.Contains(name)) { SendMessage("&9You must read the &c/rules&9 and &c/agree&9 to them before you can build and use commands!"); agreed = false; } if (Server.verifyadmins && group.Permission >= Server.verifyadminsrank) { if (!Directory.Exists("extra/passwords") || !File.Exists("extra/passwords/" + name + ".dat")) { SendMessage("&cPlease set your admin verification password with &a/setpass [Password]!"); } else { SendMessage("&cPlease complete admin verification with &a/pass [Password]!"); } } Server.s.Log(name + " [" + ip + "] has joined the server."); Game.InfectMessages = PlayerDB.GetInfectMessages(this); Server.zombie.PlayerJoinedServer(this); ushort x = (ushort)(level.spawnx * 32 + 16); ushort y = (ushort)(level.spawny * 32 + 32); ushort z = (ushort)(level.spawnz * 32 + 16); pos = new ushort[3] { x, y, z }; rot = new byte[2] { level.rotx, level.roty }; Entities.SpawnEntities(this, x, y, z, rot[0], rot[1]); PlayerActions.CheckGamesJoin(this, null); Loading = false; }