Fix hostmask error from last year's patch-28.
authorMichael Poole <mdpoole@troilus.org>
Wed, 5 Apr 2006 02:02:21 +0000 (02:02 +0000)
committerMichael Poole <mdpoole@troilus.org>
Wed, 5 Apr 2006 02:02:21 +0000 (02:02 +0000)
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
src/proto-common.c

index aea3d18635439379c7f2d3d2359917d5b6def26e..dec79b3f5656d4f90610f74f8110b9e6f975a364 100644 (file)
--- 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 <mdpoole@troilus.org>     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 <mdpoole@troilus.org>     patch-8
 
     Summary:
index 6ddd23f4a7b1bb6e5f29d9bd65ad1888658b78c7..bd392e0f3eaa845039e05ef6db0027d99571ff4e 100644 (file)
@@ -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);