updated build stuff. Removed modules that were useless

This commit is contained in:
fishwaldo 2002-03-15 12:25:12 +00:00
parent 339a0acc67
commit d9b01f09c6
12 changed files with 0 additions and 3200 deletions

11
.gitattributes vendored
View file

@ -40,8 +40,6 @@ dl/cs/ChangeLog -text
dl/cs/Makefile -text dl/cs/Makefile -text
dl/cs/cs.c -text dl/cs/cs.c -text
dl/cs/cs_help.c -text dl/cs/cs_help.c -text
dl/helper/helper.c -text
dl/helper/ni_help.c -text
dl/hostserv/ChangeLog -text dl/hostserv/ChangeLog -text
dl/hostserv/Makefile -text dl/hostserv/Makefile -text
dl/hostserv/README -text dl/hostserv/README -text
@ -77,11 +75,6 @@ dl/operlog/ChangeLog -text
dl/operlog/Makefile -text dl/operlog/Makefile -text
dl/operlog/ol_help.c -text dl/operlog/ol_help.c -text
dl/operlog/operlog.c -text dl/operlog/operlog.c -text
dl/services/DOESNOTCOMPILE -text
dl/services/Makefile.am -text
dl/services/Makefile.in -text
dl/services/build -text
dl/services/services.c -text
dl/spam/Makefile -text dl/spam/Makefile -text
dl/spam/spam.c -text dl/spam/spam.c -text
dl/statserv/ChangeLog -text dl/statserv/ChangeLog -text
@ -90,10 +83,6 @@ dl/statserv/m_stats.h -text
dl/statserv/ss_help.c -text dl/statserv/ss_help.c -text
dl/statserv/statserv.c -text dl/statserv/statserv.c -text
dl/statserv/statserv.h -text dl/statserv/statserv.h -text
dl/tstats/m_stats.h -text
dl/tstats/ss_help.c -text
dl/tstats/statserv.c -text
dl/tstats/statserv.h -text
dl/version/Makefile -text dl/version/Makefile -text
dl/version/version.c -text dl/version/version.c -text
doc/FAQ -text doc/FAQ -text

View file

