]> arthur.barton.de Git - ngircd.git/commitdiff
Changed Numerics 265 and 266 to follow ircd 2.11.x "standards".
authorAlexander Barton <alex@barton.de>
Sun, 1 Oct 2006 19:13:32 +0000 (19:13 +0000)
committerAlexander Barton <alex@barton.de>
Sun, 1 Oct 2006 19:13:32 +0000 (19:13 +0000)
ChangeLog
src/ngircd/irc-info.c
src/ngircd/messages.h

index 1c920678e36eb30a46f7ad92f8b81977a8e40c8a..2ccb4f1da8ebf3f166791d2e85046a5e5fcca674 100644 (file)
--- 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 $
index 62b238eeabaa2b567c9f94fc316a208eaa823790..396d62e9df7f6dcbd3b539b6e76fcaed67a74e72 100644 (file)
@@ -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 <assert.h>
@@ -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;
index 76fa7214c1029b22f3b91567a38a9126cbb2ef1c..aed2d252006b93256e83c8af339aa9edd73213ce 100644 (file)
@@ -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 :"