about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAlexander Barton <alex@barton.de>2006-10-01 19:03:05 +0000
committerAlexander Barton <alex@barton.de>2006-10-01 19:03:05 +0000
commitbed98979dc0865677c88c82d6074d3438e67b882 (patch)
tree810bd870ae3bb77842a85ceff41eb4b4278611c2
parentbddb4914b442a757712d2bdf9da0a8cf8f99c4a5 (diff)
downloadngircd-bed98979dc0865677c88c82d6074d3438e67b882.tar.gz
ngircd-bed98979dc0865677c88c82d6074d3438e67b882.zip
Enhanced ISUPPORT message (numeric 005).
-rw-r--r--ChangeLog6
-rw-r--r--src/ngircd/irc-login.c14
-rw-r--r--src/ngircd/messages.h5
3 files changed, 18 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index a92d6e2e..27d8fc1a 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 ff6decfb..6516086a 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 <assert.h>
@@ -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 );
 
diff --git a/src/ngircd/messages.h b/src/ngircd/messages.h
index ee1eff67..76fa7214 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"