@ -1,144 +0,0 @@
/* NetStats - IRC Statistical Services Copyright (c) 1999 Adam Rutter,
** Justin Hammond http://codeworks.kamserve.com
*
** Based from GeoStats 1.1.0 by Johnathan George net@lite.net
*
** NetStats CVS Identification
** $Id: helper.c,v 1.1 2000/04/08 12:44:15 fishwaldo Exp $
*/
#include <stdio.h>
#include "dl.h"
#include "stats.h"
#include "dotconf.h"
const char helpversion_date[] = __DATE__;
const char helpversion_time[] = __TIME__;
char *s_Helper;
void ss_cb_Config(char *, int);
static config_option options[] = {
{ "HELPER_NICK", ARG_STR, ss_cb_Config, 0},
{ "HELPER_USER", ARG_STR, ss_cb_Config, 1},
{ "HELPER_HOST", ARG_STR, ss_cb_Config, 2},
{ "HELPER_VCHAN", ARG_STR, ss_cb_Config, 3}
};
void ss_cb_Config(char *arg, int configtype) {
if (configtype == 0) {
/* Nick */
memcpy(IcqServ.nick, arg, MAXNICK);
memcpy(s_Icq, IcqServ.nick, MAXNICK);
#ifdef DEBUG
log("IcqServ nick :%s ", arg);
#endif
} else if (configtype == 1) {
/* User */
memcpy(IcqServ.user, arg, 8);
} else if (configtype == 2) {
/* host */
memcpy(IcqServ.host, arg, MAXHOST);
} else if (configtype == 3) {
/* uin */
IcqServ.uin = atoi(arg);
} else if (configtype == 4) {
/* Server */
memcpy(IcqServ.server, arg, MAXHOST);
} else if (configtype == 5) {
/* Server */
memcpy(IcqServ.passwd, arg, MAXPASS);
}
}
Module_Info my_info[] = { {
"Helper",
"A Helper (+h) Module to give Helpers extra commands",
"1.0"
} };
int new_m_version(char *av, char *tmp) {
sts(":%s 351 %s :Module Helper Loaded, Version: %s %s %s",me.name,av,my_info[0].module_version,helpversion_date,helpversion_time);
return 0;
}
Functions my_fn_list[] = {
{ "VERSION", new_m_version, 1 },
{ NULL, NULL, 0 }
};
int __Bot_Message(char *origin, char *coreLine, int type)
{
User *u;
char *cmd, *nick, *chan ;
char *tmpcoreLine;
u = finduser(origin);
if (findbot(u->nick)) return 1;
if (!u) {
log("Unable to find user %s (NetInfo)", origin);
return -1;
}
tmpcoreLine = sstrdup(coreLine);
cmd = strtok(tmpcoreLine, " ");
if (!strcasecmp(cmd, "VJOIN")) {
if (u->Umode & UMODE_HELPOP) {
nick = strtok(NULL, " ");
if (!nick) {
privmsg(u->nick, s_Helper, "Incorrect Syntax: /msg %s vjoin <nick> <channel> <reason>", s_Helper);
return -1;
}
chan = strtok(NULL, " ");
if (!chan) {
privmsg(u->nick, s_Helper, "Incorrect Syntax: /msg %s vjoin <nick> <channel> <reason>", s_Helper);
return -1;
}
} else {
privmsg(u->nick, s_Helper, "Access Denied");
}
}
return 1;
}
int Online(Server *data) {
if (init_bot(s_Helper,"Service",me.name,"Helper Service", "+Sd", my_info[0].module_name) == -1 ) {
/* Nick was in use!!!! */
s_Helper = strcat(s_Helper, "_");
init_bot(s_Helper,"Service",me.name,"Helper Service", "+Sd", my_info[0].module_name);
}
return 1;
};
EventFnList my_event_list[] = {
{ "ONLINE", Online},
{ NULL, NULL}
};
Module_Info *__module_get_info() {
return my_info;
};
Functions *__module_get_functions() {
return my_fn_list;
};
EventFnList *__module_get_events() {
return my_event_list;
};
void _init() {
s_Helper = "Helper";
sts(":%s GLOBOPS :Helper Module Loaded",me.name);
}
void _fini() {
sts(":%s GLOBOPS :Helper Module Unloaded",me.name);
};

View file

@ -1,56 +0,0 @@
/* NetStats - IRC Statistical Services
** Copyright (c) 1999 Adam Rutter, Justin Hammond
** http://codeworks.kamserve.com
*
** Based from GeoStats 1.1.0 by Johnathan George net@lite.net
*
** NetStats CVS Identification
** $Id: ni_help.c,v 1.1 2000/06/10 09:16:06 fishwaldo Exp $
*/
const char *ni_help[] = {
"*** Netinfo Help ***",
"Commands:",
"\2Set\2 Set Specific Options up",
"\2Show\2 Show Specific Settings",
"\2Version\2 Shows you the current NetInfo Version.",
"End of Help.",
NULL
};
const char *ni_help_set[] = {
"*** Netinfo \2SET\2 Help ***",
"Commands:",
"\2AUTOJOIN <ON/OFF>\2:",
" Toggles the Setting of your AutoJoin.",
" The Administrator may setup Default Channels when you join",
" Turning this off means that you will not be autojoined when you connect",
" to the Network",
NULL
};
const char *ni_help_seto[] = {
"*** Administrator Commands:",
"\2MAP <ADD/DEL> <TLD> <CHANNEL> <MESSAGE>\2:",
" Allows you to add or Delete AutoJoin TLD to Channel Mapping",
" <TLD> :either a IP, or Hostmask. e.g: *.au or 203.202.181.*",
" <CHANNEL> :The Channel to Join the User to",
" <MESSAGE> :The Message to Send to the User when they are AutoJoined",
NULL,
};
const char *ni_help_show[] = {
"*** Netinfo \2SHOW\2 Help ***",
"\2Show\2",
" Shows your Current Settings,",
NULL
};
const char *ni_help_showo[] = {
"*** Administrator Options:",
"\2Show map\2",
" Shows you the Current TLD to Channel Mapping",
"\2Show ignore\2",
" Shows you the Current Ignore List",
NULL
};

