From: Michael Poole Date: Mon, 30 May 2005 16:51:05 +0000 (+0000) Subject: Show LIST_CHAN privilege, count User structs better, text: line->block. X-Git-Url: http://git.pk910.de/?p=ircu2.10.12-pk.git;a=commitdiff_plain;h=7c57a8f02f5802286ef43b0be65a5c731b7df4cf Show LIST_CHAN privilege, count User structs better, text: line->block. git-svn-id: file:///home/klmitch/undernet-ircu/undernet-ircu-svn/ircu2/trunk@1415 c9e4aea6-c8fd-4c43-8297-357d70d61c8c --- diff --git a/ChangeLog b/ChangeLog index 623f41b..0fa49ee 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,19 @@ +2005-05-30 Michael Poole + + * 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 * ircd/match.c (match): Rewrite to handle globs that end in an diff --git a/ircd/client.c b/ircd/client.c index 28840bd..6aca8db 100644 --- a/ircd/client.c +++ b/ircd/client.c @@ -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 } }; diff --git a/ircd/m_server.c b/ircd/m_server.c index 64e2fc1..51ed2c8 100644 --- a/ircd/m_server.c +++ b/ircd/m_server.c @@ -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); diff --git a/ircd/s_bsd.c b/ircd/s_bsd.c index 63a0228..76fb7bd 100644 --- a/ircd/s_bsd.c +++ b/ircd/s_bsd.c @@ -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); diff --git a/ircd/s_conf.c b/ircd/s_conf.c index 85fdccc..afcfa6c 100644 --- a/ircd/s_conf.c +++ b/ircd/s_conf.c @@ -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; diff --git a/ircd/s_debug.c b/ircd/s_debug.c index 56e76c8..efa57ee 100644 --- a/ircd/s_debug.c +++ b/ircd/s_debug.c @@ -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, diff --git a/ircd/s_err.c b/ircd/s_err.c index 979ae0b..26851d3 100644 --- a/ircd/s_err.c +++ b/ircd/s_err.c @@ -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 */