IPv6 support (hopefully with fewer future transition pains)
[ircu2.10.12-pk.git] / ircd / m_whois.c
index 81d42f41d7c883f873ec14f83666791e3dc14613..5660ba66e344445fd786dd921d9d99111f816691 100644 (file)
@@ -152,7 +152,8 @@ static void do_whois(struct Client* sptr, struct Client *acptr, int parc)
     {
        chptr = chan->channel;
        
-       if (!ShowChannel(sptr, chptr))
+       if (!ShowChannel(sptr, chptr)
+           && !(IsOper(sptr) && IsLocalChannel(chptr->chname)))
           continue;
           
        if (acptr != sptr && IsZombie(chan))
@@ -166,6 +167,8 @@ static void do_whois(struct Client* sptr, struct Client *acptr, int parc)
        }
        if (IsDeaf(acptr))
          *(buf + len++) = '-';
+       if (IsOper(sptr) && !ShowChannel(sptr, chptr))
+         *(buf + len++) = '*';
        if (IsDelayedJoin(chan) && (sptr != acptr))
          *(buf + len++) = '<';
        else if (IsChanOp(chan))
@@ -206,15 +209,15 @@ static void do_whois(struct Client* sptr, struct Client *acptr, int parc)
 
     if (HasHiddenHost(acptr) && (IsAnOper(sptr) || acptr == sptr))
       send_reply(sptr, RPL_WHOISACTUALLY, name, user->username,
-                 user->realhost, ircd_ntoa((const char*) &(cli_ip(acptr))));
-    
+                 user->realhost, ircd_ntoa(&cli_ip(acptr)));
+
     /* Hint: if your looking to add more flags to a user, eg +h, here's
      *       probably a good place to add them :)
      */
-     
+
     if (MyConnect(acptr) && (!feature_bool(FEAT_HIS_WHOIS_IDLETIME) ||
                              (sptr == acptr || IsAnOper(sptr) || parc >= 3)))
-       send_reply(sptr, RPL_WHOISIDLE, name, CurrentTime - user->last, 
+       send_reply(sptr, RPL_WHOISIDLE, name, CurrentTime - user->last,
                   cli_firsttime(acptr));
   }
 }