Esempio n. 1
0
/**
 * Create the command, and tell anope about it.
 * @param argc Argument count
 * @param argv Argument list
 * @return MOD_CONT to allow the module, MOD_STOP to stop it
 **/
int AnopeInit(int argc, char **argv)
{
    Command *c;
    EvtHook *hook;

    moduleAddAuthor("Anope");
    moduleAddVersion(VERSION_STRING);
    moduleSetType(CORE);

    /** 
     * For some unknown reason, do_opernews is actaully defined in news.c
     * we can look at moving it here later
     **/
    c = createCommand("OPERNEWS", do_opernews, is_services_admin,
                      NEWS_HELP_OPER, -1, -1, -1, -1);
    c->help_param1 = (char *) (long) NewsCount;
    moduleAddCommand(OPERSERV, c, MOD_UNIQUE);

    moduleSetOperHelp(myOperServHelp);

    hook = createEventHook(EVENT_RELOAD, reload_config);
    if (moduleAddEventHook(hook) != MOD_ERR_OK) {
        alog("[\002os_opernews\002] Can't hook to EVENT_RELOAD event");
        return MOD_STOP;
    }

    return MOD_CONT;
}
Esempio n. 2
0
int AnopeInit(int argc, char **argv)
{
	moduleAddAuthor("Adam");
	moduleAddVersion("1.0");

	Command *c = createCommand("ROOT", do_root, is_services_root, -1, -1, -1, -1, -1);
	moduleAddCommand(OPERSERV, c, MOD_HEAD);
	moduleAddRootHelp(c, os_help_root);
	moduleSetOperHelp(os_help);

	return MOD_CONT;
}
Esempio n. 3
0
int AnopeInit(int argc, char **argv) {
        Command *c;
        c = createCommand("QAKILL", do_qakill_some_lameass, is_services_admin,-1,-1,-1,-1,-1);
        alog("Loading module os_qakill.so [Status: %d]", moduleAddCommand(OPERSERV,c,MOD_HEAD));
	moduleAddHelp(c,SGR_Module_Help_OPERSERV_QAKILL_FULL);
        moduleSetOperHelp(SGR_Module_Help_OPERSERV_QAKILL);
        alog("[os_qakill] New command: /msg operserv QAKILL [nick] [reason]");
        alog("[os_qakill] For information see: /msg operserv HELP QAKILL");
        alog("[os_qakill] Yayness!(tm) - MODULE LOADED AND ACTIVE");
        moduleAddAuthor(AUTHOR);
        moduleAddVersion(VERSION);
        return MOD_CONT; 
}
Esempio n. 4
0
/**
 * Create the command, and tell anope about it.
 * @param argc Argument count
 * @param argv Argument list
 * @return MOD_CONT to allow the module, MOD_STOP to stop it
 **/
int AnopeInit(int argc, char **argv)
{
    Command *c;

    moduleAddAuthor("Anope");
    moduleAddVersion("$Id: os_restart.c 1048 2006-06-13 12:37:17Z geniusdex $");
    moduleSetType(CORE);
    c = createCommand("RESTART", do_restart, is_services_admin,
                      OPER_HELP_RESTART, -1, -1, -1, -1);
    moduleAddCommand(OPERSERV, c, MOD_UNIQUE);

    moduleSetOperHelp(myOperServHelp);

    return MOD_CONT;
}
Esempio n. 5
0
/**
 * Create the command, and tell anope about it.
 * @param argc Argument count
 * @param argv Argument list
 * @return MOD_CONT to allow the module, MOD_STOP to stop it
 **/
int AnopeInit(int argc, char **argv)
{
    Command *c;

    moduleAddAuthor("Anope");
    moduleAddVersion
        (VERSION_STRING);
    moduleSetType(CORE);
    c = createCommand("AKILL", do_akill, is_services_oper, OPER_HELP_AKILL,
                      -1, -1, -1, -1);
    moduleAddCommand(OPERSERV, c, MOD_UNIQUE);

    moduleSetOperHelp(myOperServHelp);

    return MOD_CONT;
}
Esempio n. 6
0
/**
 * Create the command, and tell anope about it.
 * @param argc Argument count
 * @param argv Argument list
 * @return MOD_CONT to allow the module, MOD_STOP to stop it
 **/