View file

@ -1,3 +0,0 @@
as the Title says, this stuff won't work just yet
just for you to look at... :)
will be done by the time we make a release :0

View file

@ -1,217 +0,0 @@
# Makefile.in generated by automake 1.6 from Makefile.am.
# @configure_input@
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
# Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
SHELL = @SHELL@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
sbindir = @sbindir@
libexecdir = @libexecdir@
datadir = @datadir@
sysconfdir = @sysconfdir@
sharedstatedir = @sharedstatedir@
localstatedir = @localstatedir@
libdir = @libdir@
infodir = @infodir@
mandir = @mandir@
includedir = @includedir@
oldincludedir = /usr/include
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ../..
ACLOCAL = @ACLOCAL@
AUTOCONF = @AUTOCONF@
AUTOMAKE = @AUTOMAKE@
AUTOHEADER = @AUTOHEADER@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_HEADER = $(INSTALL_DATA)
transform = @program_transform_name@
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
host_alias = @host_alias@
host_triplet = @host@
EXEEXT = @EXEEXT@
OBJEXT = @OBJEXT@
PATH_SEPARATOR = @PATH_SEPARATOR@
AMTAR = @AMTAR@
AS = @AS@
AWK = @AWK@
CC = @CC@
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
ECHO = @ECHO@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
IRCD_FILES_OBJS = @IRCD_FILES_OBJS@
IRCD_FILES_SRC = @IRCD_FILES_SRC@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
MODULES = @MODULES@
OBJDUMP = @OBJDUMP@
PACKAGE = @PACKAGE@
RANLIB = @RANLIB@
STRIP = @STRIP@
VERSION = @VERSION@
am__include = @am__include@
am__quote = @am__quote@
install_sh = @install_sh@
subdir = dl/services
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
DIST_SOURCES =
DIST_COMMON = Makefile.am Makefile.in
all: all-am
.SUFFIXES:
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
-rm -f libtool
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu dl/services/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
uninstall-info-am:
tags: TAGS
TAGS:
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
top_distdir = ../..
distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
distdir: $(DISTFILES)
@for file in $(DISTFILES); do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
$(mkinstalldirs) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
if test -d $$d/$$file; then \
cp -pR $$d/$$file $(distdir)$$dir \
|| exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-am
all-am: Makefile
installdirs:
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]*
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-generic clean-libtool mostlyclean-am
distclean: distclean-am
distclean-am: clean-am distclean-generic distclean-libtool
dvi: dvi-am
dvi-am:
info: info-am
info-am:
install-data-am:
install-exec-am:
install-info: install-info-am
install-man:
installcheck-am:
maintainer-clean: maintainer-clean-am
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
uninstall-am: uninstall-info-am
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
distclean distclean-generic distclean-libtool distdir dvi \
dvi-am info info-am install install-am install-data \
install-data-am install-exec install-exec-am install-info \
install-info-am install-man install-strip installcheck \
installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-generic \
mostlyclean-libtool uninstall uninstall-am uninstall-info-am
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

View file

@ -1,12 +0,0 @@
#!/bin/sh
FILES="nickserv.c"
. ../../Makefile.conf
echo $CC -o services.lo -c services.c -Wall -fPIC -I../..
$CC -o services.lo -c services.c -Wall -fPIC -I../..
echo ld -shared -o services.so services.lo
ld -shared -o services.so services.lo

File diff suppressed because it is too large Load diff

View file

@ -1,23 +0,0 @@
/* NeoStats - IRC Statistical Services Copyright (c) 1999-2001 NeoStats Group Inc.
** Adam Rutter, Justin Hammond & 'Niggles' http://www.neostats.net
*
** Based from GeoStats 1.1.0 by Johnathan George net@lite.net
*
** NeoStats Identification:
** ID: m_stats.h,
** Version: 1.3
** Date: 29/03/2000
*/
#ifndef M_STATS_H
#define M_STATS_H
#define DecreaseOpers(x) x->opers--; stats_network.opers--;
#define DecreaseUsers(x) x->users--; stats_network.users--;
#define DecreaseServers() stats_network.servers--;
#define IncreaseOpers(x) x->opers++; stats_network.opers++;
#define IncreaseUsers(x) x->users++; stats_network.users++; x->totusers++; stats_network.totusers++;
#define IncreaseServers() stats_network.servers++;
#endif

