mirror of
https://github.com/anope/anope.git
synced 2026-06-29 10:56:38 +02:00
Convert OperServ. YES, src/core done.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1557 5417fbe8-f217-4b02-8779-1006273d7864
This commit is contained in:
+15
-27
@@ -21,37 +21,25 @@ int admin_list_callback(SList * slist, int number, void *item,
|
||||
int admin_list(int number, NickCore * nc, User * u, int *sent_header);
|
||||
void myOperServHelp(User * u);
|
||||
|
||||
/**
|
||||
* 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)
|
||||
class OSAdmin : public Module
|
||||
{
|
||||
Command *c;
|
||||
public:
|
||||
OSAdmin(const std::string &creator) : Module(creator)
|
||||
{
|
||||
Command *c;
|
||||
|
||||
moduleAddAuthor("Anope");
|
||||
moduleAddVersion("$Id$");
|
||||
moduleSetType(CORE);
|
||||
moduleAddAuthor("Anope");
|
||||
moduleAddVersion("$Id$");
|
||||
moduleSetType(CORE);
|
||||
|
||||
c = createCommand("ADMIN", do_admin, NULL, OPER_HELP_ADMIN, -1, -1,
|
||||
-1, -1);
|
||||
c->help_param1 = s_NickServ;
|
||||
moduleAddCommand(OPERSERV, c, MOD_UNIQUE);
|
||||
c = createCommand("ADMIN", do_admin, NULL, OPER_HELP_ADMIN, -1, -1, -1, -1);
|
||||
c->help_param1 = s_NickServ;
|
||||
moduleAddCommand(OPERSERV, c, MOD_UNIQUE);
|
||||
|
||||
moduleSetOperHelp(myOperServHelp);
|
||||
moduleSetOperHelp(myOperServHelp);
|
||||
}
|
||||
};
|
||||
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unload the module
|
||||
**/
|
||||
void AnopeFini(void)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -243,4 +231,4 @@ int admin_list(int number, NickCore * nc, User * u, int *sent_header)
|
||||
return 1;
|
||||
}
|
||||
|
||||
MODULE_INIT("os_admin")
|
||||
MODULE_INIT(OSAdmin)
|
||||
|
||||
+14
-28
@@ -24,36 +24,22 @@ int akill_list_callback(SList * slist, int number, void *item,
|
||||
int akill_list(int number, Akill * ak, User * u, int *sent_header);
|
||||
void myOperServHelp(User * u);
|
||||
|
||||
/**
|
||||
* 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)
|
||||
class OSAKill : public Module
|
||||
{
|
||||
Command *c;
|
||||
public:
|
||||
OSAKill(const std::string &creator) : Module(creator)
|
||||
{
|
||||
Command *c;
|
||||
|
||||
moduleAddAuthor("Anope");
|
||||
moduleAddVersion
|
||||
("$Id$");
|
||||
moduleSetType(CORE);
|
||||
c = createCommand("AKILL", do_akill, is_services_oper, OPER_HELP_AKILL,
|
||||
-1, -1, -1, -1);
|
||||
moduleAddCommand(OPERSERV, c, MOD_UNIQUE);
|
||||
moduleAddAuthor("Anope");
|
||||
moduleAddVersion("$Id$");
|
||||
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;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unload the module
|
||||
**/
|
||||
void AnopeFini(void)
|
||||
{
|
||||
|
||||
}
|
||||
moduleSetOperHelp(myOperServHelp);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -388,4 +374,4 @@ int akill_list(int number, Akill * ak, User * u, int *sent_header)
|
||||
return 1;
|
||||
}
|
||||
|
||||
MODULE_INIT("os_akill")
|
||||
MODULE_INIT(OSAKill)
|
||||
|
||||
+14
-28
@@ -18,37 +18,23 @@
|
||||
int do_chankill(User * u);
|
||||
void myOperServHelp(User * u);
|
||||
|
||||
/**
|
||||
* 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)
|
||||
class OSChanKill : public Module
|
||||
{
|
||||
Command *c;
|
||||
public:
|
||||
OSChanKill(const std::string &creator) : Module(creator)
|
||||
{
|
||||
Command *c;
|
||||
|
||||
moduleAddAuthor("Anope");
|
||||
moduleAddVersion
|
||||
("$Id$");
|
||||
moduleSetType(CORE);
|
||||
moduleAddAuthor("Anope");
|
||||
moduleAddVersion("$Id$");
|
||||
moduleSetType(CORE);
|
||||
|
||||
c = createCommand("CHANKILL", do_chankill, is_services_admin,
|
||||
OPER_HELP_CHANKILL, -1, -1, -1, -1);
|
||||
moduleAddCommand(OPERSERV, c, MOD_UNIQUE);
|
||||
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;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unload the module
|
||||
**/
|
||||
void AnopeFini(void)
|
||||
{
|
||||
|
||||
}
|
||||
moduleSetOperHelp(myOperServHelp);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -133,4 +119,4 @@ int do_chankill(User * u)
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
MODULE_INIT("os_chankill")
|
||||
MODULE_INIT(OSChanKill)
|
||||
|
||||
+14
-27
@@ -21,37 +21,24 @@ void myOperServHelp(User * u);
|
||||
extern MDE int anope_get_private_mode();
|
||||
#endif
|
||||
|
||||
/**
|
||||
* 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)
|
||||
class OSChanList : public Module
|
||||
{
|
||||
Command *c;
|
||||
public:
|
||||
OSChanList(const std::string &creator) : Module(creator)
|
||||
{
|
||||
Command *c;
|
||||
|
||||
moduleAddAuthor("Anope");
|
||||
moduleAddVersion("$Id$");
|
||||
moduleSetType(CORE);
|
||||
moduleAddAuthor("Anope");
|
||||
moduleAddVersion("$Id$");
|
||||
moduleSetType(CORE);
|
||||
|
||||
c = createCommand("CHANLIST", do_chanlist, is_services_oper,
|
||||
OPER_HELP_CHANLIST, -1, -1, -1, -1);
|
||||
moduleAddCommand(OPERSERV, c, MOD_UNIQUE);
|
||||
c = createCommand("CHANLIST", do_chanlist, is_services_oper, OPER_HELP_CHANLIST, -1, -1, -1, -1);
|
||||
moduleAddCommand(OPERSERV, c, MOD_UNIQUE);
|
||||
|
||||
moduleSetOperHelp(myOperServHelp);
|
||||
moduleSetOperHelp(myOperServHelp);
|
||||
}
|
||||
};
|
||||
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Unload the module
|
||||
**/
|
||||
void AnopeFini(void)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
@@ -115,4 +102,4 @@ int do_chanlist(User * u)
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
MODULE_INIT("os_chanlist")
|
||||
MODULE_INIT(OSChanList)
|
||||
|
||||
+15
-28
@@ -18,37 +18,24 @@
|
||||
int do_clearmodes(User * u);
|
||||
void myOperServHelp(User * u);
|
||||
|
||||
/**
|
||||
* 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)
|
||||
class OSClearModes : public Module
|
||||
{
|
||||
Command *c;
|
||||
public:
|
||||
OSClearModes(const std::string &creator) : Module(creator)
|
||||
{
|
||||
Command *c;
|
||||
|
||||
moduleAddAuthor("Anope");
|
||||
moduleAddVersion
|
||||
("$Id$");
|
||||
moduleSetType(CORE);
|
||||
moduleAddAuthor("Anope");
|
||||
moduleAddVersion
|
||||
("$Id$");
|
||||
moduleSetType(CORE);
|
||||
|
||||
c = createCommand("CLEARMODES", do_clearmodes, is_services_oper,
|
||||
OPER_HELP_CLEARMODES, -1, -1, -1, -1);
|
||||
moduleAddCommand(OPERSERV, c, MOD_UNIQUE);
|
||||
c = createCommand("CLEARMODES", do_clearmodes, is_services_oper, OPER_HELP_CLEARMODES, -1, -1, -1, -1);
|
||||
moduleAddCommand(OPERSERV, c, MOD_UNIQUE);
|
||||
|
||||
moduleSetOperHelp(myOperServHelp);
|
||||
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unload the module
|
||||
**/
|
||||
void AnopeFini(void)
|
||||
{
|
||||
|
||||
}
|
||||
moduleSetOperHelp(myOperServHelp);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
@@ -307,4 +294,4 @@ int do_clearmodes(User * u)
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
MODULE_INIT("os_clearmodes")
|
||||
MODULE_INIT(OSClearModes)
|
||||
|
||||
+14
-27
@@ -24,36 +24,23 @@ void defcon_sendlvls(User * u);
|
||||
|
||||
void myOperServHelp(User * u);
|
||||
|
||||
/**
|
||||
* 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)
|
||||
class OSDEFCON : public Module
|
||||
{
|
||||
Command *c;
|
||||
public:
|
||||
OSDEFCON(const std::string &creator) : Module(creator)
|
||||
{
|
||||
Command *c;
|
||||
|
||||
moduleAddAuthor("Anope");
|
||||
moduleAddVersion("$Id$");
|
||||
moduleSetType(CORE);
|
||||
moduleAddAuthor("Anope");
|
||||
moduleAddVersion("$Id$");
|
||||
moduleSetType(CORE);
|
||||
|
||||
c = createCommand("DEFCON", do_defcon, is_services_admin,
|
||||
OPER_HELP_DEFCON, -1, -1, -1, -1);
|
||||
moduleAddCommand(OPERSERV, c, MOD_UNIQUE);
|
||||
c = createCommand("DEFCON", do_defcon, is_services_admin, OPER_HELP_DEFCON, -1, -1, -1, -1);
|
||||
moduleAddCommand(OPERSERV, c, MOD_UNIQUE);
|
||||
|
||||
moduleSetOperHelp(myOperServHelp);
|
||||
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unload the module
|
||||
**/
|
||||
void AnopeFini(void)
|
||||
{
|
||||
|
||||
}
|
||||
moduleSetOperHelp(myOperServHelp);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
@@ -168,4 +155,4 @@ void defcon_sendlvls(User * u)
|
||||
}
|
||||
}
|
||||
|
||||
MODULE_INIT("os_defcon")
|
||||
MODULE_INIT(OSDEFCON)
|
||||
|
||||
+15
-27
@@ -18,36 +18,24 @@
|
||||
int do_global(User * u);
|
||||
void myOperServHelp(User * u);
|
||||
|
||||
/**
|
||||
* 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)
|
||||
class OSGlobal : public Module
|
||||
{
|
||||
Command *c;
|
||||
public:
|
||||
OSGlobal(const std::string &creator) : Module(creator)
|
||||
{
|
||||
Command *c;
|
||||
|
||||
moduleAddAuthor("Anope");
|
||||
moduleAddVersion("$Id$");
|
||||
moduleSetType(CORE);
|
||||
moduleAddAuthor("Anope");
|
||||
moduleAddVersion("$Id$");
|
||||
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);
|
||||
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;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unload the module
|
||||
**/
|
||||
void AnopeFini(void)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
@@ -81,4 +69,4 @@ int do_global(User * u)
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
MODULE_INIT("os_global")
|
||||
MODULE_INIT(OSGlobal)
|
||||
|
||||
+13
-25
@@ -17,32 +17,20 @@
|
||||
|
||||
int do_help(User * u);
|
||||
|
||||
/**
|
||||
* 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)
|
||||
class OSHelp : public Module
|
||||
{
|
||||
Command *c;
|
||||
public:
|
||||
OSHelp(const std::string &creator) : Module(creator)
|
||||
{
|
||||
Command *c;
|
||||
|
||||
moduleAddAuthor("Anope");
|
||||
moduleAddVersion("$Id$");
|
||||
moduleSetType(CORE);
|
||||
c = createCommand("HELP", do_help, NULL, -1, -1, -1, -1, -1);
|
||||
moduleAddCommand(OPERSERV, c, MOD_UNIQUE);
|
||||
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unload the module
|
||||
**/
|
||||
void AnopeFini(void)
|
||||
{
|
||||
|
||||
}
|
||||
moduleAddAuthor("Anope");
|
||||
moduleAddVersion("$Id$");
|
||||
moduleSetType(CORE);
|
||||
c = createCommand("HELP", do_help, NULL, -1, -1, -1, -1, -1);
|
||||
moduleAddCommand(OPERSERV, c, MOD_UNIQUE);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -65,4 +53,4 @@ int do_help(User * u)
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
MODULE_INIT("os_help")
|
||||
MODULE_INIT(OSHelp)
|
||||
|
||||
+14
-29
@@ -19,35 +19,22 @@ int do_ignorelist(User * u);
|
||||
void myOperServHelp(User * u);
|
||||
int do_ignoreuser(User * u);
|
||||
|
||||
/**
|
||||
* 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)
|
||||
class OSIgnore : public Module
|
||||
{
|
||||
Command *c;
|
||||
public:
|
||||
OSIgnore(const std::string &creator) : Module(creator)
|
||||
{
|
||||
Command *c;
|
||||
|
||||
moduleAddAuthor("Anope");
|
||||
moduleAddVersion("$Id$");
|
||||
moduleSetType(CORE);
|
||||
c = createCommand("IGNORE", do_ignoreuser, is_services_admin,
|
||||
OPER_HELP_IGNORE, -1, -1, -1, -1);
|
||||
moduleAddCommand(OPERSERV, c, MOD_UNIQUE);
|
||||
moduleAddAuthor("Anope");
|
||||
moduleAddVersion("$Id$");
|
||||
moduleSetType(CORE);
|
||||
c = createCommand("IGNORE", do_ignoreuser, is_services_admin, OPER_HELP_IGNORE, -1, -1, -1, -1);
|
||||
moduleAddCommand(OPERSERV, c, MOD_UNIQUE);
|
||||
|
||||
moduleSetOperHelp(myOperServHelp);
|
||||
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unload the module
|
||||
**/
|
||||
void AnopeFini(void)
|
||||
{
|
||||
|
||||
}
|
||||
moduleSetOperHelp(myOperServHelp);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
@@ -143,6 +130,4 @@ int do_ignorelist(User * u)
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
/* EOF */
|
||||
|
||||
MODULE_INIT("os_ignore")
|
||||
MODULE_INIT(OSIgnore)
|
||||
|
||||
+14
-27
@@ -18,36 +18,23 @@
|
||||
int do_jupe(User * u);
|
||||
void myOperServHelp(User * u);
|
||||
|
||||
/**
|
||||
* 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)
|
||||
class OSJupe : public Module
|
||||
{
|
||||
Command *c;
|
||||
public:
|
||||
OSJupe(const std::string &creator) : Module(creator)
|
||||
{
|
||||
Command *c;
|
||||
|
||||
moduleAddAuthor("Anope");
|
||||
moduleAddVersion("$Id$");
|
||||
moduleSetType(CORE);
|
||||
moduleAddAuthor("Anope");
|
||||
moduleAddVersion("$Id$");
|
||||
moduleSetType(CORE);
|
||||
|
||||
c = createCommand("JUPE", do_jupe, is_services_admin, OPER_HELP_JUPE,
|
||||
-1, -1, -1, -1);
|
||||
moduleAddCommand(OPERSERV, c, MOD_UNIQUE);
|
||||
c = createCommand("JUPE", do_jupe, is_services_admin, OPER_HELP_JUPE, -1, -1, -1, -1);
|
||||
moduleAddCommand(OPERSERV, c, MOD_UNIQUE);
|
||||
|
||||
moduleSetOperHelp(myOperServHelp);
|
||||
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unload the module
|
||||
**/
|
||||
void AnopeFini(void)
|
||||
{
|
||||
|
||||
}
|
||||
moduleSetOperHelp(myOperServHelp);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
@@ -91,4 +78,4 @@ int do_jupe(User * u)
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
MODULE_INIT("os_jupe")
|
||||
MODULE_INIT(OSJupe)
|
||||
|
||||
+14
-27
@@ -18,36 +18,23 @@
|
||||
int do_os_kick(User * u);
|
||||
void myOperServHelp(User * u);
|
||||
|
||||
/**
|
||||
* 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)
|
||||
class OSKick : public Module
|
||||
{
|
||||
Command *c;
|
||||
public:
|
||||
OSKick(const std::string &creator) : Module(creator)
|
||||
{
|
||||
Command *c;
|
||||
|
||||
moduleAddAuthor("Anope");
|
||||
moduleAddVersion("$Id$");
|
||||
moduleSetType(CORE);
|
||||
moduleAddAuthor("Anope");
|
||||
moduleAddVersion("$Id$");
|
||||
moduleSetType(CORE);
|
||||
|
||||
c = createCommand("KICK", do_os_kick, is_services_oper, OPER_HELP_KICK,
|
||||
-1, -1, -1, -1);
|
||||
moduleAddCommand(OPERSERV, c, MOD_UNIQUE);
|
||||
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;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unload the module
|
||||
**/
|
||||
void AnopeFini(void)
|
||||
{
|
||||
|
||||
}
|
||||
moduleSetOperHelp(myOperServHelp);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
@@ -99,4 +86,4 @@ int do_os_kick(User * u)
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
MODULE_INIT("os_kick")
|
||||
MODULE_INIT(OSKick)
|
||||
|
||||
+31
-37
@@ -21,49 +21,43 @@ void myOperServHelp(User * u);
|
||||
int load_config(void);
|
||||
int reload_config(int argc, char **argv);
|
||||
|
||||
/**
|
||||
* 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)
|
||||
class OSLogonNews : public Module
|
||||
{
|
||||
EvtHook *hook;
|
||||
char buf[BUFSIZE];
|
||||
public:
|
||||
OSLogonNews(const std::string &creator) : Module(creator)
|
||||
{
|
||||
EvtHook *hook;
|
||||
char buf[BUFSIZE];
|
||||
|
||||
moduleAddAuthor("Anope");
|
||||
moduleAddVersion("$Id$");
|
||||
moduleSetType(CORE);
|
||||
moduleAddAuthor("Anope");
|
||||
moduleAddVersion("$Id$");
|
||||
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);
|
||||
snprintf(buf, BUFSIZE, "%d", NewsCount),
|
||||
c->help_param1 = sstrdup(buf);
|
||||
moduleAddCommand(OPERSERV, c, MOD_UNIQUE);
|
||||
/**
|
||||
* 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);
|
||||
snprintf(buf, BUFSIZE, "%d", NewsCount),
|
||||
c->help_param1 = sstrdup(buf);
|
||||
moduleAddCommand(OPERSERV, c, MOD_UNIQUE);
|
||||
|
||||
moduleSetOperHelp(myOperServHelp);
|
||||
moduleSetOperHelp(myOperServHelp);
|
||||
|
||||
hook = createEventHook(EVENT_RELOAD, reload_config);
|
||||
if (moduleAddEventHook(hook) != MOD_ERR_OK) {
|
||||
alog("[\002os_logonnews\002] Can't hook to EVENT_RELOAD event");
|
||||
return MOD_STOP;
|
||||
}
|
||||
hook = createEventHook(EVENT_RELOAD, reload_config);
|
||||
if (moduleAddEventHook(hook) != MOD_ERR_OK)
|
||||
{
|
||||
throw ModuleException("os_logonnews: Can't hook to EVENT_RELOAD event");
|
||||
}
|
||||
}
|
||||
|
||||
return MOD_CONT;
|
||||
}
|
||||
~OSLogonNews()
|
||||
{
|
||||
free(c->help_param1);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Unload the module
|
||||
**/
|
||||
void AnopeFini(void)
|
||||
{
|
||||
free(c->help_param1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
@@ -97,4 +91,4 @@ int reload_config(int argc, char **argv) {
|
||||
|
||||
/* EOF */
|
||||
|
||||
MODULE_INIT("os_logonnews")
|
||||
MODULE_INIT(OSLogonNews)
|
||||
|
||||
+14
-26
@@ -18,36 +18,24 @@
|
||||
int do_os_mode(User * u);
|
||||
void myOperServHelp(User * u);
|
||||
|
||||
/**
|
||||
* 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)
|
||||
class OSMode : public Module
|
||||
{
|
||||
Command *c;
|
||||
public:
|
||||
OSMode(const std::string &creator) : Module(creator)
|
||||
{
|
||||
Command *c;
|
||||
|
||||
moduleAddAuthor("Anope");
|
||||
moduleAddVersion("$Id$");
|
||||
moduleSetType(CORE);
|
||||
moduleAddAuthor("Anope");
|
||||
moduleAddVersion("$Id$");
|
||||
moduleSetType(CORE);
|
||||
|
||||
c = createCommand("MODE", do_os_mode, is_services_oper, OPER_HELP_MODE,
|
||||
-1, -1, -1, -1);
|
||||
moduleAddCommand(OPERSERV, c, MOD_UNIQUE);
|
||||
c = createCommand("MODE", do_os_mode, is_services_oper, OPER_HELP_MODE, -1, -1, -1, -1);
|
||||
moduleAddCommand(OPERSERV, c, MOD_UNIQUE);
|
||||
|
||||
moduleSetOperHelp(myOperServHelp);
|
||||
moduleSetOperHelp(myOperServHelp);
|
||||
}
|
||||
};
|
||||
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unload the module
|
||||
**/
|
||||
void AnopeFini(void)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
@@ -101,4 +89,4 @@ int do_os_mode(User * u)
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
MODULE_INIT("os_mode")
|
||||
MODULE_INIT(OSMode)
|
||||
|
||||
+14
-27
@@ -20,35 +20,22 @@ void myOperServHelp(User * u);
|
||||
int showModuleMsgLoaded(MessageHash * msgList, char *mod_name, User * u);
|
||||
int showModuleCmdLoaded(CommandHash * cmdList, char *mod_name, User * u);
|
||||
|
||||
/**
|
||||
* 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)
|
||||
class OSModInfo : public Module
|
||||
{
|
||||
Command *c;
|
||||
public:
|
||||
OSModInfo(const std::string &creator) : Module(creator)
|
||||
{
|
||||
Command *c;
|
||||
|
||||
moduleAddAuthor("Anope");
|
||||
moduleAddVersion("$Id$");
|
||||
moduleSetType(CORE);
|
||||
c = createCommand("MODINFO", do_modinfo, NULL, -1, -1, -1, -1,
|
||||
OPER_HELP_MODINFO);
|
||||
moduleAddCommand(OPERSERV, c, MOD_UNIQUE);
|
||||
moduleAddAuthor("Anope");
|
||||
moduleAddVersion("$Id$");
|
||||
moduleSetType(CORE);
|
||||
c = createCommand("MODINFO", do_modinfo, NULL, -1, -1, -1, -1, OPER_HELP_MODINFO);
|
||||
moduleAddCommand(OPERSERV, c, MOD_UNIQUE);
|
||||
|
||||
moduleSetOperHelp(myOperServHelp);
|
||||
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unload the module
|
||||
**/
|
||||
void AnopeFini(void)
|
||||
{
|
||||
|
||||
}
|
||||
moduleSetOperHelp(myOperServHelp);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
@@ -138,4 +125,4 @@ int showModuleMsgLoaded(MessageHash * msgList, char *mod_name, User * u)
|
||||
return display;
|
||||
}
|
||||
|
||||
MODULE_INIT("os_modinfo")
|
||||
MODULE_INIT(OSModInfo)
|
||||
|
||||
+14
-27
@@ -18,36 +18,23 @@
|
||||
int do_modlist(User * u);
|
||||
void myOperServHelp(User * u);
|
||||
|
||||
/**
|
||||
* 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)
|
||||
class OSModList : public Module
|
||||
{
|
||||
Command *c;
|
||||
public:
|
||||
OSModList(const std::string &creator) : Module(creator)
|
||||
{
|
||||
Command *c;
|
||||
|
||||
moduleAddAuthor("Anope");
|
||||
moduleAddVersion("$Id$");
|
||||
moduleSetType(CORE);
|
||||
moduleAddAuthor("Anope");
|
||||
moduleAddVersion("$Id$");
|
||||
moduleSetType(CORE);
|
||||
|
||||
c = createCommand("MODLIST", do_modlist, NULL, -1, -1, -1, -1,
|
||||
OPER_HELP_MODLIST);
|
||||
moduleAddCommand(OPERSERV, c, MOD_UNIQUE);
|
||||
c = createCommand("MODLIST", do_modlist, NULL, -1, -1, -1, -1, OPER_HELP_MODLIST);
|
||||
moduleAddCommand(OPERSERV, c, MOD_UNIQUE);
|
||||
|
||||
moduleSetOperHelp(myOperServHelp);
|
||||
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unload the module
|
||||
**/
|
||||
void AnopeFini(void)
|
||||
{
|
||||
|
||||
}
|
||||
moduleSetOperHelp(myOperServHelp);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
@@ -194,4 +181,4 @@ int do_modlist(User * u)
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
MODULE_INIT("os_modlist")
|
||||
MODULE_INIT(OSModList)
|
||||
|
||||
+14
-28
@@ -18,37 +18,23 @@
|
||||
int do_modload(User * u);
|
||||
void myOperServHelp(User * u);
|
||||
|
||||
/**
|
||||
* 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)
|
||||
class OSModLoad : public Module
|
||||
{
|
||||
Command *c;
|
||||
public:
|
||||
OSModLoad(const std::string &creator) : Module(creator)
|
||||
{
|
||||
Command *c;
|
||||
|
||||
moduleAddAuthor("Anope");
|
||||
moduleAddVersion
|
||||
("$Id$");
|
||||
moduleSetType(CORE);
|
||||
moduleAddAuthor("Anope");
|
||||
moduleAddVersion("$Id$");
|
||||
moduleSetType(CORE);
|
||||
|
||||
c = createCommand("MODLOAD", do_modload, is_services_root, -1, -1, -1,
|
||||
-1, OPER_HELP_MODLOAD);
|
||||
moduleAddCommand(OPERSERV, c, MOD_UNIQUE);
|
||||
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;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unload the module
|
||||
**/
|
||||
void AnopeFini(void)
|
||||
{
|
||||
|
||||
}
|
||||
moduleSetOperHelp(myOperServHelp);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
@@ -82,4 +68,4 @@ int do_modload(User * u)
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
MODULE_INIT("os_modload")
|
||||
MODULE_INIT(OSModLoad)
|
||||
|
||||
+14
-28
@@ -19,37 +19,23 @@ int do_modunload(User * u);
|
||||
|
||||
void myOperServHelp(User * u);
|
||||
|
||||
/**
|
||||
* 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)
|
||||
class OSModUnLoad : public Module
|
||||
{
|
||||
Command *c;
|
||||
public:
|
||||
OSModUnLoad(const std::string &creator) : Module(creator)
|
||||
{
|
||||
Command *c;
|
||||
|
||||
moduleAddAuthor("Anope");
|
||||
moduleAddVersion
|
||||
("$Id$");
|
||||
moduleSetType(CORE);
|
||||
moduleAddAuthor("Anope");
|
||||
moduleAddVersion("$Id$");
|
||||
moduleSetType(CORE);
|
||||
|
||||
c = createCommand("MODUNLOAD", do_modunload, is_services_root, -1, -1,
|
||||
-1, -1, OPER_HELP_MODUNLOAD);
|
||||
moduleAddCommand(OPERSERV, c, MOD_UNIQUE);
|
||||
c = createCommand("MODUNLOAD", do_modunload, is_services_root, -1, -1, -1, -1, OPER_HELP_MODUNLOAD);
|
||||
moduleAddCommand(OPERSERV, c, MOD_UNIQUE);
|
||||
|
||||
moduleSetOperHelp(myOperServHelp);
|
||||
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unload the module
|
||||
**/
|
||||
void AnopeFini(void)
|
||||
{
|
||||
|
||||
}
|
||||
moduleSetOperHelp(myOperServHelp);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
@@ -84,4 +70,4 @@ int do_modunload(User * u)
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
MODULE_INIT("os_modunload")
|
||||
MODULE_INIT(OSModUnLoad)
|
||||
|
||||
+14
-26
@@ -18,36 +18,24 @@
|
||||
int do_noop(User * u);
|
||||
void myOperServHelp(User * u);
|
||||
|
||||
/**
|
||||
* 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)
|
||||
class OSNOOP : public Module
|
||||
{
|
||||
Command *c;
|
||||
public:
|
||||
OSNOOP(const std::string &creator) : Module(creator)
|
||||
{
|
||||
Command *c;
|
||||
|
||||
moduleAddAuthor("Anope");
|
||||
moduleAddVersion("$Id$");
|
||||
moduleSetType(CORE);
|
||||
moduleAddAuthor("Anope");
|
||||
moduleAddVersion("$Id$");
|
||||
moduleSetType(CORE);
|
||||
|
||||
c = createCommand("NOOP", do_noop, is_services_admin, OPER_HELP_NOOP,
|
||||
-1, -1, -1, -1);
|
||||
moduleAddCommand(OPERSERV, c, MOD_UNIQUE);
|
||||
c = createCommand("NOOP", do_noop, is_services_admin, OPER_HELP_NOOP, -1, -1, -1, -1);
|
||||
moduleAddCommand(OPERSERV, c, MOD_UNIQUE);
|
||||
|
||||
moduleSetOperHelp(myOperServHelp);
|
||||
moduleSetOperHelp(myOperServHelp);
|
||||
}
|
||||
};
|
||||
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unload the module
|
||||
**/
|
||||
void AnopeFini(void)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
@@ -105,4 +93,4 @@ int do_noop(User * u)
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
MODULE_INIT("os_noop")
|
||||
MODULE_INIT(OSNOOP)
|
||||
|
||||
+16
-28
@@ -18,39 +18,27 @@ int do_operoline(User * u);
|
||||
|
||||
void myOperServHelp(User * u);
|
||||
|
||||
/**
|
||||
* 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)
|
||||
class OSOLine : public Module
|
||||
{
|
||||
Command *c;
|
||||
public:
|
||||
OSOLine(const std::string &creator) : Module(creator)
|
||||
{
|
||||
Command *c;
|
||||
|
||||
moduleAddAuthor("Anope");
|
||||
moduleAddVersion("$Id$");
|
||||
moduleSetType(CORE);
|
||||
moduleAddAuthor("Anope");
|
||||
moduleAddVersion("$Id$");
|
||||
moduleSetType(CORE);
|
||||
|
||||
c = createCommand("OLINE", do_operoline, is_services_root,
|
||||
OPER_HELP_OLINE, -1, -1, -1, -1);
|
||||
moduleAddCommand(OPERSERV, c, MOD_UNIQUE);
|
||||
c = createCommand("OLINE", do_operoline, is_services_root, OPER_HELP_OLINE, -1, -1, -1, -1);
|
||||
moduleAddCommand(OPERSERV, c, MOD_UNIQUE);
|
||||
|
||||
moduleSetOperHelp(myOperServHelp);
|
||||
moduleSetOperHelp(myOperServHelp);
|
||||
|
||||
if (!ircd->omode) {
|
||||
return MOD_STOP;
|
||||
}
|
||||
return MOD_CONT;
|
||||
}
|
||||
if (!ircd->omode)
|
||||
throw ModuleException("Your IRCd does not support OMODE.");
|
||||
|
||||
/**
|
||||
* Unload the module
|
||||
**/
|
||||
void AnopeFini(void)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
@@ -107,4 +95,4 @@ int do_operoline(User * u)
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
MODULE_INIT("os_oline")
|
||||
MODULE_INIT(OSOLine)
|
||||
|
||||
+15
-28
@@ -21,36 +21,23 @@ int oper_list_callback(SList * slist, int number, void *item,
|
||||
int oper_list(int number, NickCore * nc, User * u, int *sent_header);
|
||||
void myOperServHelp(User * u);
|
||||
|
||||
/**
|
||||
* 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)
|
||||
class OSOper : public Module
|
||||
{
|
||||
Command *c;
|
||||
public:
|
||||
OSOper(const std::string &creator) : Module(creator)
|
||||
{
|
||||
Command *c;
|
||||
|
||||
moduleAddAuthor("Anope");
|
||||
moduleAddVersion("$Id$");
|
||||
moduleSetType(CORE);
|
||||
c = createCommand("OPER", do_oper, NULL, OPER_HELP_OPER, -1, -1, -1,
|
||||
-1);
|
||||
c->help_param1 = s_NickServ;
|
||||
moduleAddCommand(OPERSERV, c, MOD_UNIQUE);
|
||||
moduleAddAuthor("Anope");
|
||||
moduleAddVersion("$Id$");
|
||||
moduleSetType(CORE);
|
||||
c = createCommand("OPER", do_oper, NULL, OPER_HELP_OPER, -1, -1, -1, -1);
|
||||
c->help_param1 = s_NickServ;
|
||||
moduleAddCommand(OPERSERV, c, MOD_UNIQUE);
|
||||
|
||||
moduleSetOperHelp(myOperServHelp);
|
||||
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unload the module
|
||||
**/
|
||||
void AnopeFini(void)
|
||||
{
|
||||
|
||||
}
|
||||
moduleSetOperHelp(myOperServHelp);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
@@ -246,4 +233,4 @@ int oper_list_callback(SList * slist, int number, void *item, va_list args)
|
||||
return oper_list(number, (NickCore *)item, u, sent_header);
|
||||
}
|
||||
|
||||
MODULE_INIT("os_oper")
|
||||
MODULE_INIT(OSOper)
|
||||
|
||||
+27
-39
@@ -21,49 +21,38 @@ void myOperServHelp(User * u);
|
||||
int load_config(void);
|
||||
int reload_config(int argc, char **argv);
|
||||
|
||||
/**
|
||||
* 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)
|
||||
class OSOperNews : public Module
|
||||
{
|
||||
EvtHook *hook;
|
||||
char buf[BUFSIZE];
|
||||
public:
|
||||
OSOperNews(const std::string &creator) : Module(creator)
|
||||
{
|
||||
EvtHook *hook;
|
||||
char buf[BUFSIZE];
|
||||
|
||||
moduleAddAuthor("Anope");
|
||||
moduleAddVersion("$Id$");
|
||||
moduleSetType(CORE);
|
||||
moduleAddAuthor("Anope");
|
||||
moduleAddVersion("$Id$");
|
||||
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);
|
||||
snprintf(buf, BUFSIZE, "%d", NewsCount),
|
||||
c->help_param1 = sstrdup(buf);
|
||||
moduleAddCommand(OPERSERV, c, MOD_UNIQUE);
|
||||
/** XXX: 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);
|
||||
snprintf(buf, BUFSIZE, "%d", NewsCount),
|
||||
c->help_param1 = sstrdup(buf);
|
||||
moduleAddCommand(OPERSERV, c, MOD_UNIQUE);
|
||||
|
||||
moduleSetOperHelp(myOperServHelp);
|
||||
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;
|
||||
}
|
||||
hook = createEventHook(EVENT_RELOAD, reload_config);
|
||||
if (moduleAddEventHook(hook) != MOD_ERR_OK)
|
||||
throw ModuleException("os_opernews: Can't hook to EVENT_RELOAD event");
|
||||
}
|
||||
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unload the module
|
||||
**/
|
||||
void AnopeFini(void)
|
||||
{
|
||||
free(c->help_param1);
|
||||
}
|
||||
~OSOperNews()
|
||||
{
|
||||
free(c->help_param1);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
@@ -94,6 +83,5 @@ int reload_config(int argc, char **argv) {
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
/* EOF */
|
||||
|
||||
MODULE_INIT("os_opernews")
|
||||
MODULE_INIT(OSOperNews)
|
||||
|
||||
+14
-27
@@ -18,36 +18,23 @@
|
||||
int do_os_quit(User * u);
|
||||
void myOperServHelp(User * u);
|
||||
|
||||
/**
|
||||
* 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)
|
||||
class OSQuit : public Module
|
||||
{
|
||||
Command *c;
|
||||
public:
|
||||
OSQuit(const std::string &creator) : Module(creator)
|
||||
{
|
||||
Command *c;
|
||||
|
||||
moduleAddAuthor("Anope");
|
||||
moduleAddVersion("$Id$");
|
||||
moduleSetType(CORE);
|
||||
moduleAddAuthor("Anope");
|
||||
moduleAddVersion("$Id$");
|
||||
moduleSetType(CORE);
|
||||
|
||||
c = createCommand("QUIT", do_os_quit, is_services_root,
|
||||
OPER_HELP_QUIT, -1, -1, -1, -1);
|
||||
moduleAddCommand(OPERSERV, c, MOD_UNIQUE);
|
||||
c = createCommand("QUIT", do_os_quit, is_services_root, OPER_HELP_QUIT, -1, -1, -1, -1);
|
||||
moduleAddCommand(OPERSERV, c, MOD_UNIQUE);
|
||||
|
||||
moduleSetOperHelp(myOperServHelp);
|
||||
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unload the module
|
||||
**/
|
||||
void AnopeFini(void)
|
||||
{
|
||||
|
||||
}
|
||||
moduleSetOperHelp(myOperServHelp);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
@@ -81,4 +68,4 @@ int do_os_quit(User * u)
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
MODULE_INIT("os_quit")
|
||||
MODULE_INIT(OSQuit)
|
||||
|
||||
+18
-32
@@ -17,41 +17,27 @@
|
||||
|
||||
void myOperServHelp(User * u);
|
||||
|
||||
/**
|
||||
* 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)
|
||||
class OSRandomNews : public Module
|
||||
{
|
||||
Command *c;
|
||||
public:
|
||||
OSRandomNews(const std::string &creator) : Module(creator)
|
||||
{
|
||||
Command *c;
|
||||
|
||||
moduleAddAuthor("Anope");
|
||||
moduleAddVersion
|
||||
("$Id$");
|
||||
moduleSetType(CORE);
|
||||
moduleAddAuthor("Anope");
|
||||
moduleAddVersion
|
||||
("$Id$");
|
||||
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);
|
||||
/** XXX: 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unload the module
|
||||
**/
|
||||
void AnopeFini(void)
|
||||
{
|
||||
|
||||
}
|
||||
moduleSetOperHelp(myOperServHelp);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
@@ -65,4 +51,4 @@ void myOperServHelp(User * u)
|
||||
}
|
||||
}
|
||||
|
||||
MODULE_INIT("os_randomnews")
|
||||
MODULE_INIT(OSRandomNews)
|
||||
|
||||
+15
-29
@@ -17,38 +17,24 @@
|
||||
|
||||
int do_raw(User * u);
|
||||
|
||||
/**
|
||||
* 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)
|
||||
class OSRaw : public Module
|
||||
{
|
||||
Command *c;
|
||||
public:
|
||||
OSRaw(const std::string &creator) : Module(creator)
|
||||
{
|
||||
Command *c;
|
||||
|
||||
moduleAddAuthor("Anope");
|
||||
moduleAddVersion("$Id$");
|
||||
moduleSetType(THIRD);
|
||||
moduleAddAuthor("Anope");
|
||||
moduleAddVersion("$Id$");
|
||||
moduleSetType(THIRD);
|
||||
|
||||
c = createCommand("RAW", do_raw, is_services_root, OPER_HELP_RAW, -1,
|
||||
-1, -1, -1);
|
||||
moduleAddCommand(OPERSERV, c, MOD_UNIQUE);
|
||||
c = createCommand("RAW", do_raw, is_services_root, OPER_HELP_RAW, -1, -1, -1, -1);
|
||||
moduleAddCommand(OPERSERV, c, MOD_UNIQUE);
|
||||
|
||||
if (DisableRaw) {
|
||||
alog("[os_raw] Unloading because DisableRaw is enabled");
|
||||
return MOD_STOP;
|
||||
}
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unload the module
|
||||
**/
|
||||
void AnopeFini(void)
|
||||
{
|
||||
|
||||
}
|
||||
if (DisableRaw)
|
||||
throw ModuleException("os_raw: Not loading because you probably shouldn't be loading me");
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
@@ -77,4 +63,4 @@ int do_raw(User * u)
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
MODULE_INIT("os_raw")
|
||||
MODULE_INIT(OSRaw)
|
||||
|
||||
+14
-27
@@ -18,36 +18,23 @@
|
||||
int do_reload(User * u);
|
||||
void myOperServHelp(User * u);
|
||||
|
||||
/**
|
||||
* 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)
|
||||
class OSReload : public Module
|
||||
{
|
||||
Command *c;
|
||||
public:
|
||||
OSReload(const std::string &creator) : Module(creator)
|
||||
{
|
||||
Command *c;
|
||||
|
||||
moduleAddAuthor("Anope");
|
||||
moduleAddVersion("$Id$");
|
||||
moduleSetType(CORE);
|
||||
moduleAddAuthor("Anope");
|
||||
moduleAddVersion("$Id$");
|
||||
moduleSetType(CORE);
|
||||
|
||||
c = createCommand("RELOAD", do_reload, is_services_root,
|
||||
OPER_HELP_RELOAD, -1, -1, -1, -1);
|
||||
moduleAddCommand(OPERSERV, c, MOD_UNIQUE);
|
||||
c = createCommand("RELOAD", do_reload, is_services_root, OPER_HELP_RELOAD, -1, -1, -1, -1);
|
||||
moduleAddCommand(OPERSERV, c, MOD_UNIQUE);
|
||||
|
||||
moduleSetOperHelp(myOperServHelp);
|
||||
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unload the module
|
||||
**/
|
||||
void AnopeFini(void)
|
||||
{
|
||||
|
||||
}
|
||||
moduleSetOperHelp(myOperServHelp);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
@@ -83,4 +70,4 @@ int do_reload(User * u)
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
MODULE_INIT("os_reload")
|
||||
MODULE_INIT(OSReload)
|
||||
|
||||
+14
-27
@@ -23,35 +23,22 @@ extern MDE void do_restart_services(void);
|
||||
int do_restart(User * u);
|
||||
void myOperServHelp(User * u);
|
||||
|
||||
/**
|
||||
* 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)
|
||||
class OSRestart : public Module
|
||||
{
|
||||
Command *c;
|
||||
public:
|
||||
OSRestart(const std::string &creator) : Module(creator)
|
||||
{
|
||||
Command *c;
|
||||
|
||||
moduleAddAuthor("Anope");
|
||||
moduleAddVersion("$Id$");
|
||||
moduleSetType(CORE);
|
||||
c = createCommand("RESTART", do_restart, is_services_root,
|
||||
OPER_HELP_RESTART, -1, -1, -1, -1);
|
||||
moduleAddCommand(OPERSERV, c, MOD_UNIQUE);
|
||||
moduleAddAuthor("Anope");
|
||||
moduleAddVersion("$Id$");
|
||||
moduleSetType(CORE);
|
||||
c = createCommand("RESTART", do_restart, is_services_root, OPER_HELP_RESTART, -1, -1, -1, -1);
|
||||
moduleAddCommand(OPERSERV, c, MOD_UNIQUE);
|
||||
|
||||
moduleSetOperHelp(myOperServHelp);
|
||||
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unload the module
|
||||
**/
|
||||
void AnopeFini(void)
|
||||
{
|
||||
|
||||
}
|
||||
moduleSetOperHelp(myOperServHelp);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
@@ -90,4 +77,4 @@ int do_restart(User * u)
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
MODULE_INIT("os_restart")
|
||||
MODULE_INIT(OSRestart)
|
||||
|
||||
+19
-33
@@ -17,42 +17,28 @@
|
||||
|
||||
void myOperServHelp(User * u);
|
||||
|
||||
/**
|
||||
* 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)
|
||||
class OSSession : public Module
|
||||
{
|
||||
Command *c;
|
||||
public:
|
||||
OSSession(const std::string &creator) : Module(creator)
|
||||
{
|
||||
Command *c;
|
||||
|
||||
moduleAddAuthor("Anope");
|
||||
moduleAddVersion("$Id$");
|
||||
moduleSetType(CORE);
|
||||
moduleAddAuthor("Anope");
|
||||
moduleAddVersion("$Id$");
|
||||
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);
|
||||
/**
|
||||
* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unload the module
|
||||
**/
|
||||
void AnopeFini(void)
|
||||
{
|
||||
|
||||
}
|
||||
moduleSetOperHelp(myOperServHelp);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
@@ -67,4 +53,4 @@ void myOperServHelp(User * u)
|
||||
}
|
||||
}
|
||||
|
||||
MODULE_INIT("os_session")
|
||||
MODULE_INIT(OSSession)
|
||||
|
||||
+28
-53
@@ -18,62 +18,37 @@
|
||||
int do_set(User * u);
|
||||
void myOperServHelp(User * u);
|
||||
|
||||
/**
|
||||
* 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)
|
||||
class OSSet : public Module
|
||||
{
|
||||
Command *c;
|
||||
public:
|
||||
OSSet(const std::string &creator) : Module(creator)
|
||||
{
|
||||
Command *c;
|
||||
|
||||
moduleAddAuthor("Anope");
|
||||
moduleAddVersion("$Id$");
|
||||
moduleSetType(CORE);
|
||||
moduleAddAuthor("Anope");
|
||||
moduleAddVersion("$Id$");
|
||||
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
|
||||
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);
|
||||
|
||||
moduleSetOperHelp(myOperServHelp);
|
||||
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unload the module
|
||||
**/
|
||||
void AnopeFini(void)
|
||||
{
|
||||
|
||||
}
|
||||
moduleSetOperHelp(myOperServHelp);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
@@ -263,4 +238,4 @@ int do_set(User * u)
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
MODULE_INIT("os_set")
|
||||
MODULE_INIT(OSSet)
|
||||
|
||||
+17
-29
@@ -25,39 +25,27 @@ int do_sgline(User * u);
|
||||
|
||||
void myOperServHelp(User * u);
|
||||
|
||||
/**
|
||||
* 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)
|
||||
class OSSGLine : public Module
|
||||
{
|
||||
Command *c;
|
||||
public:
|
||||
OSSGLine(const std::string &creator) : Module(creator)
|
||||
{
|
||||
Command *c;
|
||||
|
||||
moduleAddAuthor("Anope");
|
||||
moduleAddVersion("$Id$");
|
||||
moduleSetType(CORE);
|
||||
moduleAddAuthor("Anope");
|
||||
moduleAddVersion("$Id$");
|
||||
moduleSetType(CORE);
|
||||
|
||||
c = createCommand("SGLINE", do_sgline, is_services_oper,
|
||||
OPER_HELP_SGLINE, -1, -1, -1, -1);
|
||||
moduleAddCommand(OPERSERV, c, MOD_UNIQUE);
|
||||
c = createCommand("SGLINE", do_sgline, is_services_oper,
|
||||
OPER_HELP_SGLINE, -1, -1, -1, -1);
|
||||
moduleAddCommand(OPERSERV, c, MOD_UNIQUE);
|
||||
|
||||
moduleSetOperHelp(myOperServHelp);
|
||||
moduleSetOperHelp(myOperServHelp);
|
||||
|
||||
if (!ircd->sgline) {
|
||||
return MOD_STOP;
|
||||
}
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unload the module
|
||||
**/
|
||||
void AnopeFini(void)
|
||||
{
|
||||
|
||||
}
|
||||
if (!ircd->sgline)
|
||||
throw ModuleException("Your IRCd does not support SGLine");
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
@@ -361,4 +349,4 @@ int sgline_list_callback(SList * slist, int number, void *item,
|
||||
return sgline_list(number, (SXLine *)item, u, sent_header);
|
||||
}
|
||||
|
||||
MODULE_INIT("os_sgline")
|
||||
MODULE_INIT(OSSGLine)
|
||||
|
||||
+14
-27
@@ -18,36 +18,23 @@
|
||||
int do_shutdown(User * u);
|
||||
void myOperServHelp(User * u);
|
||||
|
||||
/**
|
||||
* 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)
|
||||
class OSShutdown : public Module
|
||||
{
|
||||
Command *c;
|
||||
public:
|
||||
OSShutdown(const std::string &creator) : Module(creator)
|
||||
{
|
||||
Command *c;
|
||||
|
||||
moduleAddAuthor("Anope");
|
||||
moduleAddVersion("$Id$");
|
||||
moduleSetType(CORE);
|
||||
moduleAddAuthor("Anope");
|
||||
moduleAddVersion("$Id$");
|
||||
moduleSetType(CORE);
|
||||
|
||||
c = createCommand("SHUTDOWN", do_shutdown, is_services_root,
|
||||
OPER_HELP_SHUTDOWN, -1, -1, -1, -1);
|
||||
moduleAddCommand(OPERSERV, c, MOD_UNIQUE);
|
||||
c = createCommand("SHUTDOWN", do_shutdown, is_services_root, OPER_HELP_SHUTDOWN, -1, -1, -1, -1);
|
||||
moduleAddCommand(OPERSERV, c, MOD_UNIQUE);
|
||||
|
||||
moduleSetOperHelp(myOperServHelp);
|
||||
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unload the module
|
||||
**/
|
||||
void AnopeFini(void)
|
||||
{
|
||||
|
||||
}
|
||||
moduleSetOperHelp(myOperServHelp);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
@@ -82,4 +69,4 @@ int do_shutdown(User * u)
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
MODULE_INIT("os_shutdown")
|
||||
MODULE_INIT(OSShutdown)
|
||||
|
||||
+17
-29
@@ -25,38 +25,26 @@ int sqline_list(int number, SXLine * sx, User * u, int *sent_header);
|
||||
|
||||
void myOperServHelp(User * u);
|
||||
|
||||
/**
|
||||
* 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)
|
||||
class OSSQLine : public Module
|
||||
{
|
||||
Command *c;
|
||||
public:
|
||||
OSSQLine(const std::string &creator) : Module(creator)
|
||||
{
|
||||
Command *c;
|
||||
|
||||
moduleAddAuthor("Anope");
|
||||
moduleAddVersion("$Id$");
|
||||
moduleSetType(CORE);
|
||||
moduleAddAuthor("Anope");
|
||||
moduleAddVersion("$Id$");
|
||||
moduleSetType(CORE);
|
||||
|
||||
c = createCommand("SQLINE", do_sqline, is_services_oper,
|
||||
OPER_HELP_SQLINE, -1, -1, -1, -1);
|
||||
moduleAddCommand(OPERSERV, c, MOD_UNIQUE);
|
||||
c = createCommand("SQLINE", do_sqline, is_services_oper,
|
||||
OPER_HELP_SQLINE, -1, -1, -1, -1);
|
||||
moduleAddCommand(OPERSERV, c, MOD_UNIQUE);
|
||||
|
||||
moduleSetOperHelp(myOperServHelp);
|
||||
if (!ircd->sqline) {
|
||||
return MOD_STOP;
|
||||
}
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unload the module
|
||||
**/
|
||||
void AnopeFini(void)
|
||||
{
|
||||
|
||||
}
|
||||
moduleSetOperHelp(myOperServHelp);
|
||||
if (!ircd->sqline)
|
||||
throw ModuleException("Your IRCd does not support QLines.");
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
@@ -354,4 +342,4 @@ int sqline_list_callback(SList * slist, int number, void *item,
|
||||
return sqline_list(number, (SXLine *)item, u, sent_header);
|
||||
}
|
||||
|
||||
MODULE_INIT("os_sqline")
|
||||
MODULE_INIT(OSSQLine)
|
||||
|
||||
+14
-27
@@ -21,36 +21,23 @@ int opers_list_callback(SList * slist, int number, void *item,
|
||||
va_list args);
|
||||
int opers_list(int number, NickCore * nc, User * u, char *level);
|
||||
|
||||
/**
|
||||
* 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)
|
||||
class OSStaff : public Module
|
||||
{
|
||||
Command *c;
|
||||
public:
|
||||
OSStaff(const std::string &creator) : Module(creator)
|
||||
{
|
||||
Command *c;
|
||||
|
||||
moduleAddAuthor("Anope");
|
||||
moduleAddVersion("$Id$");
|
||||
moduleSetType(CORE);
|
||||
moduleAddAuthor("Anope");
|
||||
moduleAddVersion("$Id$");
|
||||
moduleSetType(CORE);
|
||||
|
||||
c = createCommand("STAFF", do_staff, NULL, OPER_HELP_STAFF, -1, -1,
|
||||
-1, -1);
|
||||
moduleAddCommand(OPERSERV, c, MOD_UNIQUE);
|
||||
c = createCommand("STAFF", do_staff, NULL, OPER_HELP_STAFF, -1, -1, -1, -1);
|
||||
moduleAddCommand(OPERSERV, c, MOD_UNIQUE);
|
||||
|
||||
moduleSetOperHelp(myOperServHelp);
|
||||
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unload the module
|
||||
**/
|
||||
void AnopeFini(void)
|
||||
{
|
||||
|
||||
}
|
||||
moduleSetOperHelp(myOperServHelp);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
@@ -155,4 +142,4 @@ int opers_list(int number, NickCore * nc, User * u, char *level)
|
||||
return 1;
|
||||
}
|
||||
|
||||
MODULE_INIT("os_staff")
|
||||
MODULE_INIT(OSStaff)
|
||||
|
||||
+16
-30
@@ -21,39 +21,25 @@ int do_stats(User * u);
|
||||
void get_operserv_stats(long *nrec, long *memuse);
|
||||
void myOperServHelp(User * u);
|
||||
|
||||
/**
|
||||
* 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)
|
||||
class OSStats : public Module
|
||||
{
|
||||
Command *c;
|
||||
public:
|
||||
OSStats(const std::string &creator) : Module(creator)
|
||||
{
|
||||
Command *c;
|
||||
|
||||
moduleAddAuthor("Anope");
|
||||
moduleAddVersion("$Id$");
|
||||
moduleSetType(CORE);
|
||||
moduleAddAuthor("Anope");
|
||||
moduleAddVersion("$Id$");
|
||||
moduleSetType(CORE);
|
||||
|
||||
c = createCommand("STATS", do_stats, NULL, OPER_HELP_STATS,
|
||||
-1, -1, -1, -1);
|
||||
moduleAddCommand(OPERSERV, c, MOD_UNIQUE);
|
||||
c = createCommand("UPTIME", do_stats, NULL,
|
||||
OPER_HELP_STATS, -1, -1, -1, -1);
|
||||
moduleAddCommand(OPERSERV, c, MOD_UNIQUE);
|
||||
c = createCommand("STATS", do_stats, NULL, OPER_HELP_STATS, -1, -1, -1, -1);
|
||||
moduleAddCommand(OPERSERV, c, MOD_UNIQUE);
|
||||
c = createCommand("UPTIME", do_stats, NULL, OPER_HELP_STATS, -1, -1, -1, -1);
|
||||
moduleAddCommand(OPERSERV, c, MOD_UNIQUE);
|
||||
|
||||
moduleSetOperHelp(myOperServHelp);
|
||||
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unload the module
|
||||
**/
|
||||
void AnopeFini(void)
|
||||
{
|
||||
|
||||
}
|
||||
moduleSetOperHelp(myOperServHelp);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
@@ -452,4 +438,4 @@ void get_operserv_stats(long *nrec, long *memuse)
|
||||
*memuse = mem;
|
||||
}
|
||||
|
||||
MODULE_INIT("os_stats")
|
||||
MODULE_INIT(OSStats)
|
||||
|
||||
+17
-29
@@ -18,38 +18,26 @@
|
||||
int do_svsnick(User * u);
|
||||
void myOperServHelp(User * u);
|
||||
|
||||
/**
|
||||
* 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)
|
||||
class OSSVSNick : public Module
|
||||
{
|
||||
Command *c;
|
||||
public:
|
||||
OSSVSNick(const std::string &creator) : Module(creator)
|
||||
{
|
||||
Command *c;
|
||||
|
||||
moduleAddAuthor("Anope");
|
||||
moduleAddVersion("$Id$");
|
||||
moduleSetType(CORE);
|
||||
moduleAddAuthor("Anope");
|
||||
moduleAddVersion("$Id$");
|
||||
moduleSetType(CORE);
|
||||
|
||||
c = createCommand("SVSNICK", do_svsnick, is_services_root,
|
||||
OPER_HELP_SVSNICK, -1, -1, -1, -1);
|
||||
moduleAddCommand(OPERSERV, c, MOD_UNIQUE);
|
||||
c = createCommand("SVSNICK", do_svsnick, is_services_root,
|
||||
OPER_HELP_SVSNICK, -1, -1, -1, -1);
|
||||
moduleAddCommand(OPERSERV, c, MOD_UNIQUE);
|
||||
|
||||
moduleSetOperHelp(myOperServHelp);
|
||||
if (!ircd->svsnick) {
|
||||
return MOD_STOP;
|
||||
}
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unload the module
|
||||
**/
|
||||
void AnopeFini(void)
|
||||
{
|
||||
|
||||
}
|
||||
moduleSetOperHelp(myOperServHelp);
|
||||
if (!ircd->svsnick)
|
||||
throw ModuleException("Your IRCd does not support SVSNICK");
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
@@ -124,4 +112,4 @@ int do_svsnick(User * u)
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
MODULE_INIT("os_svsnick")
|
||||
MODULE_INIT(OSSVSNick)
|
||||
|
||||
+17
-29
@@ -24,38 +24,26 @@ int szline_list_callback(SList * slist, int number, void *item,
|
||||
int szline_view(int number, SXLine * sx, User * u, int *sent_header);
|
||||
int szline_list(int number, SXLine * sx, User * u, int *sent_header);
|
||||
|
||||
/**
|
||||
* 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)
|
||||
class OSSZLine : public Module
|
||||
{
|
||||
Command *c;
|
||||
public:
|
||||
OSSZLine(const std::string &creator) : Module(creator)
|
||||
{
|
||||
Command *c;
|
||||
|
||||
moduleAddAuthor("Anope");
|
||||
moduleAddVersion("$Id$");
|
||||
moduleSetType(CORE);
|
||||
moduleAddAuthor("Anope");
|
||||
moduleAddVersion("$Id$");
|
||||
moduleSetType(CORE);
|
||||
|
||||
c = createCommand("SZLINE", do_szline, is_services_oper,
|
||||
OPER_HELP_SZLINE, -1, -1, -1, -1);
|
||||
moduleAddCommand(OPERSERV, c, MOD_UNIQUE);
|
||||
c = createCommand("SZLINE", do_szline, is_services_oper,
|
||||
OPER_HELP_SZLINE, -1, -1, -1, -1);
|
||||
moduleAddCommand(OPERSERV, c, MOD_UNIQUE);
|
||||
|
||||
moduleSetOperHelp(myOperServHelp);
|
||||
if (!ircd->szline) {
|
||||
return MOD_STOP;
|
||||
}
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unload the module
|
||||
**/
|
||||
void AnopeFini(void)
|
||||
{
|
||||
|
||||
}
|
||||
moduleSetOperHelp(myOperServHelp);
|
||||
if (!ircd->szline)
|
||||
throw ModuleException("Your IRCd does not support ZLINEs");
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
@@ -349,4 +337,4 @@ int szline_list(int number, SXLine * sx, User * u, int *sent_header)
|
||||
return 1;
|
||||
}
|
||||
|
||||
MODULE_INIT("os_szline")
|
||||
MODULE_INIT(OSSZLine)
|
||||
|
||||
+16
-21
@@ -18,31 +18,26 @@
|
||||
int do_operumodes(User * u);
|
||||
void myOperServHelp(User * u);
|
||||
|
||||
/**
|
||||
* 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)
|
||||
class OSUMode : public Module
|
||||
{
|
||||
Command *c;
|
||||
public:
|
||||
OSUMode(const std::string &creator) : Module(creator)
|
||||
{
|
||||
Command *c;
|
||||
|
||||
moduleAddAuthor("Anope");
|
||||
moduleAddVersion("$Id$");
|
||||
moduleSetType(CORE);
|
||||
moduleAddAuthor("Anope");
|
||||
moduleAddVersion("$Id$");
|
||||
moduleSetType(CORE);
|
||||
|
||||
c = createCommand("UMODE", do_operumodes, is_services_root,
|
||||
OPER_HELP_UMODE, -1, -1, -1, -1);
|
||||
moduleAddCommand(OPERSERV, c, MOD_UNIQUE);
|
||||
c = createCommand("UMODE", do_operumodes, is_services_root, OPER_HELP_UMODE, -1, -1, -1, -1);
|
||||
moduleAddCommand(OPERSERV, c, MOD_UNIQUE);
|
||||
|
||||
moduleSetOperHelp(myOperServHelp);
|
||||
moduleSetOperHelp(myOperServHelp);
|
||||
|
||||
if (!ircd->umode) {
|
||||
return MOD_STOP;
|
||||
}
|
||||
return MOD_CONT;
|
||||
}
|
||||
if (!ircd->umode)
|
||||
throw ModuleException("Your IRCd does not support setting umodes");
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Unload the module
|
||||
@@ -115,4 +110,4 @@ int do_operumodes(User * u)
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
MODULE_INIT("os_umode")
|
||||
MODULE_INIT(OSUMode)
|
||||
|
||||
+14
-27
@@ -18,36 +18,23 @@
|
||||
int do_update(User * u);
|
||||
void myOperServHelp(User * u);
|
||||
|
||||
/**
|
||||
* 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)
|
||||
class OSUpdate : public Module
|
||||
{
|
||||
Command *c;
|
||||
public:
|
||||
OSUpdate(const std::string &creator) : Module(creator)
|
||||
{
|
||||
Command *c;
|
||||
|
||||
moduleAddAuthor("Anope");
|
||||
moduleAddVersion("$Id$");
|
||||
moduleSetType(CORE);
|
||||
moduleAddAuthor("Anope");
|
||||
moduleAddVersion("$Id$");
|
||||
moduleSetType(CORE);
|
||||
|
||||
c = createCommand("UPDATE", do_update, is_services_root,
|
||||
OPER_HELP_UPDATE, -1, -1, -1, -1);
|
||||
moduleAddCommand(OPERSERV, c, MOD_UNIQUE);
|
||||
c = createCommand("UPDATE", do_update, is_services_root, OPER_HELP_UPDATE, -1, -1, -1, -1);
|
||||
moduleAddCommand(OPERSERV, c, MOD_UNIQUE);
|
||||
|
||||
moduleSetOperHelp(myOperServHelp);
|
||||
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unload the module
|
||||
**/
|
||||
void AnopeFini(void)
|
||||
{
|
||||
|
||||
}
|
||||
moduleSetOperHelp(myOperServHelp);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
@@ -73,4 +60,4 @@ int do_update(User * u)
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
MODULE_INIT("os_update")
|
||||
MODULE_INIT(OSUpdate)
|
||||
|
||||
+14
-27
@@ -23,36 +23,23 @@ extern MDE int anope_get_invis_mode();
|
||||
int do_userlist(User * u);
|
||||
void myOperServHelp(User * u);
|
||||
|
||||
/**
|
||||
* 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)
|
||||
class OSUserList : public Module
|
||||
{
|
||||
Command *c;
|
||||
public:
|
||||
OSUserList(const std::string &creator) : Module(creator)
|
||||
{
|
||||
Command *c;
|
||||
|
||||
moduleAddAuthor("Anope");
|
||||
moduleAddVersion("$Id$");
|
||||
moduleSetType(CORE);
|
||||
moduleAddAuthor("Anope");
|
||||
moduleAddVersion("$Id$");
|
||||
moduleSetType(CORE);
|
||||
|
||||
c = createCommand("USERLIST", do_userlist, NULL,
|
||||
OPER_HELP_USERLIST, -1, -1, -1, -1);
|
||||
moduleAddCommand(OPERSERV, c, MOD_UNIQUE);
|
||||
c = createCommand("USERLIST", do_userlist, NULL, OPER_HELP_USERLIST, -1, -1, -1, -1);
|
||||
moduleAddCommand(OPERSERV, c, MOD_UNIQUE);
|
||||
|
||||
moduleSetOperHelp(myOperServHelp);
|
||||
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unload the module
|
||||
**/
|
||||
void AnopeFini(void)
|
||||
{
|
||||
|
||||
}
|
||||
moduleSetOperHelp(myOperServHelp);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
@@ -120,4 +107,4 @@ int do_userlist(User * u)
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
MODULE_INIT("os_userlist")
|
||||
MODULE_INIT(OSUserList)
|
||||
|
||||
Reference in New Issue
Block a user