about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAlexander Barton <alex@barton.de>2002-12-22 23:30:33 +0000
committerAlexander Barton <alex@barton.de>2002-12-22 23:30:33 +0000
commit212d36a33c3b0a479088240a2b5fe1a0a97efda7 (patch)
treeaec6bb887b2c3a477ee4e9bb3711ce0b23cc4a32
parentd0304b19a2aaab32df628637d6961a447078bbe3 (diff)
downloadngircd-212d36a33c3b0a479088240a2b5fe1a0a97efda7.tar.gz
ngircd-212d36a33c3b0a479088240a2b5fe1a0a97efda7.zip
- enhanced LUSERS reply: RPL_LOCALUSERS, RPL_NETUSERS.
-rw-r--r--src/ngircd/irc-info.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/src/ngircd/irc-info.c b/src/ngircd/irc-info.c
index 48296077..efffad8d 100644
--- a/src/ngircd/irc-info.c
+++ b/src/ngircd/irc-info.c
@@ -14,7 +14,7 @@
 
 #include "portab.h"
 
-static char UNUSED id[] = "$Id: irc-info.c,v 1.8 2002/12/18 13:55:41 alex Exp $";
+static char UNUSED id[] = "$Id: irc-info.c,v 1.9 2002/12/22 23:30:33 alex Exp $";
 
 #include "imp.h"
 #include <assert.h>
@@ -710,29 +710,36 @@ IRC_Send_LUSERS( CLIENT *Client )
 
 	assert( Client != NULL );
 
-	/* Users, Services und Serevr im Netz */
+	/* Users, services and serevers in the network */
 	if( ! IRC_WriteStrClient( Client, RPL_LUSERCLIENT_MSG, Client_ID( Client ), Client_UserCount( ), Client_ServiceCount( ), Client_ServerCount( ))) return DISCONNECTED;
 
-	/* IRC-Operatoren im Netz */
+	/* Number of IRC operators */
 	cnt = Client_OperCount( );
 	if( cnt > 0 )
 	{
 		if( ! IRC_WriteStrClient( Client, RPL_LUSEROP_MSG, Client_ID( Client ), cnt )) return DISCONNECTED;
 	}
 
-	/* Unbekannt Verbindungen */
+	/* Unknown connections */
 	cnt = Client_UnknownCount( );
 	if( cnt > 0 )
 	{
 		if( ! IRC_WriteStrClient( Client, RPL_LUSERUNKNOWN_MSG, Client_ID( Client ), cnt )) return DISCONNECTED;
 	}
 
-	/* Channels im Netz */
+	/* Number of created channels */
 	if( ! IRC_WriteStrClient( Client, RPL_LUSERCHANNELS_MSG, Client_ID( Client ), Channel_Count( ))) return DISCONNECTED;
 
-	/* Channels im Netz */
+	/* Number of local users, services and servers */
 	if( ! IRC_WriteStrClient( Client, RPL_LUSERME_MSG, Client_ID( Client ), Client_MyUserCount( ), Client_MyServiceCount( ), Client_MyServerCount( ))) return DISCONNECTED;
 
+#ifndef STRICT_RFC
+	/* Maximum number of local users */
+	if( ! IRC_WriteStrClient( Client, RPL_LOCALUSERS_MSG, Client_ID( Client ), Client_MyUserCount( ), Client_MyMaxUserCount( ))) return DISCONNECTED;
+	/* Maximum number of users in the network */
+	if( ! IRC_WriteStrClient( Client, RPL_NETUSERS_MSG, Client_ID( Client ), Client_UserCount( ), Client_MaxUserCount( ))) return DISCONNECTED;
+#endif
+	
 	return CONNECTED;
 } /* IRC_Send_LUSERS */