View file

@ -1,238 +0,0 @@
/* NeoStats - IRC Statistical Services Copyright (c) 1999-2001 NeoStats Group Inc.
** Adam Rutter, Justin Hammond & 'Niggles' http://www.neostats.net
*
** Based from GeoStats 1.1.0 by Johnathan George net@lite.net
*
** NeoStats Identification:
** ID: ss_help.c,
** Version: 1.2
** Date: 22/11/2001
*/
#include "stats.h"
const char *ss_help[] = {
"*** Statistics Help ***",
"",
"Commands:",
"\2SERVER\2 Request information about a server.",
"\2MAP\2 Show the network map.",
"\2NETSTATS\2 General Network Statistics.",
"\2DAILY\2 Daily Network Statistics.",
"\2TLD\2 Show what country a TLD represents.",
"\2TLDMAP\2 Statistics on TLD's.",
"\2OPERLIST\2 Show a listing of on-line IRCops.",
"\2BOTLIST\2 Show a listing of on-line BOTS.",
"\2VERSION\2 Shows you the current StatServ Version.",
"",
"End of Help.",
NULL
};
const char *ss_myuser_help[] = {
"",
"*** Additional Commands For Net & Tech Admins:***",
"",
"\2HTMLSTATS\2 Output IRC statistics to a HTML file",
"\2FORCEHTML\2 Force an update of the HTML ouput file",
"\2RESET\2 DELETES data files and starts stats over new!",
"\2JOIN\2 Join a Channel.",
"\2STATS\2 Modify Statistic Entries.",
"\2NOTICES\2 Enable/Disable 'User requested to see...' Notices.",
"End of Help",
NULL
};
const char *ss_server_help[] = {
"*** Statistics: \2SERVER\2 Help ***",
"",
"Usage: \2SERVER \37<server name>\37\2",
"",
"Provides you with statistics on a",
"specific server.",
"",
"End of Help.",
NULL
};
const char *ss_map_help[] = {
"*** Statistics: \2MAP\2 Help ***",
"",
"Usage: \2MAP\2",
"",
"Provides a server listing with",
"minimal statistics.",
"",
"End of Help.",
NULL
};
const char *ss_netstats_help[] = {
"*** Statistics: \2NETSTATS\2 Help ***",
"",
"Usage: \2NETSTATS\2",
"",
"Provides information about the",
"performance of the network.",
"",
"End of Help.",
NULL
};
const char *ss_daily_help[] = {
"*** Statistics: \2DAILY\2 Help ***",
"",
"Usage: \2DAILY\2",
"",
"Provides information about records",
"that have been set today.",
"",
"End of Help.",
NULL
};
const char *ss_tld_help[] = {
"*** Statistics: \2TLD\2 Help ***",
"Usage: \2TLD \37top_level_domain\37\2",
"",
"Provides the country-name",
"for a specific TLD. An example",
"of a TLD is \2.NET\2",
"",
"End of Help.",
NULL
};
const char *ss_tld_map_help[] = {
"*** Statistics: \2TLDMAP\2 Help ***",
"Usage: \2TLDMAP\2",
"",
"Shows the network map in",
"relation to top level domains.",
"",
"End of Help.",
NULL
};
const char *ss_operlist_help[] = {
"*** Statistics: \2OPERLIST\2 Help ***",
"Usage: \2OPERLIST (\37options|server_name\37)\2",
"",
"Shows a listing of IRCops.",
"",
"Flags:",
" \2NOAWAY\2 Don't show opers that are set away.",
" \2TECH\2 Only Show Tech Admins on the Network.",
" \2NET\2 Only Show Net Admins on the Network.",
" \2BOTS\2 Show Online Bots.",
" \2SERVER\2 Only show opers on that server.",
"",
"End of Help.",
NULL
};
const char *ss_botlist_help[] = {
"*** Statistics: \2BOTLIST\2 Help ***",
"Usage: \2BOTLIST\2",
"",
"Shows all current bots on the network.",
"(umode +B users)",
"",
"End of Help.",
NULL
};
const char *ss_version_help[] = {
"*** Statistics: \2VERSION\2 Help ***",
"Usage: \2VERSION\2",
"",
"Shows the current StatServ Version.",
"",
"End of Help.",
NULL
};
const char *ss_reset_help[] = {
"*** Statistics: \2RESET\2 Help ***",
"Usage: \2RESET\2",
"",
"Force NeoStats to DELETE datafiles and",
"re-connect to the network. Note: this",
"will reset all statistics.",
"EVIL EVIL command ;)",
"",
"End of Help.",
NULL
};
const char *ss_stats_help[] = {
"*** Statistics: \2STATS\2 Help ***",
"Usage: \2STATS \37[DEL|LIST|COPY]\37\2",
"",
"\2LIST\2 List all database entries.",
"\2DEL \37name\37\2 Remove an entry.",
"\2COPY \37name newname\37\2 Copy an entry.",
"",
"End of Help.",
NULL
};
const char *ss_join_help[] = {
"*** Statistics: \2JOIN\2 Help ***",
"Usage: \2JOIN <Channel>\2",
"",
"Get StatServ to Join a Channel",
"It will then Echo Events as they happen to that Channel, So it Shouldn't Join Public Channels",
"",
"End of Help.",
NULL
};
const char *icq_help[] = {
"*** Statistics: \2JOIN\2 Help ***",
"Usage: \2JOIN <Channel>\2",
"",
"Get StatServ to Join a Channel",
"It will then Echo Events as they happen to that Channel, So it Shouldn't Join Public Channels",
"",
"End of Help.",
NULL
};
const char *ss_htmlstats_help[] = {
"*** Statistics: \2HTMLSTATS\2 Help ***",
"",
"Usage: \2HTMLSTATS <ON/OFF> <PATH TO HTML FILE IF HTMLTURNING STATS ON>\2",
"",
"Print the Statistics to a .html file for veiwing on a website.",
"The path to the html file should be from the /NeoStats-2.x directory eg:",
"'../public_html/neostats/mystats.html'",
"",
"End of Help.",
NULL
};
const char *ss_forcehtml_help[] = {
"*** Statistics: \2FORCEUPDATE\2 Help ***",
"",
"Usage: \2FORCEUPDATE\2",
"",
"Forces an update of the HTML data file with the most current",
"network statistics.",
"",
"End of Help.",
NULL
};
const char *ss_notices_help[] = {
"*** Statistics: \2NOTICES\2 Help ***",
"",
"Usage: \2NOTICES\2",
"",
"Turns StatServ Information requests on and off. The default",
"setting when neostats is loaded is 'off'",
"",
"End of Help.",
NULL
};

