diff options
author | cyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864> | 2009-02-23 02:49:54 +0000 |
---|---|---|
committer | cyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864> | 2009-02-23 02:49:54 +0000 |
commit | ab6ee16aa24ea1b620102c07c33d4e014b16e4d9 (patch) | |
tree | ff7b057aeded2637065b976fb6cac4493fd4dbc3 /src | |
parent | 48560524a3bdb82c6f2591ac52ad0e1af3d1ce39 (diff) |
Updated inspircd11 module to look for m_hidechans.so module and updated inspircd12 module to also look for that module as well as error if m_globops.so isn't loaded.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2130 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src')
-rw-r--r-- | src/protocol/inspircd11.c | 28 | ||||
-rw-r--r-- | src/protocol/inspircd12.cpp | 20 |
2 files changed, 38 insertions, 10 deletions
diff --git a/src/protocol/inspircd11.c b/src/protocol/inspircd11.c index e95b5f795..0195768de 100644 --- a/src/protocol/inspircd11.c +++ b/src/protocol/inspircd11.c @@ -400,16 +400,13 @@ CUMode myCumodes[128] = { static int has_servicesmod = 0; static int has_globopsmod = 0; - -/* These are sanity checks to insure we are supported. - The ircd tends to /squit us if we issue unsupported cmds. - - katsklaw */ static int has_svsholdmod = 0; static int has_chghostmod = 0; static int has_chgidentmod = 0; static int has_messagefloodmod = 0; static int has_banexceptionmod = 0; static int has_inviteexceptionmod = 0; +static int has_hidechansmod = 0; /* CHGHOST */ @@ -1154,6 +1151,10 @@ int anope_event_capab(const char *source, int ac, const char **av) has_svsholdmod = 0; has_chghostmod = 0; has_chgidentmod = 0; + has_messagefloodmod = 0; + has_banexceptionmod = 0; + has_inviteexceptionmod = 0; + has_hidechansmod = 0; } else if (strcasecmp(av[0], "MODULES") == 0) { if (strstr(av[1], "m_globops.so")) { @@ -1180,18 +1181,25 @@ int anope_event_capab(const char *source, int ac, const char **av) if (strstr(av[1], "m_inviteexception.so")) { has_inviteexceptionmod = 1; } + if (strstr(av[1], "m_hidechans.so")) { + has_hidechansmod = 0; + } } else if (strcasecmp(av[0], "END") == 0) { if (!has_globopsmod) { - send_cmd(NULL, - "ERROR :m_globops is not loaded. This is required by Anope"); - quitmsg = "Remote server does not have the m_globops module loaded, and this is required."; + send_cmd(NULL, "ERROR :m_globops is not loaded. This is required by Anope"); + quitmsg = "ERROR: Remote server does not have the m_globops module loaded, and this is required."; quitting = 1; return MOD_STOP; } if (!has_servicesmod) { - send_cmd(NULL, - "ERROR :m_services is not loaded. This is required by Anope"); - quitmsg = "Remote server does not have the m_services module loaded, and this is required."; + send_cmd(NULL, "ERROR :m_services is not loaded. This is required by Anope"); + quitmsg = "ERROR: Remote server does not have the m_services module loaded, and this is required."; + quitting = 1; + return MOD_STOP; + } + if (!has_hidechansmod) { + send_cmd(NULL, "ERROR :m_hidechans.so is not loaded. This is required by Anope"); + quitmsg = "ERROR: Remote server deos not have the m_hidechans module loaded, and this is required."; quitting = 1; return MOD_STOP; } diff --git a/src/protocol/inspircd12.cpp b/src/protocol/inspircd12.cpp index cc5bddb41..f7be33fab 100644 --- a/src/protocol/inspircd12.cpp +++ b/src/protocol/inspircd12.cpp @@ -406,6 +406,7 @@ static int has_chgidentmod = 0; static int has_messagefloodmod = 0; static int has_banexceptionmod = 0; static int has_inviteexceptionmod = 0; +static int has_hidechansmod = 0; /* CHGHOST */ @@ -1207,6 +1208,10 @@ int anope_event_capab(const char *source, int ac, const char **av) has_svsholdmod = 0; has_chghostmod = 0; has_chgidentmod = 0; + has_messagefloodmod = 0; + has_banexceptionmod = 0; + has_inviteexceptionmod = 0; + has_hidechansmod = 0; } else if (strcasecmp(av[0], "MODULES") == 0) { if (strstr(av[1], "m_globops.so")) { @@ -1233,13 +1238,28 @@ int anope_event_capab(const char *source, int ac, const char **av) if (strstr(av[1], "m_inviteexception.so")) { has_inviteexceptionmod = 1; } + if (strstr(av[1], "m_hidechans.so")) { + has_hidechansmod = 1; + } } else if (strcasecmp(av[0], "END") == 0) { + if (!has_globopsmod) { + send_cmd(NULL, "ERROR :m_globops is not loaded. This is required by Anope"); + quitmsg = "Remote server does not have the m_globops module loaded, and this is required."; + quitting = 1; + return MOD_STOP; + } if (!has_servicesmod) { send_cmd(NULL, "ERROR :m_services_account.so is not loaded. This is required by Anope"); quitmsg = "ERROR: Remote server does not have the m_services_account module loaded, and this is required."; quitting = 1; return MOD_STOP; } + if (!has_hidechansmod) { + send_cmd(NULL, "ERROR :m_hidechans.so is not loaded. This is required by Anope"); + quitmsg = "ERROR: Remote server deos not have the m_hidechans module loaded, and this is required."; + quitting = 1; + return MOD_STOP; + } if (!has_svsholdmod) { ircdproto->SendGlobops(s_OperServ, "SVSHOLD missing, Usage disabled until module is loaded."); } |