Show LIST_CHAN privilege, count User structs better, text: line->block.
authorMichael Poole <mdpoole@troilus.org>
Mon, 30 May 2005 16:51:05 +0000 (16:51 +0000)
committerMichael Poole <mdpoole@troilus.org>
Mon, 30 May 2005 16:51:05 +0000 (16:51 +0000)
git-svn-id: file:///home/klmitch/undernet-ircu/undernet-ircu-svn/ircu2/trunk@1415 c9e4aea6-c8fd-4c43-8297-357d70d61c8c

ChangeLog
ircd/client.c
ircd/m_server.c
ircd/s_bsd.c
ircd/s_conf.c
ircd/s_debug.c
ircd/s_err.c

index 623f41b99602b8855d2506067fe2aed9a7de1df8..0fa49ee83ab2afe64a1cf07cb4d613cc3c71790e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,19 @@
+2005-05-30  Michael Poole <mdpoole@troilus.org>
+
+       * ircd/client.c (privtab): Add missing LIST_CHAN privilege, move
+       WIDE_GLINE to reflect its enumerated value.
+
+       * ircd/s_debug.c (count_memory): Use user_count_memory() function
+       to count User structs in-use.
+
+       * ircd/m_server.c (mr_server): Change "C:line" to "Connect block".
+
+       * ircd/s_bsd.c (connect_server): Likewise.
+
+       * ircd/s_conf.c (conf_check_server): Likewise.
+
+       * ircd/s_err.c (replyTable): Change "O-lines" to "Operator block".
+
 2005-05-30  Michael Poole <mdpoole@troilus.org>
 
        * ircd/match.c (match): Rewrite to handle globs that end in an
index 28840bd57d2ea4ff92c175811063a9124833d718..6aca8db4a761fe8bff7fd5110a35c8cadb4deef3 100644 (file)
@@ -229,8 +229,8 @@ static struct {
   P(GLINE),          P(LOCAL_GLINE),    P(JUPE),          P(LOCAL_JUPE),
   P(OPMODE),         P(LOCAL_OPMODE),   P(SET),           P(WHOX),
   P(BADCHAN),        P(LOCAL_BADCHAN),  P(SEE_CHAN),      P(PROPAGATE),
-  P(DISPLAY),        P(SEE_OPERS),      P(FORCE_OPMODE),  P(FORCE_LOCAL_OPMODE),
-  P(WIDE_GLINE),
+  P(DISPLAY),        P(SEE_OPERS),      P(WIDE_GLINE),    P(LIST_CHAN),
+  P(FORCE_OPMODE),   P(FORCE_LOCAL_OPMODE), P(APASS_OPMODE),
 #undef P
   { 0, 0 }
 };
index 64e2fc11d0f054ce6fba91f16cedc886dd66310e..51ed2c881b45c3dd00b141a6d6ac1fad4465ec50 100644 (file)
@@ -590,7 +590,7 @@ int mr_server(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
     log_write(LS_NETWORK, L_NOTICE, LOG_NOSNOTICE, "Received unauthorized "
               "connection from %C [%s]", cptr,
               ircd_ntoa(&cli_ip(cptr)));
-    return exit_client(cptr, cptr, &me, "No C:line");
+    return exit_client(cptr, cptr, &me, "No Connect block");
   }
 
   host = cli_name(cptr);
index 63a0228517e68d5f3c18a87fe4f2c9062b8d9312..76fb7bd3e4584346f01ae6acc3a9776cf4ebc3ec 100644 (file)
@@ -786,10 +786,10 @@ int connect_server(struct ConfItem* aconf, struct Client* by)
 
   if (!find_conf_byhost(cli_confs(cptr), aconf->host, CONF_SERVER)) {
     sendto_opmask_butone(0, SNO_OLDSNO, "Host %s is not enabled for "
-                         "connecting: no C-line", aconf->name);
+                         "connecting: no Connect block", aconf->name);
     if (by && IsUser(by) && !MyUser(by)) {
       sendcmdto_one(&me, CMD_NOTICE, by, "%C :Connect to host %s failed: no "
-                    "C-line", by, aconf->name);
+                    "Connect block", by, aconf->name);
     }
     det_confs_butmask(cptr, 0);
     free_client(cptr);
