repo: ngircd
action: commit
revision: 
path_from: 
revision_from: 257312b102df5b66c25c97b803e9e4c78b6be54d:
path_to: 
revision_to: 
git.thebackupbox.net
ngircd
git clone git://git.thebackupbox.net/ngircd
commit 257312b102df5b66c25c97b803e9e4c78b6be54d
Author: Alexander Barton 
Date:   Sun Oct 1 19:13:32 2006 +0000

    Changed Numerics 265 and 266 to follow ircd 2.11.x "standards".

diff --git a/ChangeLog b/ChangeLog
index 1c920678e36eb30a46f7ad92f8b81977a8e40c8a..
index ..2ccb4f1da8ebf3f166791d2e85046a5e5fcca674 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -12,6 +12,7 @@

 ngIRCd HEAD

+  - Changed Numerics 265 and 266 to follow ircd 2.11.x "standards".
   - Allow PASS syntax defined in RFC 1459 for server links, too.
   - Enhanced ISUPPORT message (005 numeric).

@@ -666,4 +667,4 @@ ngIRCd 0.0.1, 31.12.2001


 -- 
-$Id: ChangeLog,v 1.306 2006/10/01 19:05:00 alex Exp $
+$Id: ChangeLog,v 1.307 2006/10/01 19:13:32 alex Exp $
diff --git a/src/ngircd/irc-info.c b/src/ngircd/irc-info.c
index 62b238eeabaa2b567c9f94fc316a208eaa823790..
index ..396d62e9df7f6dcbd3b539b6e76fcaed67a74e72 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.34 2006/09/16 12:22:09 fw Exp $";
+static char UNUSED id[] = "$Id: irc-info.c,v 1.35 2006/10/01 19:13:32 alex Exp $";

 #include "imp.h"
 #include 
@@ -833,6 +833,9 @@ GLOBAL bool
 IRC_Send_LUSERS( CLIENT *Client )
 {
 	long cnt;
+#ifndef STRICT_RFC
+	long max;
+#endif

 	assert( Client != NULL );

@@ -861,9 +864,17 @@ IRC_Send_LUSERS( CLIENT *Client )

 #ifndef STRICT_RFC
 	/* Maximum number of local users */
-	if( ! IRC_WriteStrClient( Client, RPL_LOCALUSERS_MSG, Client_ID( Client ), Client_MyUserCount( ), Client_MyMaxUserCount( ))) return DISCONNECTED;
+	cnt = Client_MyUserCount();
+	max = Client_MyMaxUserCount();
+	if (! IRC_WriteStrClient(Client, RPL_LOCALUSERS_MSG, Client_ID(Client),
+			cnt, max, cnt, max))
+		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;
+	cnt = Client_UserCount();
+	max = Client_MaxUserCount();
+	if(! IRC_WriteStrClient(Client, RPL_NETUSERS_MSG, Client_ID(Client),
+			cnt, max, cnt, max))
+		return DISCONNECTED;
 #endif

 	return CONNECTED;
diff --git a/src/ngircd/messages.h b/src/ngircd/messages.h
index 76fa7214c1029b22f3b91567a38a9126cbb2ef1c..
index ..aed2d252006b93256e83c8af339aa9edd73213ce 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.68 2006/10/01 19:03:05 alex Exp $
+ * $Id: messages.h,v 1.69 2006/10/01 19:13:32 alex Exp $
  *
  * IRC numerics (Header)
  */
@@ -42,8 +42,8 @@
 #define RPL_ADMINLOC2_MSG		"258 %s :%s"
 #define RPL_ADMINEMAIL_MSG		"259 %s :%s"
 #define RPL_TRACEEND_MSG		"262 %s %s %s-%s.%s :End of TRACE"
-#define RPL_LOCALUSERS_MSG		"265 %s :Current local users: %ld, Max: %ld"
-#define RPL_NETUSERS_MSG		"266 %s :Current global users: %ld, Max: %ld"
+#define RPL_LOCALUSERS_MSG		"265 %s %ld %ld :Current local users: %ld, Max: %ld"
+#define RPL_NETUSERS_MSG		"266 %s %ld %ld :Current global users: %ld, Max: %ld"

 #define RPL_AWAY_MSG			"301 %s %s :%s"
 #define RPL_USERHOST_MSG		"302 %s :"

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