]> jfr.im git - irc/evilnet/x3.git/commitdiff
Added basic support to X3 for host hiding style 3
authorMatthew Beeching <redacted>
Tue, 18 Jun 2013 12:31:34 +0000 (13:31 +0100)
committerMatthew Beeching <redacted>
Tue, 18 Jun 2013 12:31:34 +0000 (13:31 +0100)
src/nickserv.c
src/proto-common.c
src/proto-p10.c

index 1ce3be7d5b7e119d883e012535e4a5f917fcf3ed..fdd1d53baa7f19dfeae17a7320f472b325c2085a 100644 (file)
@@ -969,7 +969,7 @@ generate_fakehost(struct handle_info *handle)
         if (data)
             style = atoi(data);
 
-        if (style == 1)
+        if ((style == 1) || (style == 3))
             snprintf(buffer, sizeof(buffer), "%s.%s", handle->handle, hidden_host_suffix);
         else if (style == 2) {
             /* Due to the way fakehost is coded theres no way i can
index 92d797492eb9ccb42f1c99ebb5e952b0485de2ae..3505f5ecb0c96dd3d9b755360a531fd03c432439 100644 (file)
@@ -904,10 +904,10 @@ generate_hostmask(struct userNode *user, int options)
         if (data)
             style = atoi(data);
 
-        if ((style == 1) && user->handle_info && hidden_host_suffix && !(options & GENMASK_NO_HIDING)) {
+        if (((style == 1) || (style == 3)) && 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 ((style == 2) && !(options & GENMASK_NO_HIDING)) {
+        } else if (((style == 2) || (style == 3)) && !(options & GENMASK_NO_HIDING)) {
             hostname = alloca(strlen(user->crypthost));
             sprintf(hostname, "%s", user->crypthost);
         }
index 8909ea84fe8d5ee3f6c56939e64db6cc4ed4321f..f3cd0f9bf568dd8fb552ea1d0d4e0100715fd7c1 100644 (file)
@@ -1131,9 +1131,9 @@ irc_topic(struct userNode *service, struct userNode *who, struct chanNode *what,
               safestrncpy(sident, who->ident, sizeof(shost));
 
           safestrncpy(shost, host, sizeof(shost));
-      } else if (IsHiddenHost(who) && (hhtype == 1) && who->handle_info && hhstr) {
+      } else if (IsHiddenHost(who) && ((hhtype == 1) || (hhtype == 3)) && who->handle_info && hhstr) {
           snprintf(shost, sizeof(shost), "%s.%s", who->handle_info->handle, hhstr);
-      } else if (IsHiddenHost(who) && (hhtype == 2) && who->crypthost[0]) {
+      } else if (IsHiddenHost(who) && ((hhtype == 2) || (hhtype == 3)) && who->crypthost[0]) {
           safestrncpy(shost, who->crypthost, sizeof(shost));
       } else
           safestrncpy(shost, who->hostname, sizeof(shost));