]> jfr.im git - solanum.git/blobdiff - modules/m_whois.c
README: Document glibtoolize use on Mac systems
[solanum.git] / modules / m_whois.c
index 3caf1330d92bda87b37522bdf2d1f33ef40edd99..d5e33ec6f455d51d92b23fded5c519539bbea895 100644 (file)
@@ -23,7 +23,6 @@
  */
 
 #include "stdinc.h"
-#include "common.h"
 #include "client.h"
 #include "hash.h"
 #include "channel.h"
@@ -41,7 +40,6 @@
 #include "modules.h"
 #include "hook.h"
 #include "s_newconf.h"
-#include "ipv4_from_ipv6.h"
 #include "ratelimit.h"
 #include "s_assert.h"
 
@@ -322,7 +320,7 @@ single_whois(struct Client *source_p, struct Client *target_p, int operspy)
                                    GlobalSetOptions.operstring));
        }
 
-       if(MyClient(target_p) && !EmptyString(target_p->localClient->opername) && IsOper(source_p))
+       if(MyClient(target_p) && !EmptyString(target_p->localClient->opername) && IsOper(target_p) && IsOper(source_p))
        {
                char buf[512];
                snprintf(buf, sizeof(buf), "is opered as %s, privset %s",
@@ -370,7 +368,7 @@ single_whois(struct Client *source_p, struct Client *target_p, int operspy)
                if (GET_SS_FAMILY(&target_p->localClient->ip) == AF_INET6 &&
                                (show_ip(source_p, target_p) ||
                                 (source_p == target_p && !IsIPSpoof(target_p))) &&
-                               ipv4_from_ipv6((struct sockaddr_in6 *)&target_p->localClient->ip, &ip4))
+                               rb_ipv4_from_ipv6((struct sockaddr_in6 *)&target_p->localClient->ip, &ip4))
                {
                        rb_inet_ntop_sock((struct sockaddr *)&ip4,
                                        buf, sizeof buf);