index 85fdccc7d82e75b632288843eb3f0b7d7cfff453..afcfa6c93b655e4a80a7e4fc6525b02fe5559e21 100644 (file)
@@ -1137,7 +1137,8 @@ int conf_check_server(struct Client *cptr)
   if (IsConnecting(cptr) || IsHandshake(cptr)) {
     c_conf = find_conf_byname(lp, cli_name(cptr), CONF_SERVER);
     if (!c_conf) {
-      sendto_opmask_butone(0, SNO_OLDSNO, "Connect Error: lost C:line for %s",
+      sendto_opmask_butone(0, SNO_OLDSNO,
+                           "Connect Error: lost Connect block for %s",
                            cli_name(cptr));
       det_confs_butmask(cptr, 0);
       return -1;
index 56e76c85b540b6da89e54e756d8f05b46cda0164..efa57eef352c5ad6f44f5982db6f4ca818581756 100644 (file)
@@ -44,6 +44,7 @@
 #include "res.h"
 #include "s_bsd.h"
 #include "s_conf.h"
+#include "s_user.h"
 #include "s_stats.h"
 #include "send.h"
 #include "struct.h"
@@ -217,7 +218,6 @@ void count_memory(struct Client *cptr, const struct StatDesc *sd,
       cn = 0,                   /* connections */
       ch = 0,                   /* channels */
       lcc = 0,                  /* local client conf links */
-      us = 0,                   /* user structs */
       chi = 0,                  /* channel invites */
       chb = 0,                  /* channel bans */
       wwu = 0,                  /* whowas users */
@@ -235,6 +235,8 @@ void count_memory(struct Client *cptr, const struct StatDesc *sd,
       chbm = 0,                 /* memory used by channel bans */
       cm = 0,                   /* memory used by clients */
       cnm = 0,                  /* memory used by connections */
+      us = 0,                   /* user structs */
+      usm = 0,                  /* memory used by user structs */
       awm = 0,                  /* memory used by aways */
       wwam = 0,                 /* whowas away memory used */
       wwm = 0,                  /* whowas array memory used */
@@ -263,7 +265,6 @@ void count_memory(struct Client *cptr, const struct StatDesc *sd,
     }
     if (cli_user(acptr))
     {
-      us++;
       for (link = cli_user(acptr)->invited; link; link = link->next)
         usi++;
       for (member = cli_user(acptr)->channel; member; member = member->next_channel)
@@ -280,6 +281,7 @@ void count_memory(struct Client *cptr, const struct StatDesc *sd,
   }
   cm = c * sizeof(struct Client);
   cnm = cn * sizeof(struct Connection);
+  user_count_memory(&us, &usm);
 
   for (chptr = GlobalChannelList; chptr; chptr = chptr->next)
   {
@@ -309,8 +311,8 @@ void count_memory(struct Client *cptr, const struct StatDesc *sd,
   send_reply(cptr, SND_EXPLICIT | RPL_STATSDEBUG,
             ":Clients %d(%zu) Connections %d(%zu)", c, cm, cn, cnm);
   send_reply(cptr, SND_EXPLICIT | RPL_STATSDEBUG,
-            ":Users %d(%zu) Accounts %d(%zu) Invites %d(%zu)",
-             us, us * sizeof(struct User), acc, acc * (ACCOUNTLEN + 1),
+            ":Users %zu(%zu) Accounts %d(%zu) Invites %d(%zu)",
+             us, usm, acc, acc * (ACCOUNTLEN + 1),
             usi, usi * sizeof(struct SLink));
   send_reply(cptr, SND_EXPLICIT | RPL_STATSDEBUG,
             ":User channels %d(%zu) Aways %d(%zu)", memberships,
index 979ae0b66304b76f1719459a7d5a7a8d1710ebcc..26851d3569128f63faee9c4af06a380b24ed0511 100644 (file)
@@ -1014,7 +1014,7 @@ static Numeric replyTable[] = {
 /* 490 */
   { 0 },
 /* 491 */
-  { ERR_NOOPERHOST, ":No O-lines for your host", "491" },
+  { ERR_NOOPERHOST, ":No Operator block for your host", "491" },
 /* 492 */
   { 0 },
 /* 493 */