コード例 #1
0
        public BotConfigure(IrcBot botInstance)
        {
            bot = botInstance;

            bot.AddCommand(new Commandlet("!options", "The command !options lists all options you can set in the bot", this.GetList, this, CommandScope.Both, "engine_list_option"));
            bot.AddCommand(new Commandlet("!set", "The command !set <option> <value> sets the different options in the bot", this.SetOption, this, CommandScope.Both, "engine_set_option"));
            bot.AddCommand(new Commandlet("!get", "The command !get <option> shows the set value in the bot", this.GetOption, this, CommandScope.Both, "engine_get_option"));

            options = new Dictionary<string, BotOption>();
        }
コード例 #2
0
        public BotConfigure(IrcBot botInstance)
        {
            bot = botInstance;

            bot.AddCommand(new Commandlet("!options", "The command !options lists all options you can set in the bot", this.GetList, this, CommandScope.Both, "engine_list_option"));
            bot.AddCommand(new Commandlet("!set", "The command !set <option> <value> sets the different options in the bot", this.SetOption, this, CommandScope.Both, "engine_set_option"));
            bot.AddCommand(new Commandlet("!get", "The command !get <option> shows the set value in the bot", this.GetOption, this, CommandScope.Both, "engine_get_option"));

            options = new Dictionary <string, BotOption>();
        }
コード例 #3
0
        public void Init()
        {
            bot.AddCommand(new Commandlet("!+access", "!+access <id or" + GroupPrefix + "group> <access_string> adds the privilge to use <access_string> to user <nick>.", AccessHandler, this, CommandScope.Both, "acl_add"));
            bot.AddCommand(new Commandlet("!-access", "!-access <id or" + GroupPrefix + "group> <access_string> removes the privilge to use <access_string> from user <nick>.", AccessHandler, this, CommandScope.Both, "acl_remove"));
            bot.AddCommand(new Commandlet("!access", "!access lists all access_strings, which can be used to access restricted functions, they are not the same as commands. !access <id|nick|group> lists all access strings he owns by himself or inherited through a group", ListRestricted, this, CommandScope.Both));

            bot.AddCommand(new Commandlet("!groups", "!groups lists all currently active groups.", ListGroups, this, CommandScope.Both));
            bot.AddCommand(new Commandlet("!users", "!users <group> lists all currently active users in group <group>.", ListUsers, this, CommandScope.Both));
            bot.AddCommand(new Commandlet("!id", "!id shows all my current identifactions. !id <nick> shows their ids.", IDDelegate, this, CommandScope.Both));

            bot.AddCommand(new Commandlet("!+group", "!+group <group> adds the new empty group <group>.", GroupHandler, this, CommandScope.Both, "group_add"));
            bot.AddCommand(new Commandlet("!-group", "!-group <group> drops the group, all members will be lost.", GroupHandler, this, CommandScope.Both, "group_remove"));
            bot.AddCommand(new Commandlet("!+user", "!+user <group> <user> adds the user <user> to the group <group>.", GroupHandler, this, CommandScope.Both, "group_add_user"));
            bot.AddCommand(new Commandlet("!-user", "!-user <group> <user> removes the user <user> from the group <group>.", GroupHandler, this, CommandScope.Both, "group_remove_user"));

            // Get users and their accessstrings

            foreach (var entry in bot.MainBotData.AclEntries)
            {
                if (!accessList.ContainsKey(entry.Identity))
                {
                    accessList.Add(entry.Identity, new List <string>());
                }
                accessList[entry.Identity].Add(entry.AccessString);
            }


            // Get Groups and Users
            foreach (var aclGroup in bot.MainBotData.AclGroups)
            {
                if (!groups.ContainsKey(aclGroup.GroupName))
                {
                    groups.Add(aclGroup.GroupName, new List <string>());
                }
                groups[aclGroup.GroupName].Add(aclGroup.GroupID);
            }
        }
コード例 #4
0
 public PasswordIdentify(IrcBot bot)
     : base(bot)
 {
     bot.AddCommand(new Commandlet("!identify", "You can identify your nick with the !identify <pass> command", PassHandler, this, CommandScope.Both));
 }
コード例 #5
0
 public PasswordIdentify(IrcBot bot)
     : base(bot)
 {
     bot.AddCommand(new Commandlet("!identify", "You can identify your nick with the !identify <pass> command", PassHandler, this, CommandScope.Both));
 }