repo: ngircd
action: commit
revision: 
path_from: 
revision_from: bed98979dc0865677c88c82d6074d3438e67b882:
path_to: 
revision_to: 
git.thebackupbox.net
ngircd
git clone git://git.thebackupbox.net/ngircd
commit bed98979dc0865677c88c82d6074d3438e67b882
Author: Alexander Barton 
Date:   Sun Oct 1 19:03:05 2006 +0000

    Enhanced ISUPPORT message (numeric 005).

diff --git a/ChangeLog b/ChangeLog
index a92d6e2e2c29c48aa8b6aa584ab6aa15d50da1d3..
index ..27d8fc1afe31ee17760210b4b54dc4d8382a2b63 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -10,6 +10,10 @@
                                -- ChangeLog --


+ngIRCd HEAD
+
+  - Enhanced ISUPPORT message (005 numeric).
+
 ngIRCd 0.10.0 (2006-10-01)

   - Fixed file handle leak when daemon is not able to send MOTD to a client.
@@ -661,4 +665,4 @@ ngIRCd 0.0.1, 31.12.2001


 -- 
-$Id: ChangeLog,v 1.304 2006/10/01 17:23:36 alex Exp $
+$Id: ChangeLog,v 1.305 2006/10/01 19:03:05 alex Exp $
diff --git a/src/ngircd/irc-login.c b/src/ngircd/irc-login.c
index ff6decfbc5482e4a5492e84e78e3575b1a17646a..
index ..6516086ac189c204e9fa17c1211a3c032c40250c 100644
--- a/src/ngircd/irc-login.c
+++ b/src/ngircd/irc-login.c
@@ -14,7 +14,7 @@

 #include "portab.h"

-static char UNUSED id[] = "$Id: irc-login.c,v 1.50 2006/08/12 11:56:24 fw Exp $";
+static char UNUSED id[] = "$Id: irc-login.c,v 1.51 2006/10/01 19:03:05 alex Exp $";

 #include "imp.h"
 #include 
@@ -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  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 );

diff --git a/src/ngircd/messages.h b/src/ngircd/messages.h
index ee1eff67711c895defa38a56bd1e534df4f96a4f..
index ..76fa7214c1029b22f3b91567a38a9126cbb2ef1c 100644
--- a/src/ngircd/messages.h
+++ b/src/ngircd/messages.h
@@ -8,7 +8,7 @@
  * (at your option) any later version.
  * Please read the file COPYING, README and AUTHORS for more information.
  *
- * $Id: messages.h,v 1.67 2005/09/02 12:50:25 alex Exp $
+ * $Id: messages.h,v 1.68 2006/10/01 19:03:05 alex Exp $
  *
  * IRC numerics (Header)
  */
@@ -22,7 +22,8 @@
 #define RPL_YOURHOST_MSG		"002 %s :Your host is %s, running version ngircd-%s (%s/%s/%s)"
 #define RPL_CREATED_MSG			"003 %s :This server has been started %s"
 #define RPL_MYINFO_MSG			"004 %s %s ngircd-%s %s %s"
-#define RPL_ISUPPORT_MSG		"005 %s NICKLEN=%d TOPICLEN=%d AWAYLEN=%d MAXCHANNELS=%d :are supported on this server"
+#define RPL_ISUPPORT1_MSG		"005 %s RFC2812 CASEMAPPING=ascii PREFIX=(ov)@+ CHANTYPES=# CHANMODES=bI,k,l,imnPst CHANLIMIT=#:%d :are supported on this server"
+#define RPL_ISUPPORT2_MSG		"005 %s CHANNELLEN=%d NICKLEN=%d TOPICLEN=%d AWAYLEN=%d KICKLEN=%d PENALTY :are supported on this server"

 #define RPL_TRACELINK_MSG		"200 %s Link %s-%s %s %s V%s %ld %d %d"
 #define RPL_TRACEOPERATOR_MSG		"204 %s Oper 2 :%s"

-----END OF PAGE-----