Committer  : entrope
CVSROOT    : /cvsroot/undernet-ircu
Module     : ircu2.10
Commit time: 2005-05-30 18:46:31 UTC

Modified files:
     ircd/s_stats.c ircd/s_err.c include/numeric.h ChangeLog

Log message:

Numeric reply bug fixes and cleanup.

---------------------- diff included ----------------------
Index: ircu2.10/ChangeLog
diff -u ircu2.10/ChangeLog:1.638 ircu2.10/ChangeLog:1.639
--- ircu2.10/ChangeLog:1.638    Mon May 30 09:51:05 2005
+++ ircu2.10/ChangeLog  Mon May 30 11:46:20 2005
@@ -1,5 +1,16 @@
 2005-05-30  Michael Poole <[EMAIL PROTECTED]>
 
+       * include/numeric.h (RPL_TRACELOG, RPL_MYPORTIS,
+       RPL_NOTOPERANYMORE): Undefine unused numeric replies.
+
+       * ircd/s_err.c (replyTable): Fix format fields for certain numeric
+       arguments.  Remove some unused entries.
+
+       * ircd/s_stats.c (stats_configured_links): Move invariant
+       parameters to message format string.
+
+2005-05-30  Michael Poole <[EMAIL PROTECTED]>
+
        * ircd/client.c (privtab): Add missing LIST_CHAN privilege, move
        WIDE_GLINE to reflect its enumerated value.
 
Index: ircu2.10/include/numeric.h
diff -u ircu2.10/include/numeric.h:1.39 ircu2.10/include/numeric.h:1.40
--- ircu2.10/include/numeric.h:1.39     Wed May  4 18:36:14 2005
+++ ircu2.10/include/numeric.h  Mon May 30 11:46:19 2005
@@ -18,7 +18,7 @@
  */
 /** @file
  * @brief Declarations of numeric replies and supporting functions.
- * @version $Id: numeric.h,v 1.39 2005/05/05 01:36:14 entrope Exp $
+ * @version $Id: numeric.h,v 1.40 2005/05/30 18:46:19 entrope Exp $
  */
 #ifndef INCLUDED_numeric_h
 #define INCLUDED_numeric_h
@@ -118,12 +118,12 @@
 #define RPL_STATSALINE       226        /* Hybrid, Undernet */
 #define RPL_STATSQLINE       228        /* Undernet extension */
 
-#define RPL_SERVICEINFO      231       /* unused */
-#define RPL_ENDOFSERVICES    232       /* unused */
+/*      RPL_SERVICEINFO      231       unused */
+/*      RPL_ENDOFSERVICES    232       unused */
 /*     RPL_RULES            232        unreal */
-#define RPL_SERVICE          233       /* unused */
-#define RPL_SERVLIST         234       /* unused */
-#define RPL_SERVLISTEND      235       /* unused */
+/*      RPL_SERVICE          233       unused */
+/*      RPL_SERVLIST         234       unused */
+/*      RPL_SERVLISTEND      235       unused */
 
 #define RPL_STATSVERBOSE     236        /* Undernet verbose server list */
 #define RPL_STATSENGINE      237       /* Undernet engine name */
@@ -158,7 +158,7 @@
 #define RPL_ADMINLOC2        258
 #define RPL_ADMINEMAIL       259
 
-#define RPL_TRACELOG         261       /* unused */
+/*      RPL_TRACELOG         261          unused */
 #define RPL_TRACEEND        262        /* efnet/IRCnet */
 /*      RPL_LOAD_THROTTLED   263           efnet/hybrid */
 /*     RPL_TRYAGAIN         263           Numerics List: IRCnet */
@@ -203,11 +203,11 @@
 
 /*      RPL_END_CHANINFO     299           aircd */
 
-#define RPL_NONE             300       /* unused */
+/*      RPL_NONE             300       unused */
 #define RPL_AWAY             301
 #define RPL_USERHOST         302
 #define RPL_ISON             303
