summaryrefslogtreecommitdiff
path: root/src/protocol/inspircd20.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/protocol/inspircd20.c')
-rw-r--r--src/protocol/inspircd20.c14
1 files changed, 12 insertions, 2 deletions
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);