View file

@ -1,176 +0,0 @@
/* NeoStats - IRC Statistical Services Copyright (c) 1999-2001 NeoStats Group Inc.
** Adam Rutter, Justin Hammond & 'Niggles' http://www.neostats.net
*
** Based from GeoStats 1.1.0 by Johnathan George net@lite.net
*
** NeoStats Identification:
** ID: statserv.c
** Version: 3.0+Alpha 0.0.0.1
** Date: 12/30/2001
*/
#include <stdio.h>
#include "dl.h"
#include "stats.h"
#include "statserv.h"
#include "ss_help.c"
extern const char version_date[], version_time[];
static int new_m_version(char *av, char *tmp);
static void ss_JOIN(User *u, char *chan);
static void ss_version(User *u);
const char meversion_date[] = __DATE__;
const char meversion_time[] = __TIME__;
char *s_StatServ;
Module_Info StatServ_Info[] = { {
"StatServ",
"An IRC Statistical Bot",
"3.0+Alpha-0.0.0.1"
} };
int new_m_version(char *av, char *tmp) {
sts(":%s 351 %s :Module StatServ Test Loaded, Version: %s %s %s",me.name,av,StatServ_Info[0].module_version,meversion_date,meversion_time);
return 0;
}
Functions StatServ_fn_list[] = {
{ "VERSION", new_m_version, 1 },
{ NULL, NULL, 0 }
};
int __Bot_Message(char *origin, char *coreLine, int type)
{
User *u;
char *cmd;
u = finduser(origin);
if (!u) {
log("Unable to find user %s (statserv)", origin);
return -1;
}
/*
if (u->is_oper)
return -1;
*/
if (coreLine == NULL) return -1;
cmd = strtok(coreLine, " ");
/* if (!strcasecmp(cmd, "HELP")) {
coreLine = strtok(NULL, " ");
if(!coreLine) {
notice(s_StatServ, "%s requested %s Help", u->nick, s_StatServ); */
if (!strcasecmp(cmd, "HELP")) {
coreLine = strtok(NULL, " ");
if(!coreLine) {
privmsg(u->nick, s_StatServ, "\2STATSERV IS BEING COMPLETELY REWROTE ATM -- ONLY VERSION WORKS ATM)");
privmsg_list(u->nick, s_StatServ, ss_help);
if (UserLevel(u) >= 150)
privmsg_list(u->nick, s_StatServ, ss_myuser_help);
} else if (!strcasecmp(coreLine, "VERSION"))
privmsg_list(u->nick, s_StatServ, ss_version_help);
else if (!strcasecmp(coreLine, "JOIN") && UserLevel(u) >= 190)
privmsg_list(u->nick, s_StatServ, ss_join_help);
else
privmsg(u->nick, s_StatServ, "Unknown Help Topic: \2%s\2 (VERSION ONLY WORKS ATM -- RECODE)", coreLine);
} else if (!strcasecmp(cmd, "VERSION")) {
ss_version(u);
} else if (!strcasecmp(cmd, "JOIN") && (UserLevel(u) >= 185)) {
cmd = strtok(NULL, " ");
ss_JOIN(u, cmd);
} else {
privmsg(u->nick, s_StatServ, "Unknown Command: \2%s\2 (VERSION ONLY WORKS ATM -- RECODE)", cmd);
}
return 1;
/*
notice(s_StatServ,"We got a
message! It
says \2%s", coreLine);
privmsg(u->nick, s_StatServ, "I'm not the real StatServ, IM AN IMPOSTER!");
return 1;
*/
}
int Online(Server *data) {
if (init_bot(s_StatServ,"please",me.name,"Chat to me", "+xd", StatServ_Info[0].module_name) == -1 ) {
/* Nick was in use!!!! */
s_StatServ = strcat(s_StatServ, "_");
init_bot(s_StatServ,"Please",me.name,"Chat to me", "+xd", StatServ_Info[0].module_name);
}
return 1;
};
EventFnList StatServ_event_list[] = {
{ "ONLINE", Online},
{ NULL, NULL}
};
Module_Info *__module_get_info() {
return StatServ_Info;
};
Functions *__module_get_functions() {
return StatServ_fn_list;
};
EventFnList *__module_get_events() {
return StatServ_event_list;
};
void _init() {
s_StatServ = "StatServ";
sts(":%s GLOBOPS :StatServ Test Module Loaded",me.name);
}
void _fini() {
sts(":%s GLOBOPS :StatServ Test Module Unloaded",me.name);
};
static void ss_JOIN(User *u, char *chan)
{
if (UserLevel(u) < 190) {
log("Access Denied (JOIN) to %s", u->nick);
privmsg(u->nick, s_StatServ, "Access Denied.");
notice(s_StatServ,"%s Requested JOIN, but is not a god!",u->nick);
return;
}
if (!chan) {
privmsg(u->nick, s_StatServ, "Syntax: /msg %s JOIN <chan>",s_StatServ);
return;
}
globops(s_StatServ, "JOINING CHANNEL -\2(%s)\2- Thanks to %s!%s@%s)", chan, u->nick, u->username, u->hostname);
privmsg(me.chan, s_StatServ, "%s Asked me to Join %s, So, I'm Leaving %s", u->nick, chan, me.chan);
sts(":%s part %s", s_StatServ, me.chan);
log("%s!%s@%s Asked me to Join %s, I was on %s", u->nick, u->username, u->hostname, chan, me.chan);
sts(":%s JOIN %s",s_StatServ,chan);
sts(":%s MODE %s +o %s",me.name,chan,s_StatServ);
}
static void ss_version(User *u)
{
privmsg(u->nick, s_StatServ, "\2StatServ Version Information\2");
privmsg(u->nick, s_StatServ, "StatServ Version: %s Compiled %s at %s", StatServ_Info[0].module_version, meversion_date, meversion_time);
privmsg(u->nick, s_StatServ, "http://www.neostats.net");
privmsg(u->nick, s_StatServ, "-------------------------------------");
privmsg(u->nick, s_StatServ, "This StatServ is being completely re-wrote!");
}

