remove RTA support

This commit is contained in:
Mark 2005-03-16 21:03:23 +00:00
parent 8e06a53bcd
commit 6683c4619c
47 changed files with 51 additions and 1063 deletions

60
.gitattributes vendored
View file

@ -58,6 +58,29 @@ doc/old/INSTALL.pt -text
doc/old/README.pt -text
doc/read-faq -text
doc/read-userman -text
graveyard/include/rtaserv.h -text
graveyard/lib/rta/Makefile.am -text
graveyard/lib/rta/Makefile.in -text
graveyard/lib/rta/README -text
graveyard/lib/rta/api.c -text
graveyard/lib/rta/do_sql.c -text
graveyard/lib/rta/do_sql.h -text
graveyard/lib/rta/parse.tab.h -text
graveyard/lib/rta/parse.y -text
graveyard/lib/rta/rta.h -text
graveyard/lib/rta/rtatables.c -text
graveyard/lib/rta/token.l -text
graveyard/lib/rtawin32/api.c -text
graveyard/lib/rtawin32/do_sql.c -text
graveyard/lib/rtawin32/do_sql.h -text
graveyard/lib/rtawin32/parse.tab.c -text
graveyard/lib/rtawin32/parse.tab.h -text
graveyard/lib/rtawin32/parse.y -text
graveyard/lib/rtawin32/rta.h -text
graveyard/lib/rtawin32/rta.vcproj -text
graveyard/lib/rtawin32/rtatables.c -text
graveyard/lib/rtawin32/token.c -text
graveyard/lib/rtawin32/token.l -text
graveyard/modules/loveserv/.indent.pro -text
graveyard/modules/loveserv/Makefile.am -text
graveyard/modules/loveserv/Makefile.in -text
@ -76,6 +99,12 @@ graveyard/modules/moraleserv/ms_help.c -text
graveyard/modules/neoserv/Makefile -text
graveyard/modules/neoserv/neoserv.c -text
graveyard/modules/neoserv/neoserv_help.c -text
graveyard/src/rtabans.c -text
graveyard/src/rtachannels.c -text
graveyard/src/rtamodules.c -text
graveyard/src/rtaserv.c -text
graveyard/src/rtaservers.c -text
graveyard/src/rtausers.c -text
include/Makefile.am -text
include/Makefile.in -text
include/auth.h -text
@ -110,7 +139,6 @@ include/nsdba.h -text
include/nsdbm.h -text
include/numeric.h -text
include/numerics.h -text
include/rtaserv.h -text
include/servers.h eol=lf
include/services.h eol=lf
include/settings.h -text
@ -442,28 +470,6 @@ lib/pcre/pcre.c eol=lf
lib/pcre/pcre.h -text
lib/pcre/pcre.vcproj -text
lib/pcre/study.c eol=lf
lib/rta/Makefile.am -text
lib/rta/Makefile.in -text
lib/rta/README -text
lib/rta/api.c -text
lib/rta/do_sql.c -text
lib/rta/do_sql.h -text
lib/rta/parse.tab.h -text
lib/rta/parse.y -text
lib/rta/rta.h -text
lib/rta/rtatables.c -text
lib/rta/token.l -text
lib/rtawin32/api.c -text
lib/rtawin32/do_sql.c -text
lib/rtawin32/do_sql.h -text
lib/rtawin32/parse.tab.c -text
lib/rtawin32/parse.tab.h -text
lib/rtawin32/parse.y -text
lib/rtawin32/rta.h -text
lib/rtawin32/rta.vcproj -text
lib/rtawin32/rtatables.c -text
lib/rtawin32/token.c -text
lib/rtawin32/token.l -text
logs/.keepme -text
/makeconf -text
modules/.indent.pro -text
@ -537,8 +543,6 @@ modules/statserv/stats.h -text
modules/statserv/statserv.c -text
modules/statserv/statserv.h -text
modules/statserv/statserv.vcproj -text
modules/statserv/statsrta.c -text
modules/statserv/statsrta.h -text
modules/statserv/tld.c -text
modules/statserv/tld.h -text
modules/statserv/user.c -text
@ -651,12 +655,6 @@ src/protocol/unreal32.vcproj -text
src/protocol/viagra.c -text
src/protocol/viagra.h -text
src/protocol/viagra.vcproj -text
src/rtabans.c -text
src/rtachannels.c -text
src/rtamodules.c -text
src/rtaserv.c -text
src/rtaservers.c -text
src/rtausers.c -text
src/servers.c eol=lf
src/services.c eol=lf
src/settings.c -text

View file

@ -4,6 +4,7 @@ Anything we add/remove/fix/change is in here (even our rants)
Fish (F), Mark (M), DeadNotBuried (D)
===============================================================================
* NeoStats * Version 3.0.a3-dev
- Remove RTA support. (M)
- Add Umask function so our config files are not world/group readable, and
update htmlstats in statserv to change the permissions after writting out
the file (F)

6
configure vendored
View file

