diff options
author | geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b <geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864> | 2006-03-07 15:27:35 +0000 |
---|---|---|
committer | geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b <geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864> | 2006-03-07 15:27:35 +0000 |
commit | 663b243c593f1beb713e97d248f7d6586777e777 (patch) | |
tree | 8ddd9eb2408e8b34ea6e95372f0536792f49e801 | |
parent | 0db8644763bda9346ccf593051dd0256cd8d917f (diff) |
BUILD : 1.7.13 (1006) BUGS : 468 NOTES : Fixed a counting issue in /os stats uplink and ran indent on src/core/os_uplink.c
git-svn-id: svn://svn.anope.org/anope/trunk@1006 31f1291d-b8d6-0310-a050-a5561fc1590b
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@731 5417fbe8-f217-4b02-8779-1006273d7864
-rw-r--r-- | Changes | 1 | ||||
-rw-r--r-- | src/core/os_stats.c | 27 | ||||
-rw-r--r-- | version.log | 6 |
3 files changed, 19 insertions, 15 deletions
@@ -3,6 +3,7 @@ Anope Version S V N Provided by Anope Dev. <dev@anope.org> - 2006 02/04 A Events for channel kicks and NickServ logout. [ #00] 03/02 A Added support for TS6 Save (FNC) on ratbox, shadow and charybdis. [#424] +03/07 F Counting issue in /os stats uplink. [#468] 03/02 F BotServ/HostServ are no longer loaded when they are disabled. [#440] 03/01 F Added ircd module support for valid_chan. [ #00] 03/01 F Minor issues in ns_saset. [#455] diff --git a/src/core/os_stats.c b/src/core/os_stats.c index 991d0a15d..a4e4f05bf 100644 --- a/src/core/os_stats.c +++ b/src/core/os_stats.c @@ -35,8 +35,7 @@ int AnopeInit(int argc, char **argv) Command *c; moduleAddAuthor("Anope"); - moduleAddVersion - ("$Id$"); + moduleAddVersion("$Id$"); moduleSetType(CORE); c = createCommand("STATS", do_stats, is_services_oper, OPER_HELP_STATS, @@ -78,9 +77,10 @@ void myOperServHelp(User * u) **/ int stats_count_servers(Server * s) { - int count = 1; + int count = 0; while (s) { + count++; if (s->links) count += stats_count_servers(s->links); s = s->next; @@ -234,9 +234,8 @@ int do_stats(User * u) } } - if (!extra - || ((stricmp(extra, "MEMORY") != 0) - && (stricmp(extra, "UPLINK") != 0))) { + if (!extra || ((stricmp(extra, "MEMORY") != 0) + && (stricmp(extra, "UPLINK") != 0))) { notice_lang(s_OperServ, u, OPER_STATS_CURRENT_USERS, usercnt, opcnt); tm = localtime(&maxusertime); @@ -310,9 +309,9 @@ int do_stats(User * u) } } - if (extra - && ((stricmp(extra, "ALL") == 0) - || (stricmp(extra, "UPLINK") == 0)) && is_services_admin(u)) { + if (extra && ((stricmp(extra, "ALL") == 0) + || (stricmp(extra, "UPLINK") == 0)) + && is_services_admin(u)) { buf[0] = '\0'; buflen = 511; /* How confusing, this is the amount of space left! */ for (i = 0; capab_info[i].token; i++) { @@ -331,10 +330,10 @@ int do_stats(User * u) if (capab_info[i].flag == CAPAB_NICKCHARS) { strncat(buf, "=", buflen); buflen--; - if(ircd->nickchars) { + if (ircd->nickchars) { strncat(buf, ircd->nickchars, buflen); buflen -= strlen(ircd->nickchars); - } /* leave blank if it was null */ + } /* leave blank if it was null */ } } } @@ -345,9 +344,9 @@ int do_stats(User * u) stats_count_servers(serv_uplink)); } - if (extra - && ((stricmp(extra, "ALL") == 0) - || (stricmp(extra, "MEMORY") == 0)) && is_services_admin(u)) { + if (extra && ((stricmp(extra, "ALL") == 0) + || (stricmp(extra, "MEMORY") == 0)) + && is_services_admin(u)) { long count, mem; notice_lang(s_OperServ, u, OPER_STATS_BYTES_READ, diff --git a/version.log b/version.log index 2c4c5ba68..65b041989 100644 --- a/version.log +++ b/version.log @@ -9,10 +9,14 @@ VERSION_MAJOR="1" VERSION_MINOR="7" VERSION_PATCH="13" VERSION_EXTRA="-svn" -VERSION_BUILD="1005" +VERSION_BUILD="1006" # $Log$ # +# BUILD : 1.7.13 (1006) +# BUGS : 468 +# NOTES : Fixed a counting issue in /os stats uplink and ran indent on src/core/os_uplink.c +# # BUILD : 1.7.13 (1005) # BUGS : 469 # NOTES : Applied Trystan's moduleNoticeLang() patch |