Example #1
0
 public function modload()
 {
     modules::init_module('cs_levels', self::MOD_VERSION, self::MOD_AUTHOR, 'chanserv', 'default');
     // these are standard in module constructors
     chanserv::add_help('cs_levels', 'help', &chanserv::$help->CS_HELP_LEVELS_1);
     // add the help
     if (ircd::$halfop) {
         chanserv::add_help('cs_levels', 'help levels', &chanserv::$help->CS_HELP_LEVELS_ALL);
     } else {
         chanserv::add_help('cs_levels', 'help levels', &chanserv::$help->CS_HELP_LEVELS_ALL2);
     }
     // if we have halfop enabled the help we add is different.
     chanserv::add_command('levels', 'cs_levels', 'levels_command');
     // add the command
     self::$flags = '+-kvhoaqsrftFb';
     // string of valid flags
     if (!ircd::$halfop) {
         self::$flags = str_replace('h', '', self::$flags);
     }
     // if halfop isnt enabled, remove h and H
     if (!ircd::$protect) {
         self::$flags = str_replace('a', '', self::$flags);
     }
     // same for protect
     if (!ircd::$owner) {
         self::$flags = str_replace('q', '', self::$flags);
     }
     // and finally, owner
 }
Example #2
0
 public function modload()
 {
     modules::init_module('cs_drop', self::MOD_VERSION, self::MOD_AUTHOR, 'chanserv', 'default');
     // these are standard in module constructors
     chanserv::add_help('cs_drop', 'help', &chanserv::$help->CS_HELP_DROP_1);
     chanserv::add_help('cs_drop', 'help drop', &chanserv::$help->CS_HELP_DROP_ALL);
     // add the help
     chanserv::add_command('drop', 'cs_drop', 'drop_command');
     // add the drop command
 }
Example #3
0
 public function modload()
 {
     modules::init_module('cs_register', self::MOD_VERSION, self::MOD_AUTHOR, 'chanserv', 'default');
     // these are standard in module constructors
     chanserv::add_help('cs_register', 'help', &chanserv::$help->CS_HELP_REGISTER_1);
     chanserv::add_help('cs_register', 'help register', &chanserv::$help->CS_HELP_REGISTER_ALL);
     // add the help
     chanserv::add_command('register', 'cs_register', 'register_command');
     // add the command
 }
Example #4
0
 public function modload()
 {
     modules::init_module('cs_topic', self::MOD_VERSION, self::MOD_AUTHOR, 'chanserv', 'default');
     // these are standard in module constructors
     chanserv::add_help('cs_topic', 'help commands', &chanserv::$help->CS_HELP_TOPIC_1);
     chanserv::add_help('cs_topic', 'help topic', &chanserv::$help->CS_HELP_TOPIC_ALL);
     // add the help
     chanserv::add_command('topic', 'cs_topic', 'topic_command');
     // add the commands
 }
Example #5
0
 public function modload()
 {
     modules::init_module('cs_list', self::MOD_VERSION, self::MOD_AUTHOR, 'chanserv', 'default');
     // these are standard in module constructors
     chanserv::add_help('cs_list', 'help', &chanserv::$help->CS_HELP_LIST_1, true);
     chanserv::add_help('cs_list', 'help list', &chanserv::$help->CS_HELP_LIST_ALL, true);
     // add the help
     chanserv::add_command('list', 'cs_list', 'list_command');
     // add the list command
 }
Example #6
0
 public function modload()
 {
     modules::init_module('cs_flags', self::MOD_VERSION, self::MOD_AUTHOR, 'chanserv', 'default');
     // these are standard in module constructors
     chanserv::add_help('cs_flags', 'help', &chanserv::$help->CS_HELP_FLAGS_1);
     chanserv::add_help('cs_flags', 'help flags', &chanserv::$help->CS_HELP_FLAGS_ALL);
     // add the help
     chanserv::add_command('flags', 'cs_flags', 'flags_command');
     // add the command
     self::$flags = '+-duewmtSFGTKLI';
     self::$p_flags = 'duewmt';
     // flags WITH parameters
 }
