]> arthur.barton.de Git - ngircd-alex.git/commitdiff
New RPL_WHOISREGNICK_MSG(307) numeric: indicate if nick is registered
authorAlexander Barton <alex@barton.de>
Mon, 16 Jan 2012 01:18:24 +0000 (02:18 +0100)
committerAlexander Barton <alex@barton.de>
Mon, 16 Jan 2012 01:18:24 +0000 (02:18 +0100)
src/ngircd/irc-info.c
src/ngircd/messages.h

index f383dacd2c58a39aa4486555e8430fa2b4095cb7..a248e8a69b106fc31bd72c0b08d4c7789b5d175f 100644 (file)
@@ -1108,6 +1108,12 @@ IRC_WHOIS_SendReply(CLIENT *Client, CLIENT *from, CLIENT *c)
                                Client_ID(c)))
                return DISCONNECTED;
 
+       /* Registered nick name? */
+       if (Client_HasMode(c, 'R') &&
+           !IRC_WriteStrClient(from, RPL_WHOISREGNICK_MSG,
+                               Client_ID(from), Client_ID(c)))
+               return DISCONNECTED;
+
        /* Idle and signon time (local clients only!) */
        if (!Conf_MorePrivacy && Client_Conn(c) > NONE &&
            !IRC_WriteStrClient(from, RPL_WHOISIDLE_MSG,
index c5d833671c3f882973d1a9ce186ef1adec8145fa..0070e70159f46bd533624e953225854e23975812 100644 (file)
@@ -56,6 +56,7 @@
 #define RPL_ISON_MSG                   "303 %s :"
 #define RPL_UNAWAY_MSG                 "305 %s :You are no longer marked as being away"
 #define RPL_NOWAWAY_MSG                        "306 %s :You have been marked as being away"
+#define RPL_WHOISREGNICK_MSG           "307 %s %s :is a registered nick"
 #define RPL_WHOISUSER_MSG              "311 %s %s %s %s * :%s"
 #define RPL_WHOISSERVER_MSG            "312 %s %s %s :%s"
 #define RPL_WHOISOPERATOR_MSG          "313 %s %s :is an IRC operator"