]> jfr.im git - irc/freenode/ircd-seven.git/commitdiff
Add auspex:hostname
authorEd Kellett <redacted>
Sat, 3 Aug 2019 02:03:09 +0000 (03:03 +0100)
committerEd Kellett <redacted>
Tue, 4 Aug 2020 21:58:30 +0000 (22:58 +0100)
ircd/client.c
modules/m_whois.c

index b333f44edd436f29a14087c676bc4cb18298512b..259b4a78c4eb5676ba01db418fed38e7b6198155 100644 (file)
@@ -1833,11 +1833,11 @@ show_ip(struct Client *source_p, struct Client *target_p)
                 * to local opers.
                 */
                if(!ConfigFileEntry.hide_spoof_ips &&
-                  (source_p == NULL || MyOper(source_p)))
+                  (source_p == NULL || (MyConnect(source_p) && HasPrivilege(source_p, "auspex:hostname"))))
                        return 1;
                return 0;
        }
-       else if(IsDynSpoof(target_p) && (source_p != NULL && !IsOper(source_p)))
+       else if(IsDynSpoof(target_p) && (source_p != NULL && !HasPrivilege(source_p, "auspex:hostname")))
                return 0;
        else
                return 1;
index a45b67c07d98423534ffc17e570d1f61089f254c..6fd1bcfc5657fa63fb9bcc199a36352a58c8aaca 100644 (file)
@@ -349,7 +349,7 @@ single_whois(struct Client *source_p, struct Client *target_p, int operspy)
 
        if(MyClient(target_p))
        {
-               if (IsDynSpoof(target_p) && (IsOperGeneral(source_p) || source_p == target_p))
+               if (IsDynSpoof(target_p) && (HasPrivilege(source_p, "auspex:hostname") || source_p == target_p))
                {
                        /* trick here: show a nonoper their own IP if
                         * dynamic spoofed but not if auth{} spoofed
@@ -385,7 +385,7 @@ single_whois(struct Client *source_p, struct Client *target_p, int operspy)
        }
        else
        {
-               if (IsDynSpoof(target_p) && (IsOper(source_p) || source_p == target_p))
+               if (IsDynSpoof(target_p) && (HasPrivilege(source_p, "auspex:hostname") || source_p == target_p))
                {
                        ClearDynSpoof(target_p);
                        sendto_one_numeric(source_p, RPL_WHOISHOST,