From 9532325a24d264a4372e04bf22ca97ac5444bb8a Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Wed, 26 Dec 2012 13:05:39 -0600 Subject: [PATCH] - Remove lusers.c again. (#2699) --- src/Makefile | 5 +---- src/ircd.c | 7 ++++-- src/lusers.c | 62 ---------------------------------------------------- 3 files changed, 6 insertions(+), 68 deletions(-) delete mode 100644 src/lusers.c diff --git a/src/Makefile b/src/Makefile index 7c01a316f..7fe2e963b 100644 --- a/src/Makefile +++ b/src/Makefile @@ -22,7 +22,7 @@ CC = danger will robinson OBJS=timesynch.o res.o s_bsd.o auth.o aln.o channel.o cloak.o crule.o dbuf.o \ - events.o fdlist.o hash.o help.o ircd.o ircsprintf.o list.o lusers.o \ + events.o fdlist.o hash.o help.o ircd.o ircsprintf.o list.o \ match.o modules.o packet.o parse.o s_auth.o \ s_conf.o s_debug.o s_dispatch.o s_err.o s_extra.o s_kline.o \ s_misc.o s_numeric.o s_serv.o s_svs.o $(STRTOUL) socket.o \ @@ -174,9 +174,6 @@ ircd.o: ircd.c $(INCLUDES) list.o: list.c $(INCLUDES) $(CC) $(CFLAGS) -c list.c -lusers.o: lusers.c $(INCLUDES) - $(CC) $(CFLAGS) -c lusers.c - res.o: res.c $(INCLUDES) ../include/res.h $(CC) $(CFLAGS) -c res.c diff --git a/src/ircd.c b/src/ircd.c index 7c3fe97c8..632aa9c4c 100644 --- a/src/ircd.c +++ b/src/ircd.c @@ -99,7 +99,7 @@ int R_do_dns, R_fin_dns, R_fin_dnsc, R_fail_dns, R_do_id, R_fin_id, R_fail_id; char REPORT_DO_DNS[256], REPORT_FIN_DNS[256], REPORT_FIN_DNSC[256], REPORT_FAIL_DNS[256], REPORT_DO_ID[256], REPORT_FIN_ID[256], REPORT_FAIL_ID[256]; -extern ircstats IRCstats; +ircstats IRCstats; aClient me; /* That's me */ MODVAR char *me_hash; extern char backupbuf[8192]; @@ -1098,7 +1098,10 @@ int InitwIRCD(int argc, char *argv[]) bzero(&StatsZ, sizeof(StatsZ)); setup_signals(); charsys_reset(); - init_ircstats(); + + memset(&IRCstats, '\0', sizeof(ircstats)); + IRCstats.servers = 1; + #ifdef USE_LIBCURL url_init(); #endif diff --git a/src/lusers.c b/src/lusers.c deleted file mode 100644 index 0dec574ec..000000000 --- a/src/lusers.c +++ /dev/null @@ -1,62 +0,0 @@ -/************************************************************************ - * Unreal Internet Relay Chat Daemon, src/lusers.c - * (C) Carsten Munk 2000 - * - * See file AUTHORS in IRC package for additional names of - * the programmers. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 1, or (at your option) - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include "struct.h" -#include "common.h" -#include "sys.h" -#include "numeric.h" -#include "msg.h" -#include "channel.h" -#include "version.h" -#include -#include -#include -#include -#include -#ifdef _WIN32 -#include -#endif -#include -#include "h.h" - -ID_Copyright("(C) Carsten Munk 2000"); - -ircstats IRCstats; - -#ifdef IRC_COMMENT -int clients; /* total */ -int invisible; /* invisible */ -int servers; /* servers */ -int operators; /* operators */ -int unknown; /* unknown local connections */ -int channels; /* channels */ -int me_clients; /* my clients */ -int me_servers; /* my servers */ -int me_max; /* local max */ -int global_max; /* global max */ -#endif - -void init_ircstats(void) -{ - bzero(&IRCstats, sizeof(IRCstats)); - IRCstats.servers = 1; -}