-#define RPL_TEXT             304       /* unused */
+/*      RPL_TEXT             304       unused */
 #define RPL_UNAWAY           305
 #define RPL_NOWAWAY          306
                                         /* NotAway, aircd */
@@ -273,7 +273,7 @@
                                            See also RPL_ENDOFWHO */
 #define RPL_DELNAMREPLY      355        /* QuakeNet extension */
 
-#define RPL_KILLDONE         361       /* not used */
+/*      RPL_KILLDONE         361       not used */
 #define RPL_CLOSING          362
 #define RPL_CLOSEEND         363
 #define RPL_LINKS            364
@@ -285,7 +285,7 @@
 
 #define RPL_INFO             371
 #define RPL_MOTD             372
-#define RPL_INFOSTART        373       /* not used */
+/*      RPL_INFOSTART        373       not used */
 #define RPL_ENDOFINFO        374
 #define RPL_MOTDSTART        375
 #define RPL_ENDOFMOTD        376
@@ -299,13 +299,13 @@
 #define RPL_YOUREOPER        381
 #define RPL_REHASHING        382
 /*     RPL_YOURSERVICE      383           Numeric List: various */
-#define RPL_MYPORTIS         384       /* not used */
-#define RPL_NOTOPERANYMORE   385        /* Extension to RFC1459, not used */
+/*      RPL_MYPORTIS         384       not used */
+/*      RPL_NOTOPERANYMORE   385        Extension to RFC1459, not used */
 /*     RPL_QLIST            386        unreal */
 /*     RPL_ENDOFQLIST       387        unreal */
 /*     RPL_ALIST            388        unreal */
-/*     RPL_ENDOFALIST       389        unreal */ 
- 
+/*     RPL_ENDOFALIST       389        unreal */
+
 #define RPL_TIME             391
 /*      RPL_START_USERS      392        Dalnet/EFnet/IRCnet */
 /*      RPL_USERS            393        Dalnet/EFnet/IRCnet */
@@ -317,7 +317,7 @@
  * Errors are in the range from 400-599 currently and are grouped by what
  * commands they come from.
  */
-#define ERR_FIRSTERROR       400       /* unused */
+/*      ERR_FIRSTERROR       400       unused */
 #define ERR_NOSUCHNICK       401
 #define ERR_NOSUCHSERVER     402
 #define ERR_NOSUCHCHANNEL    403
Index: ircu2.10/ircd/s_err.c
diff -u ircu2.10/ircd/s_err.c:1.70 ircu2.10/ircd/s_err.c:1.71
--- ircu2.10/ircd/s_err.c:1.70  Mon May 30 09:51:04 2005
+++ ircu2.10/ircd/s_err.c       Mon May 30 11:46:19 2005
@@ -18,7 +18,7 @@
  */
 /** @file
  * @brief Error handling support.
- * @version $Id: s_err.c,v 1.70 2005/05/30 16:51:04 entrope Exp $
+ * @version $Id: s_err.c,v 1.71 2005/05/30 18:46:19 entrope Exp $
  */
 #include "config.h"
 
@@ -48,7 +48,7 @@
 /* 007 */
   { 0 },
 /* 008 */
-  { RPL_SNOMASK, "%d :: Server notice mask (%#x)", "008" },
+  { RPL_SNOMASK, "%u :: Server notice mask (%#x)", "008" },
 /* 009 */
   { 0 },
 /* 010 */
@@ -62,7 +62,7 @@
 /* 014 */
   { 0 },
 /* 015 */
-  { RPL_MAP, ":%s%s%s %s [%i clients]", "015" },
+  { RPL_MAP, ":%s%s%s %s [%u clients]", "015" },
 /* 016 */
   { RPL_MAPMORE, ":%s%s --> *more*", "016" },
 /* 017 */
@@ -450,7 +450,7 @@
 /* 208 */
   { RPL_TRACENEWTYPE, "<newtype> 0 %s", "208" },
 /* 209 */
