]> jfr.im git - irc/quakenet/newserv.git/blobdiff - miscreply/whois.c
CHANSERV: better batcher error handling for expired accounts/accounts with no email.
[irc/quakenet/newserv.git] / miscreply / whois.c
index d3c211568c129fffbed5ece7d1951835bada679d..edb75b7c57d7a66e664da3d848a54f9e9eecd055 100644 (file)
@@ -44,7 +44,7 @@ static void do_whois(char *sourcenum, nick *snick, nick *tnick) {
    *      target user is not hidechan (usermode +n)
    *      OR user WHOIS'ing himself
    */
-  if ((!IsService(tnick) && !IsHideChan(tnick)) || snick == tnick) {
+  if ((!IsService(tnick) && !IsHideChan(tnick) && canseeuser(snick, tnick)) || snick == tnick) {
     nicks[0] = (char *)snick;
     nicks[1] = (char *)tnick;
     nicks[2] = sourcenum;
@@ -125,7 +125,7 @@ static void do_whois(char *sourcenum, nick *snick, nick *tnick) {
      *                       "irc.netsplit.net 338 foobar barfoo foobar@localhost 127.0.0.1 :Actual user@host, Actual IP"
      */
     irc_send("%s 338 %s %s %s@%s %s :Actual user@host, Actual IP", getmynumeric(), sourcenum, tnick->nick,
-      tnick->ident, tnick->host->name->content, IPtostr(tnick->p_ipaddr));
+      tnick->ident, tnick->host->name->content, IPtostr(tnick->ipaddress));
   }