Author: Isomer <isomer@coders.net>
authorPerry Lorier <isomer@undernet.org>
Tue, 13 Jun 2000 03:01:22 +0000 (03:01 +0000)
committerPerry Lorier <isomer@undernet.org>
Tue, 13 Jun 2000 03:01:22 +0000 (03:01 +0000)
Log message:

Add stats v, cosmetic change to IPcheck

git-svn-id: file:///home/klmitch/undernet-ircu/undernet-ircu-svn/ircu2/trunk@252 c9e4aea6-c8fd-4c43-8297-357d70d61c8c

ChangeLog
ircd/IPcheck.c
ircd/m_stats.c
ircd/s_stats.c

index b66a88c40643fe91ae6485da8b177d4c5e7cb38a..f172192754cc40aeec523309df7a2a3796d35f37 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2000-05-29  Perry Lorier       <Isomer@coders.net>
+       * ircd/m_stats.c: add /stats v to do only the last part of the /trace
+       * ircd/IPcheck.c: Cosmetic change, if we meddle with it enough do
+                       you think it'll get bored and fix itself?
+
 2000-06-09  Greg Sikorski <gte@atomicrevs.demon.co.uk>
 
        * ircd/m_names.c: Clean up compiler warnings.
 #
 # ChangeLog for ircu2.10.11
 #
-# $Id: ChangeLog,v 1.146 2000-06-09 20:56:03 gte Exp $
+# $Id: ChangeLog,v 1.147 2000-06-13 03:01:21 isomer Exp $
 #
 # Insert new changes at beginning of the change list.
 #
index 012bc867adf07e4dbd8ea829c55e1bd306630873..aae5498970ec0187a76adb86a47aa3fe6f5740b4 100644 (file)
@@ -102,10 +102,10 @@ static struct IPRegistryEntry *ip_registry_find(unsigned int ip)
 
   for (entry = hashTable[ip_registry_hash(ip)]; entry; entry = entry->next) {
     if (entry->addr == ip)
-      break;
+      return entry;
   }
 
-  return entry;
+  return NULL;
 }
 
 
index ca9f39d209bd2da48e4630bd88a38395c9fe04e0..9808d7cb557a1006c72747f8e334b10a5eeee694 100644 (file)
@@ -382,6 +382,16 @@ int m_stats(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
       send_reply(sptr, RPL_STATSCONN, max_connection_count, max_client_count);
       break;
     }
+    case 'v':
+    {
+       struct ConfClass *cltmp;
+       
+       for (cltmp = FirstClass(); cltmp; cltmp = NextClass(cltmp)) {
+               if (Links(cltmp) > 0)
+                       send_reply(sptr,RPL_TRACECLASS, ConClass(cltmp), Links(cltmp));
+       }
+       break;
+    }
     case 'W':
     case 'w':
       calc_load(sptr);
@@ -678,6 +688,17 @@ int ms_stats(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
       send_reply(sptr, RPL_STATSCONN, max_connection_count, max_client_count);
       break;
     }
+    case 'v':
+    {
+       struct ConfClass *cltmp;
+       
+       for (cltmp = FirstClass(); cltmp; cltmp = NextClass(cltmp)) {
+               if (Links(cltmp) > 0)
+                       send_reply(sptr,RPL_TRACECLASS, ConClass(cltmp), Links(cltmp));
+       }
+       break;
+    }
+    
     case 'W':
     case 'w':
       calc_load(sptr);
index c4fd2cf3b374cf54959329fd4512e2fc6e85a470..ad675c539bf5b5fad2817a2479b513a117166d8d 100644 (file)
@@ -75,6 +75,7 @@ const char *statsinfo[] = {
     "m - Message usage information.",
     "t - Local connection statistics (Total SND/RCV, etc).", 
     "w - Userload statistics.",
+    "v - Connection class information.",
     "M - Memory allocation & leak monitoring.", 
     "z - Memory/Structure allocation information.",
     "r - System resource usage (Debug only).",