From 47ab94b498ecec4a971d8072f45321a2fe1bedbd Mon Sep 17 00:00:00 2001 From: Michael Poole Date: Wed, 5 Apr 2006 02:02:21 +0000 Subject: [PATCH] Fix hostmask error from last year's patch-28. src/proto-common.c (generate_hostmask): When generating a strict hostmask not by IP, we should keep the original hostname. git-archimport-id: srvx@srvx.net--2006/srvx--devo--1.3--patch-9 --- ChangeLog | 14 ++++++++++++++ src/proto-common.c | 5 +++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index aea3d18..dec79b3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,20 @@ # arch-tag: automatic-ChangeLog--srvx@srvx.net--2006/srvx--devo--1.3 # +2006-04-05 02:02:21 GMT Michael Poole patch-9 + + Summary: + Fix hostmask error from last year's patch-28. + Revision: + srvx--devo--1.3--patch-9 + + src/proto-common.c (generate_hostmask): When generating a strict hostmask + not by IP, we should keep the original hostname. + + modified files: + ChangeLog src/proto-common.c + + 2006-04-05 01:59:54 GMT Michael Poole patch-8 Summary: diff --git a/src/proto-common.c b/src/proto-common.c index 6ddd23f..bd392e0 100644 --- a/src/proto-common.c +++ b/src/proto-common.c @@ -694,8 +694,9 @@ generate_hostmask(struct userNode *user, int options) } else if (IsHiddenHost(user) && user->handle_info && hidden_host_suffix && !(options & GENMASK_NO_HIDING)) { hostname = alloca(strlen(user->handle_info->handle) + strlen(hidden_host_suffix) + 2); sprintf(hostname, "%s.%s", user->handle_info->handle, hidden_host_suffix); - } else if (options & GENMASK_STRICT_HOST && options & GENMASK_BYIP) { - hostname = (char*)irc_ntoa(&user->ip); + } else if (options & GENMASK_STRICT_HOST) { + if (options & GENMASK_BYIP) + hostname = (char*)irc_ntoa(&user->ip); } else if ((options & GENMASK_BYIP) || irc_pton(&ip, NULL, hostname)) { /* Should generate an IP-based hostmask. */ hostname = alloca(IRC_NTOP_MAX_SIZE); -- 2.20.1