]> arthur.barton.de Git - ngircd.git/commitdiff
Show SSL status in WHOIS, numeric 275
authorNeale Pickett <neale@woozle.org>
Fri, 11 Jun 2010 22:32:41 +0000 (17:32 -0500)
committerAlexander Barton <alex@barton.de>
Wed, 23 Jun 2010 09:00:09 +0000 (11:00 +0200)
"I've been wanting this for years and finally took the 5 minutes to
patch it in. I took the response code (275) from whatever's running
OFTC's IRC network."
  -- Neale Pickett <neale@woozle.org>, Fri, 11 Jun 2010 17:32:41 -0500

(OFTC is running Hybrid ircd.)

src/ngircd/irc-info.c
src/ngircd/messages.h

index 7d7bb884ba95349749bbfce947fba996908481c8..7e0bf63c8911d6bef8a235c8cb6e685f319c2dc9 100644 (file)
@@ -993,6 +993,13 @@ IRC_WHOIS( CLIENT *Client, REQUEST *Req )
                if( ! IRC_WriteStrClient( from, RPL_WHOISOPERATOR_MSG, Client_ID( from ), Client_ID( c ))) return DISCONNECTED;
        }
 
+       /* Connected using SSL? */
+       if (Conn_UsesSSL(Client_Conn(c))) {
+               if (!IRC_WriteStrClient
+                   (from, RPL_WHOISSSL_MSG, Client_ID(from), Client_ID(c)))
+                       return DISCONNECTED;
+       }
+
        /* Idle and signon time (local clients only!) */
        if (Client_Conn(c) > NONE ) {
                if (! IRC_WriteStrClient(from, RPL_WHOISIDLE_MSG,
index c356e42371d10d2497175ac9ee42a3212a864e56..03ddc363375c7633abd0234761eee4c8b2d67353 100644 (file)
@@ -47,6 +47,7 @@
 #define RPL_LOCALUSERS_MSG             "265 %s %lu %lu :Current local users: %lu, Max: %lu"
 #define RPL_NETUSERS_MSG               "266 %s %lu %lu :Current global users: %lu, Max: %lu"
 #define RPL_STATSCONN_MSG              "250 %s :Highest connection count: %lu (%lu connections received)"
+#define RPL_WHOISSSL_MSG               "275 %s %s :is connected via SSL (secure link)"
 
 #define RPL_AWAY_MSG                   "301 %s %s :%s"
 #define RPL_USERHOST_MSG               "302 %s :"