]> arthur.barton.de Git - ngircd-alex.git/blobdiff - src/ngircd/irc-info.c
Fix "MAXLIST=beI:50": the limit is the sum of all lists
[ngircd-alex.git] / src / ngircd / irc-info.c
index a248e8a69b106fc31bd72c0b08d4c7789b5d175f..841e6e62739274a0b862ba4bab1284091605ff07 100644 (file)
@@ -648,10 +648,10 @@ IRC_STATS( CLIENT *Client, REQUEST *Req )
  * therefore answers with ERR_SUMMONDISABLED.
  */
 GLOBAL bool
-IRC_SUMMON(CLIENT * Client, REQUEST * Req)
+IRC_SUMMON(CLIENT * Client, UNUSED REQUEST * Req)
 {
        return IRC_WriteStrClient(Client, ERR_SUMMONDISABLED_MSG,
-                                 Client_ID(Client), Req->command);
+                                 Client_ID(Client));
 } /* IRC_SUMMON */
 
 
@@ -741,10 +741,10 @@ IRC_USERHOST(CLIENT *Client, REQUEST *Req)
  * See RFC 2812 section 4.6. As suggested there the command is disabled.
  */
 GLOBAL bool
-IRC_USERS(CLIENT * Client, REQUEST * Req)
+IRC_USERS(CLIENT * Client, UNUSED REQUEST * Req)
 {
        return IRC_WriteStrClient(Client, ERR_USERSDISABLED_MSG,
-                                 Client_ID(Client), Req->command);
+                                 Client_ID(Client));
 } /* IRC_USERS */
 
 
@@ -1114,6 +1114,12 @@ IRC_WHOIS_SendReply(CLIENT *Client, CLIENT *from, CLIENT *c)
                                Client_ID(from), Client_ID(c)))
                return DISCONNECTED;
 
+       if (Client_Conn(c) > NONE && (Client_OperByMe(from) || from == c) &&
+           !IRC_WriteStrClient(from, RPL_WHOISHOST_MSG, Client_ID(from),
+                               Client_ID(c), Client_Hostname(c),
+                               Conn_GetIPAInfo(Client_Conn(c))))
+               return DISCONNECTED;
+
        /* Idle and signon time (local clients only!) */
        if (!Conf_MorePrivacy && Client_Conn(c) > NONE &&
            !IRC_WriteStrClient(from, RPL_WHOISIDLE_MSG,