int AnopeInit(int argc, char **argv)
{
    Command *c;

    moduleAddAuthor("Anope");
    moduleAddVersion("$Id: os_global.c 1270 2007-08-27 03:23:06Z drstein $");
    moduleSetType(CORE);

    c = createCommand("GLOBAL", do_global, is_services_admin,
                      OPER_HELP_GLOBAL, -1, -1, -1, -1);
    c->help_param1 = s_GlobalNoticer;
    moduleAddCommand(OPERSERV, c, MOD_UNIQUE);
    moduleSetOperHelp(myOperServHelp);

    return MOD_CONT;
}
Esempio n. 7
0
/**
 * Create the command, and tell anope about it.
 * @param argc Argument count
 * @param argv Argument list
 * @return MOD_CONT to allow the module, MOD_STOP to stop it
 **/
int AnopeInit(int argc, char **argv)
{
    Command *c;

    moduleAddAuthor("Anope");
    moduleAddVersion(VERSION_STRING);
    moduleSetType(CORE);

    c = createCommand("USERLIST", do_userlist, NULL,
                      OPER_HELP_USERLIST, -1, -1, -1, -1);
    moduleAddCommand(OPERSERV, c, MOD_UNIQUE);

    moduleSetOperHelp(myOperServHelp);

    return MOD_CONT;
}
Esempio n. 8
0
/**
 * Create the command, and tell anope about it.
 * @param argc Argument count
 * @param argv Argument list
 * @return MOD_CONT to allow the module, MOD_STOP to stop it
 **/
int AnopeInit(int argc, char **argv)
{
    Command *c;

    moduleAddAuthor("Anope");
    moduleAddVersion("$Id: os_userlist.c 1265 2007-08-26 15:33:06Z geniusdex $");
    moduleSetType(CORE);

    c = createCommand("USERLIST", do_userlist, NULL,
                      OPER_HELP_USERLIST, -1, -1, -1, -1);
    moduleAddCommand(OPERSERV, c, MOD_UNIQUE);

    moduleSetOperHelp(myOperServHelp);

    return MOD_CONT;
}
Esempio n. 9
0
/**
 * Create the command, and tell anope about it.
 * @param argc Argument count
 * @param argv Argument list
 * @return MOD_CONT to allow the module, MOD_STOP to stop it
 **/
int AnopeInit(int argc, char **argv)
{
    Command *c;

    moduleAddAuthor("Anope");
    moduleAddVersion("$Id: os_kick.c 1265 2007-08-26 15:33:06Z geniusdex $");
    moduleSetType(CORE);

    c = createCommand("KICK", do_os_kick, is_services_oper, OPER_HELP_KICK,
                      -1, -1, -1, -1);
    moduleAddCommand(OPERSERV, c, MOD_UNIQUE);

    moduleSetOperHelp(myOperServHelp);

    return MOD_CONT;
}
Esempio n. 10
0
/**
 * Create the command, and tell anope about it.
 * @param argc Argument count
 * @param argv Argument list
 * @return MOD_CONT to allow the module, MOD_STOP to stop it
 **/
int AnopeInit(int argc, char **argv)
{
    Command *c;

    moduleAddAuthor("Anope");
    moduleAddVersion("$Id: os_admin.c 953 2006-01-14 11:36:29Z certus $");
    moduleSetType(CORE);

    c = createCommand("ADMIN", do_admin, is_oper, OPER_HELP_ADMIN, -1, -1,
                      -1, -1);
    moduleAddCommand(OPERSERV, c, MOD_UNIQUE);

    moduleSetOperHelp(myOperServHelp);

    return MOD_CONT;
}
Esempio n. 11
0
/**
 * Create the command, and tell anope about it.
 * @param argc Argument count
 * @param argv Argument list
 * @return MOD_CONT to allow the module, MOD_STOP to stop it
 **/
int AnopeInit(int argc, char **argv)
{
    Command *c;

    moduleAddAuthor("Anope");
    moduleAddVersion
        ("$Id: os_modload.c 1301 2007-09-06 00:16:31Z drstein $");
    moduleSetType(CORE);

    c = createCommand("MODLOAD", do_modload, is_services_root, -1, -1, -1,
                      -1, OPER_HELP_MODLOAD);
    moduleAddCommand(OPERSERV, c, MOD_UNIQUE);

    moduleSetOperHelp(myOperServHelp);

    return MOD_CONT;
}
Esempio n. 12
0
/**
 * Create the command, and tell anope about it.
 * @param argc Argument count
 * @param argv Argument list
 * @return MOD_CONT to allow the module, MOD_STOP to stop it
 **/
