]> arthur.barton.de Git - ngircd-alex.git/blobdiff - src/ngircd/irc-login.c
Enhanced ISUPPORT message (numeric 005).
[ngircd-alex.git] / src / ngircd / irc-login.c
index 6e733586332b62f1d2809ce69f8aa4ebe3f063a2..6516086ac189c204e9fa17c1211a3c032c40250c 100644 (file)
@@ -14,7 +14,7 @@
 
 #include "portab.h"
 
-static char UNUSED id[] = "$Id: irc-login.c,v 1.49 2005/09/01 10:51:24 alex Exp $";
+static char UNUSED id[] = "$Id: irc-login.c,v 1.51 2006/10/01 19:03:05 alex Exp $";
 
 #include "imp.h"
 #include <assert.h>
@@ -268,13 +268,13 @@ IRC_NICK( CLIENT *Client, REQUEST *Req )
                                                   "NICK :%s", Req->argv[0] );
                        IRC_WriteStrRelatedPrefix( target, target, false,
                                                   "NICK :%s", Req->argv[0] );
-                       
+
                        /* Register old nickname for WHOWAS queries */
                        Client_RegisterWhowas( target );
-                               
+
                        /* Save new nickname */
                        Client_SetID( target, Req->argv[0] );
-                       
+
                        IRC_SetPenalty( target, 2 );
                }
 
@@ -598,9 +598,15 @@ Hello_User( CLIENT *Client )
        if( ! IRC_WriteStrClient( Client, RPL_MYINFO_MSG, Client_ID( Client ), Client_ID( Client_ThisServer( )), PACKAGE_VERSION, USERMODES, CHANMODES )) return false;
 #endif
 
-       /* Features */
-       if( ! IRC_WriteStrClient( Client, RPL_ISUPPORT_MSG, Client_ID( Client ), CLIENT_NICK_LEN - 1,
-                       COMMAND_LEN - 23, CLIENT_AWAY_LEN - 1, Conf_MaxJoins )) return DISCONNECTED;
+       /* Features supported by this server (005 numeric, ISUPPORT),
+        * see <http://www.irc.org/tech_docs/005.html> for details. */
+       if (! IRC_WriteStrClient(Client, RPL_ISUPPORT1_MSG, Client_ID(Client),
+                       Conf_MaxJoins))
+               return DISCONNECTED;
+       if (! IRC_WriteStrClient(Client, RPL_ISUPPORT2_MSG, Client_ID(Client),
+                       CHANNEL_NAME_LEN-1, CLIENT_NICK_LEN-1, COMMAND_LEN-23,
+                       CLIENT_AWAY_LEN-1, COMMAND_LEN-113))
+               return DISCONNECTED;
 
        Client_SetType( Client, CLIENT_USER );