@ -1558,7 +1558,7 @@ x_maj=3
x_min='0'
x_rev="a3-dev"
x_package='NeoStats'
MODULES="connectserv hostserv statserv ircdauth extauth textserv"
MODULES="connectserv hostserv statserv ircdauth extauth textserv operlog"
#dont edit anything after this line!
x_version=$x_maj.$x_min.$x_rev
@ -28872,7 +28872,7 @@ fi;
ac_config_files="$ac_config_files Makefile include/Makefile src/Makefile src/protocol/Makefile src/dbm/Makefile lib/Makefile lib/curl/Makefile lib/adns/Makefile lib/pcre/Makefile lib/rta/Makefile lib/event/Makefile modules/Makefile modules/connectserv/Makefile modules/extauth/Makefile modules/hostserv/Makefile modules/ircdauth/Makefile modules/statserv/Makefile modules/textserv/Makefile neostats"
ac_config_files="$ac_config_files Makefile include/Makefile src/Makefile src/protocol/Makefile src/dbm/Makefile lib/Makefile lib/curl/Makefile lib/adns/Makefile lib/pcre/Makefile lib/event/Makefile modules/Makefile modules/connectserv/Makefile modules/extauth/Makefile modules/hostserv/Makefile modules/ircdauth/Makefile modules/statserv/Makefile modules/textserv/Makefile modules/operlog/Makefile neostats"
cat >confcache <<\_ACEOF
@ -29518,7 +29518,6 @@ do
"lib/curl/Makefile" ) CONFIG_FILES="$CONFIG_FILES lib/curl/Makefile" ;;
"lib/adns/Makefile" ) CONFIG_FILES="$CONFIG_FILES lib/adns/Makefile" ;;
"lib/pcre/Makefile" ) CONFIG_FILES="$CONFIG_FILES lib/pcre/Makefile" ;;
"lib/rta/Makefile" ) CONFIG_FILES="$CONFIG_FILES lib/rta/Makefile" ;;
"lib/event/Makefile" ) CONFIG_FILES="$CONFIG_FILES lib/event/Makefile" ;;
"modules/Makefile" ) CONFIG_FILES="$CONFIG_FILES modules/Makefile" ;;
"modules/connectserv/Makefile" ) CONFIG_FILES="$CONFIG_FILES modules/connectserv/Makefile" ;;
@ -29527,6 +29526,7 @@ do
"modules/ircdauth/Makefile" ) CONFIG_FILES="$CONFIG_FILES modules/ircdauth/Makefile" ;;
"modules/statserv/Makefile" ) CONFIG_FILES="$CONFIG_FILES modules/statserv/Makefile" ;;
"modules/textserv/Makefile" ) CONFIG_FILES="$CONFIG_FILES modules/textserv/Makefile" ;;
"modules/operlog/Makefile" ) CONFIG_FILES="$CONFIG_FILES modules/operlog/Makefile" ;;
"neostats" ) CONFIG_FILES="$CONFIG_FILES neostats" ;;
"$ac_config_libobj_dir/fnmatch.h" ) CONFIG_LINKS="$CONFIG_LINKS $ac_config_libobj_dir/fnmatch.h:$ac_config_libobj_dir/fnmatch_.h" ;;
"depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;

View file