int AnopeInit(int argc, char **argv)
{
    Command *c;

    moduleAddAuthor("Anope");
    moduleAddVersion
        ("$Id: os_chankill.c 1265 2007-08-26 15:33:06Z geniusdex $");
    moduleSetType(CORE);

    c = createCommand("CHANKILL", do_chankill, is_services_admin,
                      OPER_HELP_CHANKILL, -1, -1, -1, -1);
    moduleAddCommand(OPERSERV, c, MOD_UNIQUE);

    moduleSetOperHelp(myOperServHelp);

    return MOD_CONT;
}
Esempio n. 13
0
/**
 * Create the command, and tell anope about it.
 * @param argc Argument count
 * @param argv Argument list
 * @return MOD_CONT to allow the module, MOD_STOP to stop it
 **/
int AnopeInit(int argc, char **argv)
{
    Command *c;

    moduleAddAuthor("Anope");
    moduleAddVersion("$Id: os_oline.c 1265 2007-08-26 15:33:06Z geniusdex $");
    moduleSetType(CORE);

    c = createCommand("OLINE", do_operoline, is_services_admin,
                      OPER_HELP_OLINE, -1, -1, -1, -1);
    moduleAddCommand(OPERSERV, c, MOD_UNIQUE);

    moduleSetOperHelp(myOperServHelp);

    if (!ircd->omode) {
        return MOD_STOP;
    }
    return MOD_CONT;
}
Esempio n. 14
0
/**
 * Create the command, and tell anope about it.
 * @param argc Argument count
 * @param argv Argument list
 * @return MOD_CONT to allow the module, MOD_STOP to stop it
 **/
int AnopeInit(int argc, char **argv)
{
    Command *c;

    moduleAddAuthor("Anope");
    moduleAddVersion("$Id: os_sgline.c 1288 2007-08-29 18:40:53Z geniusdex $");
    moduleSetType(CORE);

    c = createCommand("SGLINE", do_sgline, is_services_oper,
                      OPER_HELP_SGLINE, -1, -1, -1, -1);
    moduleAddCommand(OPERSERV, c, MOD_UNIQUE);

    moduleSetOperHelp(myOperServHelp);

    if (!ircd->sgline) {
        return MOD_STOP;
    }
    return MOD_CONT;
}
Esempio n. 15
0
/**
 * Create the command, and tell anope about it.
 * @param argc Argument count
 * @param argv Argument list
 * @return MOD_CONT to allow the module, MOD_STOP to stop it
 **/
int AnopeInit(int argc, char **argv)
{
    Command *c;

    moduleAddAuthor("Anope");
    moduleAddVersion("$Id: os_oline.c 982 2006-03-01 14:16:54Z certus $");
    moduleSetType(CORE);

    c = createCommand("OLINE", do_operoline, is_services_admin,
                      OPER_HELP_OLINE, -1, -1, -1, -1);
    moduleAddCommand(OPERSERV, c, MOD_UNIQUE);

    moduleSetOperHelp(myOperServHelp);

    if (!ircd->omode) {
        return MOD_STOP;
    }
    return MOD_CONT;
}
Esempio n. 16
0
/**
 * Create the command, and tell anope about it.
 * @param argc Argument count
 * @param argv Argument list
 * @return MOD_CONT to allow the module, MOD_STOP to stop it
 **/
