コード例 #1
0
ファイル: Main.cs プロジェクト: IsmaeelAkram/MahjesticAdmin
        public override EventEat OnSay3(Entity player, ChatType type, string name, ref string message)
        {
            if (!message.StartsWith("!") || type != ChatType.All)
            {
                MainLog.WriteInfo("[CHAT:" + type + "] " + player.Name + ": " + message);

                CHAT_WriteChat(player, type, message);
                return(EventEat.EatGame);
            }

            if (message.ToLowerInvariant().StartsWith("!login"))
            {
                string line = "[SPY] " + player.Name + " : !login ****";
                WriteLog.Info(line);
                MainLog.WriteInfo(line);
                CommandsLog.WriteInfo(line);
            }
            else
            {
                string line = "[SPY] " + player.Name + " : " + message;
                WriteLog.Info(line);
                MainLog.WriteInfo(line);
                CommandsLog.WriteInfo(line);
            }
            ProcessCommand(player, name, message);
            return(EventEat.EatGame);
        }
コード例 #2
0
        public DGAdmin()
            : base()
        {
            WriteLog.Info("RGAdmin is starting...");
            MainLog.WriteInfo("RGAdmin starting...");

            if (!Directory.Exists(ConfigValues.ConfigPath))
            {
                WriteLog.Info("Creating directory...");
                Directory.CreateDirectory(ConfigValues.ConfigPath);
            }

            #region MODULE LOADING
            MAIN_OnServerStart();
            CFG_OnServerStart();
            UTILS_OnServerStart();
            CMDS_OnServerStart();
            groups_OnServerStart();
            if (ConfigValues.ISNIPE_MODE)
            {
                SNIPE_OnServerStart();
            }
            PersonalPlayerDvars = UTILS_PersonalPlayerDvars_load();
            if (ConfigValues.settings_enable_chat_alias)
            {
                InitChatAlias();
            }
            if (ConfigValues.settings_enable_xlrstats)
            {
                XLR_OnServerStart();
                XLR_InitCommands();
            }
            #endregion
        }
コード例 #3
0
        public LAdmin()
            : base()
        {
            WriteLog.Info("[ES]Admin v1.0.0.6 by Musta.");
            MainLog.WriteInfo("[ES]Admin v1.0.0.6 by Musta.");

            if (!Directory.Exists(ConfigValues.ConfigPath))
            {
                WriteLog.Info("Creating directories for script.");
                Directory.CreateDirectory(ConfigValues.ConfigPath);
            }

            #region MODULE LOADING
            MAIN_OnServerStart();
            CFG_OnServerStart();
            UTILS_OnServerStart();
            CMDS_OnServerStart();
            groups_OnServerStart();
            if (ConfigValues.PROMOD)
            {
                PROMOD_OnServerStart();
            }
            if (ConfigValues.ISNIPE_MODE)
            {
                SNIPE_OnServerStart();
            }
            if (!ConfigValues.PROMOD && !ConfigValues.ISNIPE_MODE)
            {
                NORMAL_OnServerStart();
            }
            #endregion
        }
コード例 #4
0
        public DGAdmin()
            : base()
        {
            WriteLog.Info("RGAdmin is starting...");
            MainLog.WriteInfo("RGAdmin starting...");

            if (!Directory.Exists(ConfigValues.ConfigPath))
            {
                WriteLog.Info("Creating directory...");
                Directory.CreateDirectory(ConfigValues.ConfigPath);
            }

            #region MODULE LOADING
            MAIN_OnServerStart();
            CFG_OnServerStart();
            UTILS_OnServerStart();
            CMDS_OnServerStart();
            groups_OnServerStart();
            if (ConfigValues.ISNIPE_MODE)
            {
                WriteLog.Debug("Initializing iSnipe mode...");
                SNIPE_OnServerStart();
            }
            WriteLog.Debug("Initializing PersonalPlayerDvars...");
            PersonalPlayerDvars = UTILS_PersonalPlayerDvars_load();
            if (ConfigValues.settings_enable_chat_alias)
            {
                WriteLog.Debug("Initializing Chat aliases...");
                InitChatAlias();
            }
            if (ConfigValues.settings_enable_alive_counter)
            {
                PlayerConnected += hud_alive_players;
            }
            if (ConfigValues.settings_enable_xlrstats)
            {
                WriteLog.Debug("Initializing XLRStats...");
                XLR_OnServerStart();
                XLR_InitCommands();
            }

            if (ConfigValues.settings_servertitle)
            {
                AfterDelay(1000, () => {
                    if (ConfigValues.LockServer)
                    {
                        UTILS_ServerTitle("^1::LOCKED", "^1" + File.ReadAllText(ConfigValues.ConfigPath + @"Utils\internal\LOCKSERVER"));
                    }
                    else
                    {
                        UTILS_ServerTitle_MapFormat();
                    }
                });
            }
            #endregion
        }