View file

@ -1,130 +0,0 @@
/* NeoStats - IRC Statistical Services Copyright (c) 1999-2001 NeoStats Group Inc.
** Adam Rutter, Justin Hammond & 'Niggles' http://www.neostats.net
*
** Based from GeoStats 1.1.0 by Johnathan George net@lite.net
*
** NeoStats Identification:
** ID: statserv.h,
** Version: 1.6
** Date: 29/03/2001
*/
#ifndef STATSERV_H
#define STATSERV_H
#include "dl.h"
#include "m_stats.h"
#include "stats.h"
#include "dotconf.h"
/* extern char s_StatServ[MAXNICK]; */
typedef struct tld_ TLD;
typedef struct server_stats SStats;
struct stats_network_ {
int opers;
int chans;
int maxopers;
long users;
long totusers;
long maxusers;
long away;
int servers;
int maxservers;
time_t t_maxopers;
time_t t_maxusers;
time_t t_maxservers;
int requests;
} stats_network;
struct StatServ {
char nick[MAXNICK];
char user[MAXUSER];
char host[MAXHOST];
int lag;
} StatServ;
struct server_stats {
SStats *next, *prev;
char name[MAXHOST];
unsigned int users;
int opers;
int lowest_ping;
int highest_ping;
time_t t_lowest_ping;
time_t t_highest_ping;
int numsplits;
long maxusers;
time_t t_maxusers;
int maxopers;
time_t t_maxopers;
time_t lastseen;
time_t starttime;
unsigned int operkills;
unsigned int serverkills;
long totusers;
long daily_totusers;
};
struct daily {
int servers;
time_t t_servers;
int users;
time_t t_users;
int opers;
time_t t_opers;
int tot_users;
} daily;
struct tld_ {
TLD *next;
char tld[4];
char *country;
int users;
int daily_users;
};
/* statserv.c */
extern void statserv(char *);
extern void re_init_bot();
/* stats.c */
extern TLD *tldhead;
extern TLD *findtld(char *);
extern TLD *AddTLD(User *);
extern void LoadTLD();
extern void init_tld();
extern void AddStats(Server *);
extern SStats *findstats(char *);
extern void SaveStats();
extern void LoadStats();
/* ss_help.c */
extern const char *ss_help[];
extern const char *ss_myuser_help[];
extern const char *ss_server_help[];
extern const char *ss_map_help[];
extern const char *ss_netstats_help[];
extern const char *ss_daily_help[];
extern const char *ss_tld_help[];
extern const char *ss_tld_map_help[];
extern const char *ss_operlist_help[];
extern const char *ss_botlist_help[];
extern const char *ss_version_help[];
extern const char *ss_reset_help[];
extern const char *ss_stats_help[];
extern const char *ss_join_help[];
extern const char *ns_join_help[];
extern const char *ns_raw_help[];
extern const char *ns_debug_help[];
extern const char *ns_userdump_help[];
extern const char *ns_chandump_help[];
extern const char *ns_serverdump_help[];
extern const char *icq_help[];
#endif