From 3bf6cdb6ac0f02950cc67334f9a1a35e7f121158 Mon Sep 17 00:00:00 2001 From: Adam- Date: Tue, 15 Jun 2010 17:04:10 +0000 Subject: Grab users cloaked hosts on Unreal after setting +x, fixes us never knowing cloaked hosts if the user is introduced with a vhost git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/stable@3003 5417fbe8-f217-4b02-8779-1006273d7864 --- src/protocol/unreal32.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/protocol') diff --git a/src/protocol/unreal32.c b/src/protocol/unreal32.c index 8ecfc90e9..77c618184 100644 --- a/src/protocol/unreal32.c +++ b/src/protocol/unreal32.c @@ -489,8 +489,7 @@ void unreal_set_umode(User * user, int ac, char **av) } break; case 'x': - if (!add) - { + if (!add) { if (user->vhost) free(user->vhost); user->vhost = NULL; @@ -1403,7 +1402,13 @@ int anope_event_sethost(char *source, int ac, char **av) return MOD_CONT; } - change_user_host(u, av[0]); + if (u->mode & UMODE_x) + change_user_host(u, av[0]); + else { + if (u->chost) + free(u->chost); + u->chost = sstrdup(av[0]); + } return MOD_CONT; } -- cgit