コード例 #5
0
        public DGAdmin()
            : base()
        {
            WriteLog.Info("RGAdmin is starting...");
            MainLog.WriteInfo("RGAdmin starting...");

            if (!Directory.Exists(ConfigValues.ConfigPath))
            {
                WriteLog.Info("Creating directory...");
                Directory.CreateDirectory(ConfigValues.ConfigPath);
            }

            #region MODULE LOADING
            MAIN_OnServerStart();
            CFG_OnServerStart();
            UTILS_OnServerStart();
            CMDS_OnServerStart();
            groups_OnServerStart();
            if (ConfigValues.ISNIPE_MODE)
            {
                SNIPE_OnServerStart();
            }
            #endregion
        }
コード例 #6
0
ファイル: Main.cs プロジェクト: IsmaeelAkram/MahjesticAdmin
        public DGAdmin()
            : base()
        {
            WriteLog.Info("DGAdmin#IS1.5 is starting...");
            MainLog.WriteInfo("DGAdmin#IS1.5 starting...");

            if (!Directory.Exists(ConfigValues.ConfigPath))
            {
                WriteLog.Info("Creating directory...");
                Directory.CreateDirectory(ConfigValues.ConfigPath);
            }

            #region MODULE LOADING
            MAIN_OnServerStart();
            CFG_OnServerStart();
            groups_OnServerStart();

            UTILS_OnServerStart();
            CMDS_OnServerStart();

            SetupKnife();

            WriteLog.Debug("Initializing PersonalPlayerDvars...");
            PersonalPlayerDvars = UTILS_PersonalPlayerDvars_load();

            if (ConfigValues.settings_dynamic_properties)
            {
                Delay(400, () =>
                {
                    CFG_Dynprop_Apply();
                });
            }
            else
            {
                if (ConfigValues.ANTIWEAPONHACK)
                {
                    WriteLog.Info("You have to enable \"settings_dynamic_properties\" if you wish to use antiweaponhack");
                }

                if (ConfigValues.settings_servertitle)
                {
                    WriteLog.Info("You have to enable \"settings_dynamic_properties\" if you wish to use \"Server Title\"");
                }

                if (ConfigValues.ISNIPE_MODE)
                {
                    WriteLog.Debug("Initializing iSnipe mode...");
                    SNIPE_OnServerStart();
                }

                if (ConfigValues.settings_enable_xlrstats)
                {
                    WriteLog.Debug("Initializing XLRStats...");
                    XLR_OnServerStart();
                    XLR_InitCommands();
                }

                if (ConfigValues.settings_enable_alive_counter)
                {
                    PlayerConnected += hud_alive_players;
                }

                if (ConfigValues.settings_enable_chat_alias)
                {
                    WriteLog.Debug("Initializing Chat aliases...");
                    InitChatAlias();
                }

                if (ConfigValues.ISNIPE_MODE && ConfigValues.ISNIPE_SETTINGS.ANTIKNIFE)
                {
                    DisableKnife();
                }
                else
                {
                    EnableKnife();
                }

                GSCFunctions.SetDvarIfUninitialized("unlimited_ammo", "2");

                if (ConfigValues.settings_unlimited_ammo || (UTILS_GetDvar("unlimited_ammo") == "1"))
                {
                    WriteLog.Debug("Initializing Unlimited Ammo...");
                    UTILS_UnlimitedAmmo();
                }

                timed_messages_init();
            }
            #endregion
        }