summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864>2010-06-15 17:04:10 +0000
committerAdam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864>2010-06-15 17:04:10 +0000
commit3bf6cdb6ac0f02950cc67334f9a1a35e7f121158 (patch)
tree8d72e8b4f15a480a4acb9f095ce2739349e81352
parentc01f8cad22a72bf1a70bf77afe841a6ba60c73fe (diff)
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
-rw-r--r--src/protocol/unreal32.c11
-rw-r--r--src/users.c7
-rw-r--r--version.log2
3 files changed, 9 insertions, 11 deletions
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;
}
diff --git a/src/users.c b/src/users.c
index e55a68696..fac248dbb 100644
--- a/src/users.c
+++ b/src/users.c
@@ -636,13 +636,6 @@ User *do_nick(const char *source, char *nick, char *username, char *host,
user->realname = sstrdup(realname);
user->timestamp = ts;
user->my_signon = time(NULL);
- /* Initially set both the vhost and cloaked host to the users cloaked host, vhost will be changed
- * later if they get a real vhost, chost however should *never* be changed to anything else.
- * It is possible that on most IRCds (Unreal) a server splits and then comes back, reintroducing clients
- * with a vhost (not a cloaked host) and never informing Anope about the real cloaked host. For now I'm
- * leaving this open (we should prboably request a USERHOST or so) as this won't occur that much, and any
- * fixes to this problem are ugly. - Adam
- */
user->chost = vhost ? sstrdup(vhost) : sstrdup(host);
user->vhost = vhost ? sstrdup(vhost) : sstrdup(host);
if (uid) {
diff --git a/version.log b/version.log
index 02aa9fd23..b868980c6 100644
--- a/version.log
+++ b/version.log
@@ -9,7 +9,7 @@ VERSION_MAJOR="1"
VERSION_MINOR="8"
VERSION_PATCH="4"
VERSION_EXTRA="-svn"
-VERSION_BUILD="3000"
+VERSION_BUILD="3003"
# $Log$ # Changes since the 1.8.4 Release
#Revision 3000 - Never unset mod_current_module in functions that modules might call, instead save the old values and reset them