Example #7
0
 public function modload()
 {
     modules::init_module('cs_suspend', self::MOD_VERSION, self::MOD_AUTHOR, 'chanserv', 'default');
     // these are standard in module constructors
     chanserv::add_help('cs_suspend', 'help', &chanserv::$help->CS_HELP_SUSPEND_1, true);
     chanserv::add_help('cs_suspend', 'help', &chanserv::$help->CS_HELP_UNSUSPEND_1, true);
     chanserv::add_help('cs_suspend', 'help suspend', &chanserv::$help->CS_HELP_SUSPEND_ALL, true);
     chanserv::add_help('cs_suspend', 'help unsuspend', &chanserv::$help->CS_HELP_UNSUSPEND_ALL, true);
     // add the help
     chanserv::add_command('suspend', 'cs_suspend', 'suspend_command');
     chanserv::add_command('unsuspend', 'cs_suspend', 'unsuspend_command');
     // add the commands
 }
Example #8
0
 public function modload()
 {
     modules::init_module('cs_xcommands', self::MOD_VERSION, self::MOD_AUTHOR, 'chanserv', 'default');
     // these are standard in module constructors
     chanserv::add_help_fix('cs_xcommands', 'prefix', 'help commands', &chanserv::$help->CS_XCOMMANDS_PREFIX);
     chanserv::add_help_fix('cs_xcommands', 'suffix', 'help commands', &chanserv::$help->CS_XCOMMANDS_SUFFIX);
     chanserv::add_help('cs_xcommands', 'help', &chanserv::$help->CS_HELP_XCOMMANDS_1);
     chanserv::add_help('cs_xcommands', 'help', &chanserv::$help->CS_HELP_CLEAR_1);
     // clear command
     chanserv::add_help('cs_xcommands', 'help commands', &chanserv::$help->CS_HELP_KICK_1);
     chanserv::add_help('cs_xcommands', 'help commands', &chanserv::$help->CS_HELP_KICKBAN_1);
     chanserv::add_help('cs_xcommands', 'help commands', &chanserv::$help->CS_HELP_BAN_1);
     chanserv::add_help('cs_xcommands', 'help commands', &chanserv::$help->CS_HELP_UNBAN_1);
     // add them to the "help commands" category
     chanserv::add_help('cs_xcommands', 'help clear', &chanserv::$help->CS_HELP_CLEAR_ALL);
     // clear command
     chanserv::add_help('cs_xcommands', 'help kick', &chanserv::$help->CS_HELP_KICK_ALL);
     chanserv::add_help('cs_xcommands', 'help kickban', &chanserv::$help->CS_HELP_KICK_ALL);
     chanserv::add_help('cs_xcommands', 'help ban', &chanserv::$help->CS_HELP_BAN_ALL);
     chanserv::add_help('cs_xcommands', 'help unban', &chanserv::$help->CS_HELP_BAN_ALL);
     // and add their seperate help docs
     if (ircd::$owner) {
         chanserv::add_help('cs_xcommands', 'help commands', &chanserv::$help->CS_HELP_OWNER_1);
         chanserv::add_help('cs_xcommands', 'help commands', &chanserv::$help->CS_HELP_DEOWNER_1);
         chanserv::add_help('cs_xcommands', 'help owner', &chanserv::$help->CS_HELP_XCOMMANDS_OWNER);
         chanserv::add_help('cs_xcommands', 'help deowner', &chanserv::$help->CS_HELP_XCOMMANDS_OWNER);
     }
     // add help for owner commands
     if (ircd::$protect) {
         chanserv::add_help('cs_xcommands', 'help commands', &chanserv::$help->CS_HELP_PROTECT_1);
         chanserv::add_help('cs_xcommands', 'help commands', &chanserv::$help->CS_HELP_DEPROTECT_1);
         chanserv::add_help('cs_xcommands', 'help protect', &chanserv::$help->CS_HELP_XCOMMANDS_PROTECT);
         chanserv::add_help('cs_xcommands', 'help deprotect', &chanserv::$help->CS_HELP_XCOMMANDS_PROTECT);
     }
     // add help for protect commands
     chanserv::add_help('cs_xcommands', 'help commands', &chanserv::$help->CS_HELP_OP_1);
     chanserv::add_help('cs_xcommands', 'help commands', &chanserv::$help->CS_HELP_DEOP_1);
     chanserv::add_help('cs_xcommands', 'help op', &chanserv::$help->CS_HELP_XCOMMANDS_OP);
     chanserv::add_help('cs_xcommands', 'help deop', &chanserv::$help->CS_HELP_XCOMMANDS_OP);
     // now op
     if (ircd::$halfop) {
         chanserv::add_help('cs_xcommands', 'help commands', &chanserv::$help->CS_HELP_HALFOP_1);
         chanserv::add_help('cs_xcommands', 'help commands', &chanserv::$help->CS_HELP_DEHALFOP_1);
         chanserv::add_help('cs_xcommands', 'help halfop', &chanserv::$help->CS_HELP_XCOMMANDS_HALFOP);
         chanserv::add_help('cs_xcommands', 'help dehalfop', &chanserv::$help->CS_HELP_XCOMMANDS_HALFOP);
     }
     // halfop
     chanserv::add_help('cs_xcommands', 'help commands', &chanserv::$help->CS_HELP_VOICE_1);
     chanserv::add_help('cs_xcommands', 'help commands', &chanserv::$help->CS_HELP_DEVOICE_1);
     chanserv::add_help('cs_xcommands', 'help voice', &chanserv::$help->CS_HELP_XCOMMANDS_VOICE);
     chanserv::add_help('cs_xcommands', 'help devoice', &chanserv::$help->CS_HELP_XCOMMANDS_VOICE);
     chanserv::add_help('cs_xcommands', 'help commands', &chanserv::$help->CS_HELP_MODE_1);
     chanserv::add_help('cs_xcommands', 'help mode', &chanserv::$help->CS_HELP_MODE_ALL);
     chanserv::add_help('cs_xcommands', 'help commands', &chanserv::$help->CS_HELP_SYNC_1);
     chanserv::add_help('cs_xcommands', 'help sync', &chanserv::$help->CS_HELP_SYNC_ALL);
     // voice and mode & sync
     chanserv::add_help('cs_xcommands', 'help commands', &chanserv::$help->CS_HELP_TYPEMASK_1);
     chanserv::add_help('cs_xcommands', 'help typemask', &chanserv::$help->CS_HELP_TYPEMASK_ALL);
     // typemask
     chanserv::add_command('clear', 'cs_xcommands', 'clear_command');
     // clear command
     chanserv::add_command('kick', 'cs_xcommands', 'kick_command');
     chanserv::add_command('kickban', 'cs_xcommands', 'kickban_command');
     chanserv::add_command('ban', 'cs_xcommands', 'ban_command');
     chanserv::add_command('unban', 'cs_xcommands', 'unban_command');
     // add the commands for kick/bans etc
     if (ircd::$owner) {
         chanserv::add_command('owner', 'cs_xcommands', 'owner_command');
         chanserv::add_command('deowner', 'cs_xcommands', 'deowner_command');
     }
     // protect
     if (ircd::$protect) {
         chanserv::add_command('protect', 'cs_xcommands', 'protect_command');
         chanserv::add_command('deprotect', 'cs_xcommands', 'deprotect_command');
     }
     // protect
     chanserv::add_command('op', 'cs_xcommands', 'op_command');
     chanserv::add_command('deop', 'cs_xcommands', 'deop_command');
     // op
     if (ircd::$halfop) {
         chanserv::add_command('halfop', 'cs_xcommands', 'halfop_command');
         chanserv::add_command('dehalfop', 'cs_xcommands', 'dehalfop_command');
     }
     // halfop
     chanserv::add_command('voice', 'cs_xcommands', 'voice_command');
     chanserv::add_command('devoice', 'cs_xcommands', 'devoice_command');
     chanserv::add_command('mode', 'cs_xcommands', 'mode_command');
     chanserv::add_command('sync', 'cs_xcommands', 'sync_command');
     // and the rest, voice & mode & sync.
 }