-  { RPL_TRACECLASS, "Class %s %d", "209" },
+  { RPL_TRACECLASS, "Class %s %u", "209" },
 /* 210 */
   { 0 },
 /* 211 */
@@ -458,7 +458,7 @@
 /* 212 */
   { RPL_STATSCOMMANDS, "%s %u %u", "212" },
 /* 213 */
-  { RPL_STATSCLINE, "C %s %s%s %d %d %s %s", "213" },
+  { RPL_STATSCLINE, "C %s * %d %d %s %s", "213" },
 /* 214 */
   { 0 },
 /* 215 */
@@ -468,7 +468,7 @@
 /* 217 */
   { RPL_STATSPLINE, "P %d %d %s %s", "217" },
 /* 218 */
-  { RPL_STATSYLINE, "%c %s %d %d %d %ld %d", "218" },
+  { RPL_STATSYLINE, "%c %s %d %d %u %u %u", "218" },
 /* 219 */
   { RPL_ENDOFSTATS, "%s :End of /STATS report", "219" },
 /* 220 */
@@ -494,21 +494,21 @@
 /* 230 */
   { 0 },
 /* 231 */
-  { RPL_SERVICEINFO, 0, "231" },
+  { 0 },
 /* 232 */
-  { RPL_ENDOFSERVICES, 0, "232" },
+  { 0 },
 /* 233 */
-  { RPL_SERVICE, 0, "233" },
+  { 0 },
 /* 234 */
-  { RPL_SERVLIST, 0, "234" },
+  { 0 },
 /* 235 */
-  { RPL_SERVLISTEND, 0, "235" },
+  { 0 },
 /* 236 */
   { RPL_STATSVERBOSE, "V :Sent as explicit", "236" },
 /* 237 */
   { RPL_STATSENGINE, "%s :Event loop engine", "237" },
 /* 238 */
-  { RPL_STATSFLINE, "%c %s %s", "238" },
+  { RPL_STATSFLINE, "F %s %s", "238" },
 /* 239 */
   { 0 },
 /* 240 */
@@ -532,17 +532,17 @@
 /* 249 */
   { RPL_STATSDEBUG, 0, "249" },
 /* 250 */
-  { RPL_STATSCONN, ":Highest connection count: %d (%d clients)", "250" },
+  { RPL_STATSCONN, ":Highest connection count: %u (%u clients)", "250" },
 /* 251 */
-  { RPL_LUSERCLIENT, ":There are %d users and %d invisible on %d servers", 
"251" },
+  { RPL_LUSERCLIENT, ":There are %u users and %u invisible on %u servers", 
"251" },
 /* 252 */
-  { RPL_LUSEROP, "%d :operator(s) online", "252" },
+  { RPL_LUSEROP, "%u :operator(s) online", "252" },
 /* 253 */
-  { RPL_LUSERUNKNOWN, "%d :unknown connection(s)", "253" },
+  { RPL_LUSERUNKNOWN, "%u :unknown connection(s)", "253" },
 /* 254 */
-  { RPL_LUSERCHANNELS, "%d :channels formed", "254" },
+  { RPL_LUSERCHANNELS, "%u :channels formed", "254" },
 /* 255 */
-  { RPL_LUSERME, ":I have %d clients and %d servers", "255" },
+  { RPL_LUSERME, ":I have %u clients and %u servers", "255" },
 /* 256 */
   { RPL_ADMINME, ":Administrative info about %s", "256" },
 /* 257 */
@@ -554,7 +554,7 @@
 /* 260 */
   { 0 },
 /* 261 */
-  { RPL_TRACELOG, "File %s %d", "261" },
+  { 0 },
 /* 262 */
   { RPL_TRACEEND, ":End of TRACE", "262" },
 /* 263 */
@@ -632,7 +632,7 @@
 /* 299 */
   { 0 },
 /* 300 */
-  { RPL_NONE, 0, "300" },
+  { 0 },
 /* 301 */
   { RPL_AWAY, "%s :%s", "301" },
 /* 302 */
