Beispiel #1
0
int AnopeInit(int argc, char **argv)
{
    Command *c;
    int status;

    moduleAddAuthor(AUTHOR);
    moduleAddVersion(VERSION);
    moduleSetType(SUPPORTED);

    c = createCommand("APPENDTOPIC", my_cs_appendtopic, NULL, -1, -1, -1,
                      -1, -1);
    if ((status = moduleAddCommand(CHANSERV, c, MOD_HEAD))) {
        alog("[cs_appendtopic] Unable to create APPENDTOPIC command: %d",
             status);
        return MOD_STOP;
    }
    moduleAddHelp(c, my_cs_help_appendtopic);
    moduleSetChanHelp(my_cs_help);

    my_add_languages();

    alog("[cs_appendtopic] Loaded successfully");

    return MOD_CONT;
}
Beispiel #2
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: cs_invite.c 981 2006-03-01 14:08:00Z certus $");
    moduleSetType(CORE);

    c = createCommand("INVITE", do_invite, NULL, CHAN_HELP_INVITE, -1, -1,
                      -1, -1);
    moduleAddCommand(CHANSERV, c, MOD_UNIQUE);

    moduleSetChanHelp(myChanServHelp);

    return MOD_CONT;
}
Beispiel #3
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: cs_clear.c 953 2006-01-14 11:36:29Z certus $");
    moduleSetType(CORE);

    c = createCommand("CLEAR", do_clear, NULL, CHAN_HELP_CLEAR, -1, -1, -1,
                      -1);
    moduleAddCommand(CHANSERV, c, MOD_UNIQUE);

    moduleSetChanHelp(myChanServHelp);

    return MOD_CONT;
}
Beispiel #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: cs_clear.c 1265 2007-08-26 15:33:06Z geniusdex $");
    moduleSetType(CORE);

    c = createCommand("CLEAR", do_clear, NULL, CHAN_HELP_CLEAR, -1, -1, -1,
                      -1);
    moduleAddCommand(CHANSERV, c, MOD_UNIQUE);

    moduleSetChanHelp(myChanServHelp);

    return MOD_CONT;
}
/**
 * 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: cs_logout.c 1265 2007-08-26 15:33:06Z geniusdex $");
    moduleSetType(CORE);

    c = createCommand("LOGOUT", do_logout, NULL, -1, CHAN_HELP_LOGOUT, -1,
                      CHAN_SERVADMIN_HELP_LOGOUT,
                      CHAN_SERVADMIN_HELP_LOGOUT);
    moduleAddCommand(CHANSERV, c, MOD_UNIQUE);

    moduleSetChanHelp(myChanServHelp);

    return MOD_CONT;
}
/**
 * Create the off 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: cs_register.c 1270 2007-08-27 03:23:06Z drstein $");
    moduleSetType(CORE);

    c = createCommand("REGISTER", do_register, NULL, CHAN_HELP_REGISTER,
                      -1, -1, -1, -1);
    c->help_param1 = s_NickServ;
    moduleAddCommand(CHANSERV, c, MOD_UNIQUE);

    moduleSetChanHelp(myChanServHelp);

    return MOD_CONT;
}
/**
 * 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: cs_getpass.c 1265 2007-08-26 15:33:06Z geniusdex $");
    moduleSetType(CORE);

    c = createCommand("GETPASS", do_getpass, is_services_admin, -1, -1, -1,
                      CHAN_SERVADMIN_HELP_GETPASS,
                      CHAN_SERVADMIN_HELP_GETPASS);
    moduleAddCommand(CHANSERV, c, MOD_UNIQUE);

    moduleSetChanHelp(myChanServHelp);

    return MOD_CONT;
}
Beispiel #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(VERSION_STRING);
    moduleSetType(CORE);

    c = createCommand("FORBID", do_forbid, is_services_admin, -1, -1, -1,
                      CHAN_SERVADMIN_HELP_FORBID,
                      CHAN_SERVADMIN_HELP_FORBID);
    moduleAddCommand(CHANSERV, c, MOD_UNIQUE);

    moduleSetChanHelp(myChanServHelp);

    return MOD_CONT;
}
Beispiel #9
0
int AnopeInit(int argc, char **argv)
{
    Command *c = NULL;
    EvtHook *hook = NULL;
    int status = 0;
	if (!moduleMinVersion(1,7,21,1341)) {
		alog("cs_autovoice: Your version of Anope isn't supported. This module require Anope-1.7.21 (1341) or later. Please upgrade to a newer release.");
		return MOD_STOP;
	}
    hook = createEventHook(EVENT_DB_SAVING, mSaveData);
    status = moduleAddEventHook(hook);
	if (status != MOD_ERR_OK) {
		alog("cs_autovoice: Cannot hook to EVENT_DB_SAVING.");
		return MOD_STOP;
	}
	hook = createEventHook(EVENT_DB_BACKUP, mBackupData);
    status = moduleAddEventHook(hook);
	if (status != MOD_ERR_OK) {
		alog("cs_autovoice: Cannot hook to EVENT_DB_BACKUP.");
		return MOD_STOP;
	}
    hook = createEventHook(EVENT_JOIN_CHANNEL, mEventJoin);
    status = moduleAddEventHook(hook);
	if (status != MOD_ERR_OK) {
		alog("cs_autovoice: Cannot hook to EVENT_JOIN_CHANNEL.");
		return MOD_STOP;
	}
    c = createCommand("AUTOVOICE", do_avoice, NULL, -1, -1, -1, -1, -1);
	moduleAddHelp(c, myChanServAvoiceHelp);
    moduleSetChanHelp(myChanServHelp);
    moduleAddCommand(CHANSERV, c, MOD_HEAD);
	if (status != MOD_ERR_OK) {
		alog("cs_autovoice: Something isn't init right!");
		return MOD_STOP;
	} else {
		alog("cs_autovoice: New command: \2/msg %s HELP AUTOVOICE\2", s_ChanServ);
		alog("cs_autovoice: Module loaded successfully.");
	}
	mLoadConfig();
	mAddLanguages();
	moduleAddCallback("cs_autovoice: mLoadData", time(NULL) + 2, mLoadData, 0, NULL);
    moduleAddAuthor(AUTHOR);
    moduleAddVersion(VERSION);
    return MOD_CONT;
}
Beispiel #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(VERSION_STRING);
    moduleSetType(CORE);

    c = createCommand("OP", do_op, NULL, CHAN_HELP_OP, -1, -1, -1, -1);
    moduleAddCommand(CHANSERV, c, MOD_UNIQUE);
    c = createCommand("DEOP", do_deop, NULL, CHAN_HELP_DEOP, -1, -1, -1,
                      -1);
    moduleAddCommand(CHANSERV, c, MOD_UNIQUE);
    c = createCommand("VOICE", do_voice, NULL, CHAN_HELP_VOICE, -1, -1, -1,
                      -1);
    moduleAddCommand(CHANSERV, c, MOD_UNIQUE);
    c = createCommand("DEVOICE", do_devoice, NULL, CHAN_HELP_DEVOICE, -1,
                      -1, -1, -1);
    moduleAddCommand(CHANSERV, c, MOD_UNIQUE);
    c = createCommand("HALFOP", do_halfop, NULL, CHAN_HELP_HALFOP, -1,
                      -1, -1, -1);
    moduleAddCommand(CHANSERV, c, MOD_UNIQUE);
    c = createCommand("DEHALFOP", do_dehalfop, NULL, CHAN_HELP_DEHALFOP, -1, -1, -1, -1);
    moduleAddCommand(CHANSERV, c, MOD_UNIQUE);
    c = createCommand("PROTECT", do_protect, NULL, CHAN_HELP_PROTECT, -1, -1, -1, -1);
    moduleAddCommand(CHANSERV, c, MOD_UNIQUE);
    c = createCommand("DEPROTECT", do_deprotect, NULL, CHAN_HELP_DEPROTECT, -1, -1, -1, -1);
    moduleAddCommand(CHANSERV, c, MOD_UNIQUE);
    c = createCommand("OWNER", do_owner, NULL, CHAN_HELP_OWNER, -1, -1, -1, -1);
    moduleAddCommand(CHANSERV, c, MOD_UNIQUE);
    c = createCommand("DEOWNER", do_deowner, NULL, CHAN_HELP_DEOWNER, -1, -1, -1, -1);
    moduleAddCommand(CHANSERV, c, MOD_UNIQUE);
    c = createCommand("ADMIN", do_protect, NULL, CHAN_HELP_PROTECT, -1, -1, -1, -1);
    moduleAddCommand(CHANSERV, c, MOD_UNIQUE);
    c = createCommand("DEADMIN", do_deprotect, NULL, CHAN_HELP_DEPROTECT, -1, -1, -1, -1);
    moduleAddCommand(CHANSERV, c, MOD_UNIQUE);

    moduleSetChanHelp(myChanServHelp);

    return MOD_CONT;
}
Beispiel #11
0
int AnopeInit(int argc, char **argv)
{
    Command *c;
    int status = 0;

    moduleSetChanHelp(myHelp);
    c = createCommand("TBAN", do_tban, NULL, -1, -1, -1, -1, -1);
    moduleAddHelp(c, myFullHelp);
    status = moduleAddCommand(CHANSERV, c, MOD_HEAD);

    mAddLanguages();

    moduleAddAuthor(AUTHOR);
    moduleAddVersion(VERSION);
    moduleSetType(SUPPORTED);

    if (status != MOD_ERR_OK) {
        return MOD_STOP;
    }
    return MOD_CONT;
}
Beispiel #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
        (VERSION_STRING);
    moduleSetType(CORE);

    c = createCommand("ACCESS", do_access, NULL, CHAN_HELP_ACCESS, -1, -1,
                      -1, -1);
    moduleAddCommand(CHANSERV, c, MOD_UNIQUE);
    c = createCommand("ACCESS LEVELS", NULL, NULL, CHAN_HELP_ACCESS_LEVELS,
                      -1, -1, -1, -1);
    moduleAddCommand(CHANSERV, c, MOD_UNIQUE);
    c = createCommand("LEVELS", do_levels, NULL, CHAN_HELP_LEVELS, -1, -1,
                      -1, -1);
    moduleAddCommand(CHANSERV, c, MOD_UNIQUE);
    moduleSetChanHelp(myChanServHelp);

    return MOD_CONT;
}
Beispiel #13
0
int AnopeInit(int argc, char **argv)
{
    Command *c;
    int status;

    moduleAddAuthor(AUTHOR);
    moduleAddVersion(VERSION);
    moduleSetType(SUPPORTED);

    c = createCommand("ENFORCE", my_cs_enforce, NULL, -1, -1, -1, -1, -1);
    if ((status = moduleAddCommand(CHANSERV, c, MOD_HEAD))) {
        alog("[cs_enforce] Unable to create ENFORCE command: %d", status);
        return MOD_STOP;
    }

    moduleAddHelp(c, my_cs_help_enforce);
    moduleSetChanHelp(my_cs_help);

    my_add_languages();

    return MOD_CONT;
}
Beispiel #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(VERSION_STRING);
    moduleSetType(CORE);

    c = createCommand("SUSPEND", do_suspend, is_services_oper, -1, -1,
                      CHAN_SERVADMIN_HELP_SUSPEND,
                      CHAN_SERVADMIN_HELP_SUSPEND,
                      CHAN_SERVADMIN_HELP_SUSPEND);
    moduleAddCommand(CHANSERV, c, MOD_UNIQUE);
    c = createCommand("UNSUSPEND", do_unsuspend, is_services_oper, -1, -1,
                      CHAN_SERVADMIN_HELP_UNSUSPEND, 
                      CHAN_SERVADMIN_HELP_UNSUSPEND,
                      CHAN_SERVADMIN_HELP_UNSUSPEND);
    moduleAddCommand(CHANSERV, c, MOD_UNIQUE);

    moduleSetChanHelp(myChanServHelp);

    return MOD_CONT;
}