@ -363,7 +363,6 @@ AC_CONFIG_FILES([Makefile
lib/curl/Makefile
lib/adns/Makefile
lib/pcre/Makefile
lib/rta/Makefile
lib/event/Makefile
modules/Makefile
modules/connectserv/Makefile

View file

@ -1444,6 +1444,4 @@ EXPORTFUNC void ClearServerModValue( Client *s );
EXPORTFUNC void SetServerModValue( Client *s, void *data );
EXPORTFUNC void *GetServerModValue( Client *s );
EXPORTFUNC void rtaserv_add_table( void *ptbl );
#endif /* NEOSTATS_H */

View file

@ -1,7 +1,7 @@
pkglib_LTLIBRARIES = statserv.la
statserv_la_SOURCES = ss_help.c \
stats.c stats.h statserv.c statserv.h \
htmlstats.c htmlstats.h statsrta.c statsrta.h \
htmlstats.c htmlstats.h \
tld.c tld.h channel.c channel.h \
user.c user.h network.c network.h \
server.c server.h version.c version.h \
@ -10,7 +10,7 @@ statserv_la_SOURCES = ss_help.c \
geoip/GeoIP.c geoip/GeoIP.h \
geoip/global.h geoip/md5.c geoip/md5.h
statserv_la_LDFLAGS = -module -avoid-version -no-undefined
AM_CFLAGS = @PCRE_CFLAGS@ @CURL_CFLAGS@ -I$(top_srcdir)/lib/keeper/ -I$(top_srcdir)/lib/rta/ -I$(top_srcdir)/lib/adns/ -Igeoip -DGEOIPDATADIR=\"$(datadir)\" \
AM_CFLAGS = @PCRE_CFLAGS@ @CURL_CFLAGS@ -I$(top_srcdir)/lib/keeper/ -I$(top_srcdir)/lib/adns/ -Igeoip -DGEOIPDATADIR=\"$(datadir)\" \
-DSYSCONFDIR=\"$(sysconfdir)\"
dist_data_DATA = GeoIP.dat html/index.tpl
include $(top_srcdir)/autotools/rules.mk

View file

@ -65,8 +65,8 @@ pkglibLTLIBRARIES_INSTALL = $(INSTALL)
LTLIBRARIES = $(pkglib_LTLIBRARIES)
statserv_la_LIBADD =
am_statserv_la_OBJECTS = ss_help.lo stats.lo statserv.lo htmlstats.lo \
statsrta.lo tld.lo channel.lo user.lo network.lo server.lo \
version.lo GeoIPCity.lo GeoIPBitReader.lo GeoIP.lo md5.lo
tld.lo channel.lo user.lo network.lo server.lo version.lo \
GeoIPCity.lo GeoIPBitReader.lo GeoIP.lo md5.lo
statserv_la_OBJECTS = $(am_statserv_la_OBJECTS)
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/include -I$(top_builddir)/lib/gdbm
depcomp = $(SHELL) $(top_srcdir)/autotools/depcomp
@ -210,7 +210,7 @@ wi_PWD = @wi_PWD@
pkglib_LTLIBRARIES = statserv.la
statserv_la_SOURCES = ss_help.c \
stats.c stats.h statserv.c statserv.h \
htmlstats.c htmlstats.h statsrta.c statsrta.h \
htmlstats.c htmlstats.h \
tld.c tld.h channel.c channel.h \
user.c user.h network.c network.h \
server.c server.h version.c version.h \
@ -220,7 +220,7 @@ statserv_la_SOURCES = ss_help.c \
geoip/global.h geoip/md5.c geoip/md5.h
statserv_la_LDFLAGS = -module -avoid-version -no-undefined
AM_CFLAGS = @PCRE_CFLAGS@ @CURL_CFLAGS@ -I$(top_srcdir)/lib/keeper/ -I$(top_srcdir)/lib/rta/ -I$(top_srcdir)/lib/adns/ -Igeoip -DGEOIPDATADIR=\"$(datadir)\" \
AM_CFLAGS = @PCRE_CFLAGS@ @CURL_CFLAGS@ -I$(top_srcdir)/lib/keeper/ -I$(top_srcdir)/lib/adns/ -Igeoip -DGEOIPDATADIR=\"$(datadir)\" \
-DSYSCONFDIR=\"$(sysconfdir)\"
dist_data_DATA = GeoIP.dat html/index.tpl
@ -297,7 +297,6 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ss_help.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stats.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/statserv.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/statsrta.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tld.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/user.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/version.Plo@am__quote@

View file

@ -30,7 +30,6 @@
#include "neostats.h"
#include "statserv.h"
#include "statsrta.h"
#include "stats.h"
#include "network.h"
#include "server.h"
@ -186,7 +185,6 @@ int ModSynch (void)
SET_SEGV_LOCATION();
/* RTA init must be in synch since core does not start
RTA during the init cycle when NeoStats first boots */
InitRTAStats ();
ss_bot = AddBot (&ss_botinfo);
if (!ss_bot) {
return NS_FAILURE;
@ -226,7 +224,6 @@ int ModFini (void)
FiniChannelStats ();
FiniTLDStatistics ();
FiniVersionStats ();
FiniRTAStats();
FiniNetworkStats();
return NS_SUCCESS;
}

View file

@ -141,9 +141,6 @@
<File
RelativePath=".\statserv.c">
</File>
<File
RelativePath=".\statsrta.c">
</File>
<File
RelativePath=".\tld.c">
</File>
@ -176,9 +173,6 @@
<File
RelativePath=".\statserv.h">
</File>
<File
RelativePath=".\statsrta.h">
</File>
<File
RelativePath=".\tld.h">
</File>

View file

@ -1,919 +0,0 @@
/* NeoStats - IRC Statistical Services
** Copyright (c) 1999-2005 Adam Rutter, Justin Hammond, Mark Hetherington
** http://www.neostats.net/
**
** Portions Copyright (c) 2000-2001 ^Enigma^
**
** 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 2 of the License, 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
** USA
**
** NeoStats CVS Identification
** $Id$
*/
#include "neostats.h"
#include "statserv.h"
#include "stats.h"
#include "network.h"
#include "channel.h"
#include "tld.h"
#include "server.h"
#include "version.h"
#include "rta.h"
#if 0
static int zerovalue = 0;
void *display_channel_current_users (void *tbl, char *col, char *sql, void *row)
{
channelstat *data = row;
if (data->c)
return &data->c->users;
return &zerovalue;
}
COLDEF statserv_chanscols[] = {
{
"statserv_chans",
"name",
RTA_STR,
MAXCHANLEN,
offsetof(struct channelstat, name),
RTA_READONLY,
NULL,
NULL,
"The name of the channel"
},
{
"statserv_chans",
"nomems",
RTA_INT,
sizeof(int),
0,
RTA_READONLY,
display_channel_current_users,
NULL,
"The no of users in the channel"
},
{
"statserv_chans",
"topics",
RTA_INT,
sizeof(int),
offsetof(struct channelstat, topics),
RTA_READONLY,
NULL,
NULL,
"The no of Topic Changes"
},
{
"statserv_chans",
"totmem",
RTA_INT,
sizeof(int),
offsetof(struct channelstat, totmem),
RTA_READONLY,
NULL,
NULL,
"The total joins ever on this channel"
},
{
"statserv_chans",
"kicks",
RTA_INT,
sizeof(int),
offsetof(struct channelstat, kicks),
RTA_READONLY,
NULL,
NULL,
"The total number of kicks in this channel"
},
{
"statserv_chans",
"topicstoday",
RTA_INT,
sizeof(int),
offsetof(struct channelstat, topicstoday),
RTA_READONLY,
NULL,
NULL,
"The number of topic changes today"
},
{
"statserv_chans",
"joinstoday",
RTA_INT,
sizeof(int),
offsetof(struct channelstat, joinstoday),
RTA_READONLY,
NULL,
NULL,
"The number of joins today"
},
{
"statserv_chans",
"kickstoday",
RTA_INT,
sizeof(int),
offsetof(struct channelstat, maxkickstoday),
RTA_READONLY,
NULL,
NULL,
"The number of kicks today"
},
{
"statserv_chans",
"maxmemtoday",
RTA_INT,
sizeof(int),
offsetof(struct channelstat, maxmemtoday),
RTA_READONLY,
NULL,
NULL,
"The Max no of members today"
},
{
"statserv_chans",
"maxmemtodaytime",
RTA_INT,
sizeof(int),
offsetof(struct channelstat, t_maxmemtoday),
RTA_READONLY,
NULL,
NULL,
"The time of max no of members today"
},
{
"statserv_chans",
"maxmem",
RTA_INT,
sizeof(int),
offsetof(struct channelstat, maxmems),
RTA_READONLY,
NULL,
NULL,
"The Max no of members this channel had ever."
},
{
"statserv_chans",
"maxmemtime",
RTA_INT,
sizeof(int),
offsetof(struct channelstat, t_maxmems),
RTA_READONLY,
NULL,
NULL,
"The time when max no of members this channel had ever."
},
{
"statserv_chans",
"maxkicks",
RTA_INT,
sizeof(int),
offsetof(struct channelstat, maxkicks),
RTA_READONLY,
NULL,
NULL,
"The Max no of kicks a channel had in a single day."
},
{
"statserv_chans",
"maxkickstime",
RTA_INT,
sizeof(int),
offsetof(struct channelstat, t_maxkicks),
RTA_READONLY,
NULL,
NULL,
"The time this channel had the Max kicks"
},
{
"statserv_chans",
"maxjoins",
RTA_INT,
sizeof(int),
offsetof(struct channelstat, maxjoins),
RTA_READONLY,
NULL,
NULL,
"The Max no of joins a channel had in a day"
},
{
"statserv_chans",
"maxjoinstime",
RTA_INT,
sizeof(int),
offsetof(struct channelstat, t_maxjoins),
RTA_READONLY,
NULL,
NULL,
"The time the max no of joins a channel had in a day"
},
};
TBLDEF statserv_chans = {
"statserv_chans",
NULL, /* for now */
sizeof(struct channelstat),
0,
TBL_LIST,
statserv_chanscols,
sizeof(statserv_chanscols) / sizeof(COLDEF),
"",
"The stats of online Channels on the IRC network"
};
void *display_server_current_users (void *tbl, char *col, char *sql, void *row)
{
serverstat *data = row;
if (data->s)
return &data->s->server->users;
return &zerovalue;
}
COLDEF statserv_serverscols[] = {
{
"serverstat",
"name",
RTA_STR,
MAXHOST,
offsetof(struct serverstat, name),
RTA_READONLY,
NULL,
NULL,
"The name of the server"
},
{
"serverstat",
"users",
RTA_INT,
sizeof(int),
0,
RTA_READONLY,
display_server_current_users,
NULL,
"The no of users on the server"
},
{
"serverstat",
"opers",
RTA_INT,
sizeof(int),
offsetof(struct serverstat, opers),
RTA_READONLY,
NULL,
NULL,
"The no of Opers on this server"
},
{
"serverstat",
"lowestping",
RTA_INT,
sizeof(int),
offsetof(struct serverstat, lowest_ping),
RTA_READONLY,
NULL,
NULL,
"The lowest ping this server had"
},
{
"serverstat",
"highestping",
RTA_INT,
sizeof(int),
offsetof(struct serverstat, highest_ping),
RTA_READONLY,
NULL,
NULL,
"The highest ping this server had"
},
{
"serverstat",
"lowestpingtime",
RTA_INT,
sizeof(int),
offsetof(struct serverstat, t_lowest_ping),
RTA_READONLY,
NULL,
NULL,
"The time of the lowest ping"
},
{
"serverstat",
"highestpingtime",
RTA_INT,
sizeof(int),
offsetof(struct serverstat, t_highest_ping),
RTA_READONLY,
NULL,
NULL,
"The time of the highest ping"
},
{
"serverstat",
"numsplits",
RTA_INT,
sizeof(int),
offsetof(struct serverstat, numsplits),
RTA_READONLY,
NULL,
NULL,
"The number of splits this server has had"
},
{
"serverstat",
"maxusers",
RTA_INT,
sizeof(int),
offsetof(struct serverstat, maxusers),
RTA_READONLY,
NULL,
NULL,
"The Max no of users this server has had"
},
{
"serverstat",
"maxuserstime",
RTA_INT,
sizeof(int),
offsetof(struct serverstat, t_maxusers),
RTA_READONLY,
NULL,
NULL,
"The time of of max users record"
},
{
"serverstat",
"maxopers",
RTA_INT,
sizeof(int),
offsetof(struct serverstat, maxopers),
RTA_READONLY,
NULL,
NULL,
"The Max no of opers this server has ever had"
},
{
"serverstat",
"maxoperstime",
RTA_INT,
sizeof(int),
offsetof(struct serverstat, t_maxopers),
RTA_READONLY,
NULL,
NULL,
"The time of the maxopers record"
},
{
"serverstat",
"ts_lastseen",
RTA_INT,
sizeof(int),
offsetof(struct serverstat, ts_lastseen),
RTA_READONLY,
NULL,
NULL,
"When was this server last seen"
},
{
"serverstat",
"ts_start",
RTA_INT,
sizeof(int),
offsetof(struct serverstat, ts_start),
RTA_READONLY,
NULL,
NULL,
"when was this server first seen"
},
{
"serverstat",
"operkills",
RTA_INT,
sizeof(int),
offsetof(struct serverstat, operkills),
RTA_READONLY,
NULL,
NULL,
"The no of oper issued kills for this server"
},
{
"serverstat",
"serverkills",
RTA_INT,
sizeof(int),
offsetof(struct serverstat, serverkills),
RTA_READONLY,
NULL,
NULL,
"The no of Server issued kills"
},
{
"serverstat",
"totalusers",
RTA_INT,
sizeof(int),
offsetof(struct serverstat, totusers),
RTA_READONLY,
NULL,
NULL,
"The total no of users ever connected to this server"
},
{
"serverstat",
"daily_totalusers",
RTA_INT,
sizeof(int),
offsetof(struct serverstat, daily_totusers),
RTA_READONLY,
NULL,
NULL,
"The total no of users connected to this server today"
},
};
TBLDEF statserv_servers = {
"statserv_servers",
NULL, /* for now */
sizeof(struct serverstat),
0,
TBL_HASH,
statserv_serverscols,
sizeof(statserv_serverscols) / sizeof(COLDEF),
"",
"The stats of servers on the IRC network"
};
COLDEF statserv_versionscols[] = {
{
"statserv_versions",
"name",
RTA_STR,
BUFSIZE,
offsetof(struct ctcpversionstat, name),
RTA_READONLY,
NULL,
NULL,
"The client version"
},
{
"statserv_versions",
"count",
RTA_INT,
sizeof(int),
offsetof(struct ctcpversionstat, count),
RTA_READONLY,
NULL,
NULL,
"The no of hits on this client version"
},
};
TBLDEF statserv_versions = {
"statserv_versions",
NULL, /* for now */
sizeof(struct ctcpversionstat),
0,
TBL_LIST,
statserv_versionscols,
sizeof(statserv_versionscols) / sizeof(COLDEF),
"",
"The stats of IRC client versions on the IRC network"
};
COLDEF statserv_tldcols[] = {
{
"statserv_tld",
"tld",
RTA_STR,
5,
offsetof(TLD, tld),
RTA_READONLY,
NULL,
NULL,
"The tld name"
},
{
"statserv_tld",
"country",
RTA_STR,
32,
offsetof(TLD, country),
RTA_READONLY,
NULL,
NULL,
"The Country name"
},
{
"statserv_tld",
"users",
RTA_INT,
sizeof(int),
offsetof(TLD, users),
RTA_READONLY,
NULL,
NULL,
"The No of Online Users"
},
#if 0
{
"statserv_tld",
"daily_users",
RTA_INT,
sizeof(int),
offsetof(TLD, daily_users),
RTA_READONLY,
NULL,
NULL,
"The No of Users connected today"
},
#endif
};
TBLDEF statserv_tld = {
"statserv_tld",
NULL, /* for now */
sizeof(TLD),
0,
TBL_LIST,
statserv_tldcols,
sizeof(statserv_tldcols) / sizeof(COLDEF),
"",
"The TLD stats of the IRC network"
};
void *display_network_current_users (void *tbl, char *col, char *sql, void *row)
{
return &networkstats.users.current;
}
void *display_network_current_away (void *tbl, char *col, char *sql, void *row)
{
return &me.awaycount;
}
void *display_network_current_channels (void *tbl, char *col, char *sql, void *row)
{
return &networkstats.channels.current;
}
void *display_network_current_servers (void *tbl, char *col, char *sql, void *row)
{
return &networkstats.servers.current;
}
static char fmtime[TIMEBUFSIZE];
void *display_timestamp_maxopers (void *tbl, char *col, char *sql, void *row)
{
struct tm *ltm;
struct stats_network_ *data = row;
ltm = localtime (&data->t_maxopers);
strftime (fmtime, TIMEBUFSIZE, "%a %b %d %Y %I:%M", ltm);
return fmtime;
}
COLDEF statserv_networkcols[] = {
{
"statserv_network",
"opers",
RTA_INT,
sizeof(int),
offsetof(struct stats_network_, opers),
RTA_READONLY,
NULL,
NULL,
"The no of opers on the network"
},
{
"statserv_network",
"chans",
RTA_INT,
sizeof(int),
0,
RTA_READONLY,
display_network_current_channels,
NULL,
"The no of channels on the network"
},
{
"statserv_network",
"maxopers",
RTA_INT,
sizeof(int),
offsetof(struct stats_network_, maxopers),
RTA_READONLY,
NULL,
NULL,
"The max no of opers on the network"
},
{
"statserv_network",
"maxoperstime",
RTA_STR,//RTA_INT,
sizeof(int),
0, //offsetof(struct stats_network_, t_maxopers),
RTA_READONLY,
display_timestamp_maxopers,
NULL,
"The time of max no of opers on the network"
},
{
"statserv_network",
"users",
RTA_INT,
sizeof(int),
0,
RTA_READONLY,
display_network_current_users,
NULL,
"The max no of users on the network"
},
{
"statserv_network",
"totusers",
RTA_INT,
sizeof(int),
offsetof(struct stats_network_, totusers),
RTA_READONLY,
NULL,
NULL,
"The no of users ever connected to the network"
},
{
"statserv_network",
"maxusers",
RTA_INT,
sizeof(int),
offsetof(struct stats_network_, maxusers),
RTA_READONLY,
NULL,
NULL,
"The max no of users connected to the network"
},
{
"statserv_network",
"maxuserstime",
RTA_INT,
sizeof(int),
offsetof(struct stats_network_, t_maxusers),
RTA_READONLY,
NULL,
NULL,
"The time of max no of users connected to the network"
},
{
"statserv_network",
"away",
RTA_INT,
sizeof(int),
0,
RTA_READONLY,
display_network_current_away,
NULL,
"The no of users marked away"
},
{
"statserv_network",
"servers",
RTA_INT,
sizeof(int),
0,
RTA_READONLY,
display_network_current_servers,
NULL,
"The no of servers connected to the network"
},
{
"statserv_network",
"maxservers",
RTA_INT,
sizeof(int),
offsetof(struct stats_network_, maxservers),
RTA_READONLY,
NULL,
NULL,
"The Max no of servers ever connected to the network"
},
{
"statserv_network",
"maxserverstime",
RTA_INT,
sizeof(int),
offsetof(struct stats_network_, t_maxservers),
RTA_READONLY,
NULL,
NULL,
"The time of Max no of servers ever connected to the network"
},
{
"statserv_network",
"maxchans",
RTA_INT,
sizeof(int),
offsetof(struct stats_network_, maxchans),
RTA_READONLY,
NULL,
NULL,
"The Max no of channels ever on the network"
},
{
"statserv_network",
"maxchanstime",
RTA_INT,
sizeof(int),
offsetof(struct stats_network_, t_chans),
RTA_READONLY,
NULL,
NULL,
"The time of Max no of channels ever on the network"
},
};
TBLDEF statserv_network = {
"statserv_network",
NULL, /* for now */
sizeof(struct stats_network_),
0,
TBL_LIST, /* this list will be faked up */
statserv_networkcols,
sizeof(statserv_networkcols) / sizeof(COLDEF),
"",
"The network stats"
};
list_t *fakenetwork;
COLDEF statserv_dailycols[] = {
{
"statserv_daily",
"servers",
RTA_INT,
sizeof(int),
offsetof(struct Daily, servers),
RTA_READONLY,
NULL,
NULL,
"The Max no of servers connected today"
},
{
"statserv_daily",
"serverstime",
RTA_INT,
sizeof(int),
offsetof(struct Daily, t_servers),
RTA_READONLY,
NULL,
NULL,
"The time of the Max no of servers today"
},
{
"statserv_daily",
"maxusers",
RTA_INT,
sizeof(int),
offsetof(struct Daily, users),
RTA_READONLY,
NULL,
NULL,
"The max no of users on the network today"
},
{
"statserv_daily",
"maxuserstime",
RTA_INT,
sizeof(int),
offsetof(struct Daily, t_users),
RTA_READONLY,
NULL,
NULL,
"The time of max no of users today"
},
{
"statserv_daily",
"maxopers",
RTA_INT,
sizeof(int),
offsetof(struct Daily, opers),
RTA_READONLY,
NULL,
NULL,
"The max no of opers on the network today"
},
{
"statserv_daily",
"maxoperstime",
RTA_INT,
sizeof(int),
offsetof(struct Daily, t_opers),
RTA_READONLY,
NULL,
NULL,
"The no of opers connected to the network today"
},
{
"statserv_daily",
"totalusers",
RTA_INT,
sizeof(int),
offsetof(struct Daily, tot_users),
RTA_READONLY,
NULL,
NULL,
"The no of users connected to the network today"
},
{
"statserv_daily",
"maxchans",
RTA_INT,
sizeof(int),
offsetof(struct Daily, chans),
RTA_READONLY,
NULL,
NULL,
"The max no of channels on the network today"
},
{
"statserv_daily",
"maxchanstime",
RTA_INT,
sizeof(int),
offsetof(struct Daily, t_chans),
RTA_READONLY,
NULL,
NULL,
"The time of the max no of channels on the network today"
},
};
TBLDEF statserv_daily = {
"statserv_daily",
NULL, /* for now */
sizeof(struct Daily),
0,
TBL_LIST, /* will be faked up */
statserv_dailycols,
sizeof(statserv_dailycols) / sizeof(COLDEF),
"",
"The daily network stats"
};
list_t *fakedaily;
#endif
void InitRTAStats (void)
{
#if 0
/* ok, now export the server and chan data into the sql emulation layers */
/* for the network and daily stats, we use a fake list, so we can easily import into rta */
fakedaily = list_create(-1);
lnode_create_append (fakedaily, &daily);
fakenetwork = list_create(-1);
lnode_create_append (fakenetwork, &stats_network);
/* find the address of each list/hash, and export to rta */
statserv_chans.address = channelstatlist;
rtaserv_add_table (&statserv_chans);
statserv_tld.address = tldstatlist;
rtaserv_add_table (&statserv_tld);
statserv_servers.address = serverstathash;
rtaserv_add_table (&statserv_servers);
statserv_versions.address = versionstatlist;
rtaserv_add_table (&statserv_versions);
statserv_network.address = fakenetwork;
rtaserv_add_table (&statserv_network);
statserv_daily.address = fakedaily;
rtaserv_add_table (&statserv_daily);
#endif
}
void FiniRTAStats (void)
{
#if 0
list_destroy_nodes (fakedaily);
list_destroy (fakedaily);
list_destroy_nodes (fakenetwork);
list_destroy (fakenetwork);
#endif
}

View file

@ -1,32 +0,0 @@
/* NeoStats - IRC Statistical Services
** Copyright (c) 1999-2005 Adam Rutter, Justin Hammond, Mark Hetherington
** http://www.neostats.net/
**
** Portions Copyright (c) 2000-2001 ^Enigma^
**
** 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 2 of the License, 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
** USA
**
** NeoStats CVS Identification
** $Id$
*/
#ifndef STATSRTA_H
#define STATSRTA_H
void InitRTAStats (void);
void FiniRTAStats (void);
#endif

View file

@ -11,10 +11,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pcre", "lib\pcre\pcre.vcpro
ProjectSection(ProjectDependencies) = postProject
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rta", "lib\rtawin32\rta.vcproj", "{C41CD6E3-30A4-4BB9-BA51-F97B2CD77D56}"
ProjectSection(ProjectDependencies) = postProject
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gdbm", "lib\gdbm\gdbm.vcproj", "{C41CD6E3-30A4-4BB9-BA51-F97B2CD77D56}"
ProjectSection(ProjectDependencies) = postProject
EndProjectSection
@ -45,10 +41,6 @@ Global
{C41CD6E3-30A4-4BB9-BA51-F97B2CD77D56}.Debug.Build.0 = Debug|Win32
{C41CD6E3-30A4-4BB9-BA51-F97B2CD77D56}.Release.ActiveCfg = Release|Win32
{C41CD6E3-30A4-4BB9-BA51-F97B2CD77D56}.Release.Build.0 = Release|Win32
{C41CD6E3-30A4-4BB9-BA51-F97B2CD77D56}.Debug.ActiveCfg = Debug|Win32
{C41CD6E3-30A4-4BB9-BA51-F97B2CD77D56}.Debug.Build.0 = Debug|Win32
{C41CD6E3-30A4-4BB9-BA51-F97B2CD77D56}.Release.ActiveCfg = Release|Win32
{C41CD6E3-30A4-4BB9-BA51-F97B2CD77D56}.Release.Build.0 = Release|Win32
{387B391F-49E3-4DBF-AC32-C97D8ADE78C7}.Debug.ActiveCfg = Debug|Win32
{387B391F-49E3-4DBF-AC32-C97D8ADE78C7}.Debug.Build.0 = Debug|Win32
{387B391F-49E3-4DBF-AC32-C97D8ADE78C7}.Release.ActiveCfg = Release|Win32

View file

@ -7,14 +7,13 @@ neostats_SOURCES = auth.c bans.c bots.c channels.c commands.c conf.c nsdba.c \
lang.c list.c log.c main.c match.c misc.c modules.c \
ns_help.c servers.c services.c signals.c sock.c support.c \
timer.c transfer.c users.c modes.c ctcp.c dcc.c oscalls.c nsmemory.c \
rtaserv.c rtabans.c rtachannels.c rtamodules.c rtaservers.c rtausers.c \
base64.c numerics.c settings.c botinfo.c
AM_CFLAGS = -I$(top_srcdir)/lib/adns -I$(top_srcdir)/lib/rta \
AM_CFLAGS = -I$(top_srcdir)/lib/adns \
@PCRE_CFLAGS@ @CURL_CFLAGS@ -DNEOSTATSCORE \
-I$(top_srcdir)/lib/event
neostats_LDADD = $(top_srcdir)/lib/rta/librtadb.a \
$(top_srcdir)/lib/adns/libadns.la @PCRE_LIBS@ @CURL_LIBS@ @LIBDB@ \
$(top_srcdir)/lib/event/libevent.a
neostats_LDADD = $(top_srcdir)/lib/adns/libadns.la \
@PCRE_LIBS@ @CURL_LIBS@ @LIBDB@ \
$(top_srcdir)/lib/event/libevent.a
neostats_LDFLAGS = --export-dynamic -rdynamic
include $(top_srcdir)/autotools/rules.mk

View file

@ -67,13 +67,10 @@ am_neostats_OBJECTS = auth.$(OBJEXT) bans.$(OBJEXT) bots.$(OBJEXT) \
services.$(OBJEXT) signals.$(OBJEXT) sock.$(OBJEXT) \
support.$(OBJEXT) timer.$(OBJEXT) transfer.$(OBJEXT) \
users.$(OBJEXT) modes.$(OBJEXT) ctcp.$(OBJEXT) dcc.$(OBJEXT) \
oscalls.$(OBJEXT) nsmemory.$(OBJEXT) rtaserv.$(OBJEXT) \
rtabans.$(OBJEXT) rtachannels.$(OBJEXT) rtamodules.$(OBJEXT) \
rtaservers.$(OBJEXT) rtausers.$(OBJEXT) base64.$(OBJEXT) \
oscalls.$(OBJEXT) nsmemory.$(OBJEXT) base64.$(OBJEXT) \
numerics.$(OBJEXT) settings.$(OBJEXT) botinfo.$(OBJEXT)
neostats_OBJECTS = $(am_neostats_OBJECTS)
neostats_DEPENDENCIES = $(top_srcdir)/lib/rta/librtadb.a \
$(top_srcdir)/lib/adns/libadns.la \
neostats_DEPENDENCIES = $(top_srcdir)/lib/adns/libadns.la \
$(top_srcdir)/lib/event/libevent.a
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/include -I$(top_builddir)/lib/gdbm
depcomp = $(SHELL) $(top_srcdir)/autotools/depcomp
@ -225,16 +222,15 @@ neostats_SOURCES = auth.c bans.c bots.c channels.c commands.c conf.c nsdba.c \
lang.c list.c log.c main.c match.c misc.c modules.c \
ns_help.c servers.c services.c signals.c sock.c support.c \
timer.c transfer.c users.c modes.c ctcp.c dcc.c oscalls.c nsmemory.c \
rtaserv.c rtabans.c rtachannels.c rtamodules.c rtaservers.c rtausers.c \
base64.c numerics.c settings.c botinfo.c
AM_CFLAGS = -I$(top_srcdir)/lib/adns -I$(top_srcdir)/lib/rta \
AM_CFLAGS = -I$(top_srcdir)/lib/adns \
@PCRE_CFLAGS@ @CURL_CFLAGS@ -DNEOSTATSCORE \
-I$(top_srcdir)/lib/event
neostats_LDADD = $(top_srcdir)/lib/rta/librtadb.a \
$(top_srcdir)/lib/adns/libadns.la @PCRE_LIBS@ @CURL_LIBS@ @LIBDB@ \
$(top_srcdir)/lib/event/libevent.a
neostats_LDADD = $(top_srcdir)/lib/adns/libadns.la \
@PCRE_LIBS@ @CURL_LIBS@ @LIBDB@ \
$(top_srcdir)/lib/event/libevent.a
neostats_LDFLAGS = --export-dynamic -rdynamic
LINK = $(LIBTOOL) --tag=CXX --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
@ -328,12 +324,6 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nsmemory.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/numerics.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/oscalls.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtabans.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtachannels.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtamodules.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtaserv.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtaservers.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtausers.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/servers.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/services.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/settings.Po@am__quote@

View file

@ -48,7 +48,6 @@
#include "signals.h"
#include "lang.h"
#include "nsdba.h"
#include "rtaserv.h"
#include "dcc.h"
#include "event.h"
@ -469,7 +468,6 @@ void do_exit( NS_EXIT_TYPE exitcode, char *quitmsg )
nlog( LOG_CRITICAL, exit_reports[exitcode].exit_message );
if( exitcode != NS_EXIT_SEGFAULT ) {
rtaserv_fini();
unload_modules();
DBACloseDatabase();
if( quitmsg )

View file

@ -32,7 +32,7 @@
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="Ws2_32.lib winmm.lib Iphlpapi.lib curld.lib pcred.lib adnsd.lib rtad.lib libevent.lib"
AdditionalDependencies="Ws2_32.lib winmm.lib Iphlpapi.lib curld.lib pcred.lib adnsd.lib libevent.lib"
OutputFile="$(OutDir)/neostats.exe"
LinkIncremental="2"
AdditionalLibraryDirectories="..\lib;..\lib\event\WIN32-Prj\Debug"
@ -81,7 +81,7 @@
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="Ws2_32.lib winmm.lib Iphlpapi.lib curl.lib pcre.lib adns.lib rta.lib libevent.lib"
AdditionalDependencies="Ws2_32.lib winmm.lib Iphlpapi.lib curl.lib pcre.lib adns.lib libevent.lib"
OutputFile="$(OutDir)/neostats.exe"
LinkIncremental="1"
AdditionalLibraryDirectories="..\lib;..\lib\event\WIN32-Prj\Release"
@ -209,24 +209,6 @@
<File
RelativePath=".\oscalls.c">
</File>
<File
RelativePath=".\rtabans.c">
</File>
<File
RelativePath=".\rtachannels.c">
</File>
<File
RelativePath=".\rtamodules.c">
</File>
<File
RelativePath=".\rtaserv.c">
</File>
<File
RelativePath=".\rtaservers.c">
</File>
<File
RelativePath=".\rtausers.c">
</File>
<File
RelativePath=".\servers.c">
</File>
@ -364,9 +346,6 @@
<File
RelativePath="..\..\src\win32\resource.h">
</File>
<File
RelativePath="..\include\rtaserv.h">
</File>
<File
RelativePath="..\include\servers.h">
</File>

View file

@ -38,7 +38,6 @@
#include "exclude.h"
#include "services.h"
#include "bans.h"
#include "rtaserv.h"
static int ns_cmd_shutdown( CmdParams *cmdparams );
static int ns_cmd_reload( CmdParams *cmdparams );
@ -221,7 +220,6 @@ int init_services_bot( void )
AddEventList( neostats_events );
ns_module.synched = 1;
me.synched = 1;
rtaserv_init();
SynchAllModules();
RequestServerUptimes();
return NS_SUCCESS;

View file

@ -43,7 +43,6 @@
#include "dotconf.h"
#include "services.h"
#include "ircd.h"
#include "rtaserv.h"
#include "dcc.h"
/* @brief Module Socket List hash */
@ -200,7 +199,6 @@ read_loop ()
/* add the fds for the curl library as well */
/* XXX Should this be a pollsize or maxfdsunused... not sure yet */
curl_multi_fdset(curlmultihandle, &readfds, &writefds, &errfds, &maxfdsunused);
rta_hook_1 (&readfds, &writefds);
dcc_hook_1 (&readfds, &writefds);
SelectResult = select (FD_SETSIZE, &readfds, &writefds, &errfds, TimeOut);
me.now = time(NULL);
@ -216,7 +214,6 @@ read_loop ()
while(CURLM_CALL_MULTI_PERFORM == curl_multi_perform(curlmultihandle, &maxfdsunused)) {
}
transfer_status();
rta_hook_2 (&readfds, &writefds);
dcc_hook_2 (&readfds, &writefds);
if (FD_ISSET (servsock, &readfds)) {
for (j = 0; j < BUFSIZE; j++) {