int AnopeInit(int argc, char **argv)
{
    Command *c;

    moduleAddAuthor("Anope");
    moduleAddVersion(VERSION_STRING);
    moduleSetType(CORE);

    c = createCommand("SET", do_set, is_services_root, OPER_HELP_SET, -1,
                      -1, -1, -1);
    moduleAddCommand(OPERSERV, c, MOD_UNIQUE);
    c = createCommand("SET LIST", NULL, NULL, OPER_HELP_SET_LIST, -1, -1,
                      -1, -1);
    moduleAddCommand(OPERSERV, c, MOD_UNIQUE);
    c = createCommand("SET READONLY", NULL, NULL, OPER_HELP_SET_READONLY,
                      -1, -1, -1, -1);
    moduleAddCommand(OPERSERV, c, MOD_UNIQUE);
    c = createCommand("SET LOGCHAN", NULL, NULL, OPER_HELP_SET_LOGCHAN, -1,
                      -1, -1, -1);
    moduleAddCommand(OPERSERV, c, MOD_UNIQUE);
    c = createCommand("SET DEBUG", NULL, NULL, OPER_HELP_SET_DEBUG, -1, -1,
                      -1, -1);
    moduleAddCommand(OPERSERV, c, MOD_UNIQUE);
    c = createCommand("SET NOEXPIRE", NULL, NULL, OPER_HELP_SET_NOEXPIRE,
                      -1, -1, -1, -1);
    moduleAddCommand(OPERSERV, c, MOD_UNIQUE);
    c = createCommand("SET IGNORE", NULL, NULL, OPER_HELP_SET_IGNORE, -1,
                      -1, -1, -1);
    moduleAddCommand(OPERSERV, c, MOD_UNIQUE);
    c = createCommand("SET SUPERADMIN", NULL, NULL,
                      OPER_HELP_SET_SUPERADMIN, -1, -1, -1, -1);
    moduleAddCommand(OPERSERV, c, MOD_UNIQUE);
#ifdef USE_MYSQL
    c = createCommand("SET SQL", NULL, NULL, OPER_HELP_SET_SQL, -1, -1, -1,
                      -1);
    moduleAddCommand(OPERSERV, c, MOD_UNIQUE);
#endif

    moduleSetOperHelp(myOperServHelp);

    return MOD_CONT;
}
Esempio n. 17
0
/**
 * Create the command, and tell anope about it.
 * @param argc Argument count
 * @param argv Argument list
 * @return MOD_CONT to allow the module, MOD_STOP to stop it
 **/
int AnopeInit(int argc, char **argv)
{
    Command *c;

    moduleAddAuthor("Anope");
    moduleAddVersion("$Id: os_logonnews.c 1265 2007-08-26 15:33:06Z geniusdex $");
    moduleSetType(CORE);

    /** 
     * For some unknown reason, do_logonnews is actaully defined in news.c
     * we can look at moving it here later
     **/
    c = createCommand("LOGONNEWS", do_logonnews, is_services_admin,
                      NEWS_HELP_LOGON, -1, -1, -1, -1);
    moduleAddCommand(OPERSERV, c, MOD_UNIQUE);

    moduleSetOperHelp(myOperServHelp);

    return MOD_CONT;
}
Esempio n. 18
0
/**
 * Create the command, and tell anope about it.
 * @param argc Argument count
 * @param argv Argument list
 * @return MOD_CONT to allow the module, MOD_STOP to stop it
 **/
int AnopeInit(int argc, char **argv)
{
    Command *c;

    moduleAddAuthor("Anope");
    moduleAddVersion
        (VERSION_STRING);
    moduleSetType(CORE);

    /** 
     * For some unknown reason, do_randomnews is actaully defined in news.c
     * we can look at moving it here later
     **/
    c = createCommand("RANDOMNEWS", do_randomnews, is_services_admin,
                      NEWS_HELP_RANDOM, -1, -1, -1, -1);
    moduleAddCommand(OPERSERV, c, MOD_UNIQUE);

    moduleSetOperHelp(myOperServHelp);

    return MOD_CONT;
}
Esempio n. 19
0
/**
 * Create the command, and tell anope about it.
 * @param argc Argument count
 * @param argv Argument list
 * @return MOD_CONT to allow the module, MOD_STOP to stop it
 **/
int AnopeInit(int argc, char **argv)
{
    Command *c;

    moduleAddAuthor("Anope");
    moduleAddVersion(VERSION_STRING);
    moduleSetType(CORE);

    /**
     * do_session/do_exception are exported from sessions.c - we just want to provide an interface.
     **/
    c = createCommand("SESSION", do_session, is_services_oper,
                      OPER_HELP_SESSION, -1, -1, -1, -1);
    moduleAddCommand(OPERSERV, c, MOD_UNIQUE);
    c = createCommand("EXCEPTION", do_exception, is_services_oper,
                      OPER_HELP_EXCEPTION, -1, -1, -1, -1);
    moduleAddCommand(OPERSERV, c, MOD_UNIQUE);

    moduleSetOperHelp(myOperServHelp);

    return MOD_CONT;
}