diff options
author | Adam <Adam@anope.org> | 2011-05-30 19:48:14 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2011-05-30 19:48:14 -0400 |
commit | a11155551efd475ac511313963b878992d2de73b (patch) | |
tree | 8d54d33d065d20dd79a07cb28e142509d39589d9 | |
parent | d45222798b17795d25bf42a203af5a689845262c (diff) |
Bug #1273 - Fixed removing vhosts on InspIRCd when m_cloaking is unloaded
-rw-r--r-- | Changes | 1 | ||||
-rw-r--r-- | src/protocol/inspircd12.c | 15 | ||||
-rw-r--r-- | src/protocol/inspircd20.c | 14 | ||||
-rw-r--r-- | version.log | 5 |
4 files changed, 28 insertions, 7 deletions
@@ -1,5 +1,6 @@ Anope Version 1.8 - GIT ----------------------- +05/30 F Fixed removing vhosts on InspIRCd when m_cloaking is unloaded [#1273] Anope Version 1.8.6 diff --git a/src/protocol/inspircd12.c b/src/protocol/inspircd12.c index e53ac735e..01703baed 100644 --- a/src/protocol/inspircd12.c +++ b/src/protocol/inspircd12.c @@ -426,6 +426,7 @@ static int has_blockcaps = 0; static int has_nickflood = 0; static int has_chanfilter = 0; static int has_kicknorejoin = 0; +static int has_cloaking = 0; void inspircd_set_umode(User *user, int ac, char **av) { @@ -575,8 +576,15 @@ void inspircd_cmd_topic(char *whosets, char *chan, char *whosetit, void inspircd_cmd_vhost_off(User * u) { - common_svsmode(u, "-x", NULL); - common_svsmode(u, "+x", NULL); + if (has_cloaking) + { + common_svsmode(u, "-x", NULL); + common_svsmode(u, "+x", NULL); + } + else + { + inspircd_cmd_chghost(u->nick, u->host); + } if (has_chgidentmod && u->username && u->vident && strcmp(u->username, u->vident) != 0) { @@ -1999,6 +2007,9 @@ int anope_event_capab(char *source, int ac, char **av) if (strstr(av[1], "m_kicknorejoin.so")) { has_kicknorejoin = 1; } + if (strstr(av[1], "m_cloaking.so")) { + has_cloaking = 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"); diff --git a/src/protocol/inspircd20.c b/src/protocol/inspircd20.c index d0239ef1c..969ad4a94 100644 --- a/src/protocol/inspircd20.c +++ b/src/protocol/inspircd20.c @@ -473,6 +473,7 @@ static int has_chghostmod = 0; static int has_chgidentmod = 0; static int has_servprotectmod = 0; static int has_hidechansmod = 0; +static int has_cloaking = 0; void inspircd_set_umode(User *user, int ac, char **av) { @@ -622,8 +623,15 @@ void inspircd_cmd_topic(char *whosets, char *chan, char *whosetit, void inspircd_cmd_vhost_off(User * u) { - common_svsmode(u, "-x", NULL); - common_svsmode(u, "+x", NULL); + if (has_cloaking) + { + common_svsmode(u, "-x", NULL); + common_svsmode(u, "+x", NULL); + } + else + { + inspircd_cmd_chghost(u->nick, u->host); + } if (has_chgidentmod && u->username && u->vident && strcmp(u->username, u->vident) != 0) { @@ -1915,6 +1923,8 @@ int anope_event_capab(char *source, int ac, char **av) } else if (strcasecmp(av[0], "MODULES") == 0) { if (strstr(av[1], "m_svshold.so")) ircd->svshold = 1; + if (strstr(av[1], "m_cloaking.so")) + has_cloaking = 1; } else if (strcasecmp(av[0], "CHANMODES") == 0) { char **argv; int argc = split_buf(av[1], &argv, 1); diff --git a/version.log b/version.log index 4257d58da..1e05c274a 100644 --- a/version.log +++ b/version.log @@ -8,11 +8,10 @@ VERSION_MAJOR="1" VERSION_MINOR="8" VERSION_PATCH="7" VERSION_EXTRA="-git" -VERSION_BUILD="3073" +VERSION_BUILD="3074" # $Log$ # Changes since 1.8.6 Release - - +#Revision 3074 - Bug #1273 - Fixed removing vhosts on InspIRCd when m_cloaking is unloaded |