コード例 #1
0
        internal static void LoadPlayerLists()
        {
            agreed     = PlayerList.Load("ranks/agreed.txt");
            invalidIds = PlayerList.Load("extra/invalidids.txt");
            Player.Console.DatabaseID = NameConverter.InvalidNameID("(console)");

            bannedIP       = PlayerList.Load("ranks/banned-ip.txt");
            ircControllers = PlayerList.Load("ranks/IRC_Controllers.txt");
            hidden         = PlayerList.Load("ranks/hidden.txt");
            vip            = PlayerList.Load("text/vip.txt");
            noEmotes       = PlayerList.Load("text/emotelist.txt");
            lockdown       = PlayerList.Load("text/lockdown.txt");

            models      = PlayerExtList.Load("extra/models.txt");
            skins       = PlayerExtList.Load("extra/skins.txt");
            reach       = PlayerExtList.Load("extra/reach.txt");
            rotations   = PlayerExtList.Load("extra/rotations.txt");
            modelScales = PlayerExtList.Load("extra/modelscales.txt");

            muted     = PlayerExtList.Load("ranks/muted.txt");
            frozen    = PlayerExtList.Load("ranks/frozen.txt");
            tempRanks = PlayerExtList.Load(Paths.TempRanksFile);
            tempBans  = PlayerExtList.Load(Paths.TempBansFile);

            if (Server.Config.WhitelistedOnly)
            {
                whiteList = PlayerList.Load("ranks/whitelist.txt");
            }
        }
コード例 #2
0
        internal static void Create(Player p)
        {
            p.prefix     = "";
            p.time       = new TimeSpan(0, 0, 0, 1);
            p.title      = "";
            p.titlecolor = "";
            p.color      = p.group.color;
            p.money      = 0;

            p.firstLogin    = DateTime.Now;
            p.totalLogins   = 1;
            p.totalKicked   = 0;
            p.overallDeath  = 0;
            p.overallBlocks = 0;
            p.TotalDrawn    = 0;
            string now = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");

            Database.Backend.AddRow("Players", "Name, IP, FirstLogin, LastLogin, totalLogin, Title, " +
                                    "totalDeaths, Money, totalBlocks, totalKicked, TimeSpent",
                                    p.name, p.ip, now, now, 1, "", 0, 0, 0, 0, p.time.ToDBTime());

            using (DataTable ids = Database.Backend.GetRows("Players",
                                                            "ID", "WHERE Name = @0", p.name)) {
                if (ids.Rows.Count > 0)
                {
                    string id = ids.Rows[0]["ID"].ToString();
                    p.UserID = PlayerData.ParseInt(id);
                }
                else
                {
                    p.UserID = NameConverter.InvalidNameID(p.name);
                }
            }
        }
コード例 #3
0
ファイル: RelayBot.cs プロジェクト: UnknownShadow200/MCGalaxy
            public RelayPlayer(string channel, RelayUser user, RelayBot bot) : base(bot.RelayName)
            {
                group = bot.GetControllerRank();

                ChannelID = channel;
                User      = user;
                color     = "&a";
                Bot       = bot;

                if (user != null)
                {
                    string nick = "(" + bot.RelayName + " " + user.Nick + ")";
                    DatabaseID = NameConverter.InvalidNameID(nick);
                }
                SuperName = bot.RelayName;
            }
コード例 #4
0
ファイル: IRCBot.cs プロジェクト: Benedani/MCGalaxy
        static Player MakeIRCPlayer(string ircNick, string userNick)
        {
            Player p = new Player("IRC");

            p.group = Group.findPerm(Server.ircControllerRank);
            if (p.group == null)
            {
                p.group = Group.findPerm(LevelPermission.Nobody);
            }

            p.ircNick = ircNick;
            p.color   = "&a";
            if (userNick != null)
            {
                p.UserID = NameConverter.InvalidNameID("(IRC " + userNick + ")");
            }
            return(p);
        }
コード例 #5
0
            public IRCPlayer(string ircChannel, string ircNick, IRCBot bot) : base("IRC")
            {
                group = Group.Find(ServerConfig.IRCControllerRank);
                if (group == null)
                {
                    group = Group.NobodyRank;
                }

                IRCChannel = ircChannel;
                IRCNick    = ircNick;
                color      = "&a";
                Bot        = bot;

                if (ircNick != null)
                {
                    DatabaseID = NameConverter.InvalidNameID("(IRC " + ircNick + ")");
                }
            }
コード例 #6
0
            public RelayPlayer(string channel, RelayUser user, RelayBot bot) : base(bot.RelayName)
            {
                group = Group.Find(Server.Config.IRCControllerRank);
                if (group == null)
                {
                    group = Group.NobodyRank;
                }

                ChannelID = channel;
                User      = user;
                color     = "&a";
                Bot       = bot;

                if (user != null)
                {
                    string nick = "(" + bot.RelayName + user.Nick + ")";
                    DatabaseID = NameConverter.InvalidNameID(nick);
                }
                SuperName = bot.RelayName;
            }
コード例 #7
0
ファイル: CmdUndoPlayer.cs プロジェクト: ProtheanGod/KingMC
 public ConsolePlayer() : base("(console)")
 {
     group      = Group.NobodyRank;
     DatabaseID = NameConverter.InvalidNameID("(console)");
 }