@@ -640,7 +640,7 @@
 /* 303 */
   { RPL_ISON, ":", "303" },
 /* 304 */
-  { RPL_TEXT, 0, "304" },
+  { 0 },
 /* 305 */
   { RPL_UNAWAY, ":You are no longer marked as being away", "305" },
 /* 306 */
@@ -676,7 +676,7 @@
 /* 321 */
   { RPL_LISTSTART, "Channel :Users  Name", "321" },
 /* 322 */
-  { RPL_LIST, "%s %d :%s", "322" },
+  { RPL_LIST, "%s %u :%s", "322" },
 /* 323 */
   { RPL_LISTEND, ":End of /LIST", "323" },
 /* 324 */
@@ -754,13 +754,13 @@
 /* 360 */
   { 0 },
 /* 361 */
-  { RPL_KILLDONE, 0, "361" }, /* Not used */
+  { 0 },
 /* 362 */
   { RPL_CLOSING, "%s :Operator enforced Close", "362" },
 /* 363 */
   { RPL_CLOSEEND, "%d :Connections Closed", "363" },
 /* 364 */
-  { RPL_LINKS, "%s %s :%d P%u %s", "364" },
+  { RPL_LINKS, "%s %s :%u P%u %s", "364" },
 /* 365 */
   { RPL_ENDOFLINKS, "%s :End of /LINKS list.", "365" },
 /* 366 */
@@ -778,7 +778,7 @@
 /* 372 */
   { RPL_MOTD, ":- %s", "372" },
 /* 373 */
-  { RPL_INFOSTART, ":Server INFO", "373" },
+  { 0 },
 /* 374 */
   { RPL_ENDOFINFO, ":End of /INFO list.", "374" },
 /* 375 */
@@ -800,9 +800,9 @@
 /* 383 */
   { 0 },
 /* 384 */
-  { RPL_MYPORTIS, "%d :Port to local server is", "384" }, /* not used */
+  { 0 },
 /* 385 */
-  { RPL_NOTOPERANYMORE, 0, "385" }, /* not used */
+  { 0 },
 /* 386 */
   { 0 },
 /* 387 */
@@ -832,7 +832,7 @@
 /* 399 */
   { 0 },
 /* 400 */
-  { ERR_FIRSTERROR, "", "400" },
+  { 0 },
 /* 401 */
   { ERR_NOSUCHNICK, "%s :No such nick", "401" },
 /* 402 */
Index: ircu2.10/ircd/s_stats.c
diff -u ircu2.10/ircd/s_stats.c:1.41 ircu2.10/ircd/s_stats.c:1.42
--- ircu2.10/ircd/s_stats.c:1.41        Mon May 30 06:23:24 2005
+++ ircu2.10/ircd/s_stats.c     Mon May 30 11:46:19 2005
@@ -62,7 +62,7 @@
 /** @file
  * @brief Report configuration lines and other statistics from this
  * server.
- * @version $Id: s_stats.c,v 1.41 2005/05/30 13:23:24 entrope Exp $
+ * @version $Id: s_stats.c,v 1.42 2005/05/30 18:46:19 entrope Exp $
  *
  * Note: The info is reported in the order the server uses
  *       it--not reversed as in ircd.conf!
@@ -106,7 +106,7 @@
       if (tmp->status & CONF_UWORLD)
        send_reply(sptr, RPL_STATSULINE, host);
       else if (tmp->status & CONF_SERVER)
-       send_reply(sptr, RPL_STATSCLINE, name, "", "*", port, maximum, 
hub_limit, get_conf_class(tmp));
+       send_reply(sptr, RPL_STATSCLINE, name, port, maximum, hub_limit, 
get_conf_class(tmp));
       else if (tmp->status & CONF_CLIENT)
         send_reply(sptr, RPL_STATSILINE,
                    (tmp->host ? tmp->host : "*"), maximum,
----------------------- End of diff -----------------------
_______________________________________________
Patches mailing list
[email protected]
http://undernet.sbg.org/mailman/listinfo/patches

Reply via email to