diff options
| author | Alexander Barton <alex@barton.de> | 2006-10-01 19:13:32 +0000 |
|---|---|---|
| committer | Alexander Barton <alex@barton.de> | 2006-10-01 19:13:32 +0000 |
| commit | 257312b102df5b66c25c97b803e9e4c78b6be54d (patch) | |
| tree | c48d0216934dc86475f1f6ed43528dc6f3814b3f /src | |
| parent | 27d947fb7d36de5cb843404ddcdd99862ecb457b (diff) | |
| download | ngircd-257312b102df5b66c25c97b803e9e4c78b6be54d.tar.gz ngircd-257312b102df5b66c25c97b803e9e4c78b6be54d.zip | |
Changed Numerics 265 and 266 to follow ircd 2.11.x "standards".
Diffstat (limited to 'src')
| -rw-r--r-- | src/ngircd/irc-info.c | 17 | ||||
| -rw-r--r-- | src/ngircd/messages.h | 6 |
2 files changed, 17 insertions, 6 deletions
diff --git a/src/ngircd/irc-info.c b/src/ngircd/irc-info.c index 62b238ee..396d62e9 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 <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; diff --git a/src/ngircd/messages.h b/src/ngircd/messages.h index 76fa7214..aed2d252 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 :" |