Author: Mark
Date: Fri May 20 05:52:53 2005
New Revision: 2600
Added:
trunk/modules/limitserv/
trunk/modules/limitserv/Makefile.am
trunk/modules/limitserv/Makefile.in
trunk/modules/limitserv/help.c
trunk/modules/limitserv/limitserv.h (contents, props changed)
trunk/modules/limitserv/limitserv.vcproj (contents, props changed)
trunk/modules/limitserv/main.c
Modified:
trunk/configure
trunk/configure.in
trunk/neostats.sln
Log:
add framework for limitserv
Modified: trunk/configure
==============================================================================
--- trunk/configure (original)
+++ trunk/configure Fri May 20 05:52:53 2005
@@ -1556,7 +1556,7 @@
x_min='0'
x_rev="a3-dev"
x_package='NeoStats'
-MODULES="connectserv hostserv statserv ircdauth extauth textserv quoteserv operlog dccpartyline"
+MODULES="connectserv hostserv statserv ircdauth extauth limitserv textserv quoteserv operlog dccpartyline"
#dont edit anything after this line!
x_version=$x_maj.$x_min.$x_rev
@@ -28326,7 +28326,7 @@
- ac_config_files="$ac_config_files Makefile include/Makefile src/Makefile src/protocol/Makefile src/dbm/Makefile src/dbm/bdb/Makefile src/dbm/gdbm/Makefile lib/Makefile lib/curl/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/quoteserv/Makefile modules/operlog/Makefile modules/dccpartyline/Makefile neostats"
+ ac_config_files="$ac_config_files Makefile include/Makefile src/Makefile src/protocol/Makefile src/dbm/Makefile src/dbm/bdb/Makefile src/dbm/gdbm/Makefile lib/Makefile lib/curl/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/quoteserv/Makefile modules/limitserv/Makefile modules/operlog/Makefile modules/dccpartyline/Makefile neostats"
cat >confcache <<\_ACEOF
@@ -28979,6 +28979,7 @@
"modules/statserv/Makefile" ) CONFIG_FILES="$CONFIG_FILES modules/statserv/Makefile" ;;
"modules/textserv/Makefile" ) CONFIG_FILES="$CONFIG_FILES modules/textserv/Makefile" ;;
"modules/quoteserv/Makefile" ) CONFIG_FILES="$CONFIG_FILES modules/quoteserv/Makefile" ;;
+ "modules/limitserv/Makefile" ) CONFIG_FILES="$CONFIG_FILES modules/limitserv/Makefile" ;;
"modules/operlog/Makefile" ) CONFIG_FILES="$CONFIG_FILES modules/operlog/Makefile" ;;
"modules/dccpartyline/Makefile" ) CONFIG_FILES="$CONFIG_FILES modules/dccpartyline/Makefile" ;;
"neostats" ) CONFIG_FILES="$CONFIG_FILES neostats" ;;
Modified: trunk/configure.in
==============================================================================
--- trunk/configure.in (original)
+++ trunk/configure.in Fri May 20 05:52:53 2005
@@ -13,7 +13,7 @@
x_min='0'
x_rev="a3-dev"
x_package='NeoStats'
-MODULES="connectserv hostserv statserv ircdauth extauth textserv quoteserv operlog dccpartyline"
+MODULES="connectserv hostserv statserv ircdauth extauth limitserv textserv quoteserv operlog dccpartyline"
#dont edit anything after this line!
x_version=$x_maj.$x_min.$x_rev
@@ -375,6 +375,7 @@
modules/statserv/Makefile
modules/textserv/Makefile
modules/quoteserv/Makefile
+ modules/limitserv/Makefile
modules/operlog/Makefile
modules/dccpartyline/Makefile
neostats])
Added: trunk/modules/limitserv/Makefile.am
==============================================================================
--- (empty file)
+++ trunk/modules/limitserv/Makefile.am Fri May 20 05:52:53 2005
@@ -0,0 +1,5 @@
+pkglib_LTLIBRARIES = limitserv.la
+limitserv_la_SOURCES = main.c limitserv.h help.c
+limitserv_la_LDFLAGS = -module -avoid-version -no-undefined
+AM_CFLAGS = @PCRE_CFLAGS@ @CURL_CFLAGS@
+include $(top_srcdir)/autotools/rules.mk
\ No newline at end of file
Added: trunk/modules/limitserv/Makefile.in
==============================================================================
--- (empty file)
+++ trunk/modules/limitserv/Makefile.in Fri May 20 05:52:53 2005
@@ -0,0 +1,581 @@
+# Makefile.in generated by automake 1.9.2 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004 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@
+
+SOURCES = $(limitserv_la_SOURCES)
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ../..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+ $(top_srcdir)/autotools/rules.mk
+subdir = modules/limitserv
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/autotools/acinclude.m4 \
+ $(top_srcdir)/autotools/ax_maintainer_mode_auto_silent.m4 \
+ $(top_srcdir)/autotools/ax_path_lib_curl.m4 \
+ $(top_srcdir)/autotools/ax_path_lib_pcre.m4 \
+ $(top_srcdir)/autotools/ccdv.m4 \
+ $(top_srcdir)/autotools/libevent.m4 $(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(SHELL) $(top_srcdir)/autotools/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/include/config.h
+CONFIG_CLEAN_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__installdirs = "$(DESTDIR)$(pkglibdir)"
+pkglibLTLIBRARIES_INSTALL = $(INSTALL)
+LTLIBRARIES = $(pkglib_LTLIBRARIES)
+limitserv_la_LIBADD =
+am_limitserv_la_OBJECTS = main.lo help.lo
+limitserv_la_OBJECTS = $(am_limitserv_la_OBJECTS)
+DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/include
+depcomp = $(SHELL) $(top_srcdir)/autotools/depcomp
+am__depfiles_maybe = depfiles
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+SOURCES = $(limitserv_la_SOURCES)
+DIST_SOURCES = $(limitserv_la_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+pkglibdir = $(prefix)/modules
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BUILD_CURL_FALSE = @BUILD_CURL_FALSE@
+BUILD_CURL_TRUE = @BUILD_CURL_TRUE@
+BUILD_PCRE_FALSE = @BUILD_PCRE_FALSE@
+BUILD_PCRE_TRUE = @BUILD_PCRE_TRUE@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CCDV = @CCDV@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CURL_CFLAGS = @CURL_CFLAGS@
+CURL_LIBS = @CURL_LIBS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EVNTLIBOBJS = @EVNTLIBOBJS@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBDB = @LIBDB@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
+MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
+MAKEINFO = @MAKEINFO@
+MODULES = @MODULES@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PCRE_CFLAGS = @PCRE_CFLAGS@
+PCRE_LIBS = @PCRE_LIBS@
+POW_LIB = @POW_LIB@
+PROTOCOL = @PROTOCOL@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+USECCDV = @USECCDV@
+VERSION = @VERSION@
+YACC = @YACC@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = $(prefix)/data
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+wi_PWD = @wi_PWD@
+pkglib_LTLIBRARIES = limitserv.la
+limitserv_la_SOURCES = main.c limitserv.h help.c
+limitserv_la_LDFLAGS = -module -avoid-version -no-undefined
+AM_CFLAGS = @PCRE_CFLAGS@ @CURL_CFLAGS@
+LINK = $(LIBTOOL) --tag=CXX --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/autotools/rules.mk $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu modules/limitserv/Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --gnu modules/limitserv/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+uninstall-pkglibLTLIBRARIES:
+ @$(NORMAL_UNINSTALL)
+ @set -x; list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \
+ p=$(am__strip_dir) \
+ echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$p'"; \
+ $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$p"; \
+ done
+
+clean-pkglibLTLIBRARIES:
+ -test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES)
+ @list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \
+ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+ test "$$dir" != "$$p" || dir=.; \
+ echo "rm -f \"$${dir}/so_locations\""; \
+ rm -f "$${dir}/so_locations"; \
+ done
+limitserv.la: $(limitserv_la_OBJECTS) $(limitserv_la_DEPENDENCIES)
+ $(LINK) -rpath $(pkglibdir) $(limitserv_la_LDFLAGS) $(limitserv_la_OBJECTS) $(limitserv_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/help.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Plo@am__quote@
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+distclean-libtool:
+ -rm -f libtool
+uninstall-info-am:
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$tags $$unique; \
+ fi
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$tags $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && cd $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ $(mkdir_p) $(distdir)/../../autotools
+ @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+ list='$(DISTFILES)'; for file in $$list; do \
+ case $$file in \
+ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+ esac; \
+ 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"; \
+ $(mkdir_p) "$(distdir)$$dir"; \
+ else \
+ dir=''; \
+ fi; \
+ if test -d $$d/$$file; then \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+ 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 $(LTLIBRARIES)
+installdirs:
+ for dir in "$(DESTDIR)$(pkglibdir)"; do \
+ test -z "$$dir" || $(mkdir_p) "$$dir"; \
+ done
+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_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+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 clean-pkglibLTLIBRARIES \
+ mostlyclean-am
+
+distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-libtool distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-exec-am: install-pkglibLTLIBRARIES
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-info-am uninstall-pkglibLTLIBRARIES
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+ clean-libtool clean-pkglibLTLIBRARIES ctags distclean \
+ distclean-compile distclean-generic distclean-libtool \
+ distclean-tags distdir dvi dvi-am html html-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-pkglibLTLIBRARIES install-strip installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ tags uninstall uninstall-am uninstall-info-am \
+ uninstall-pkglibLTLIBRARIES
+
+
+.c.o:
+@USECCDV@ @echo "Building $@"
+@am__fastdepCC_TRUE@ @if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
+@am__fastdepCC_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
+@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
+@am__fastdepCC_TRUE@ fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ @source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$<
+
+.c.obj:
+@USECCDV@ @echo "Building $@"
+@am__fastdepCC_TRUE@ @if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
+@am__fastdepCC_TRUE@ -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
+@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
+@am__fastdepCC_TRUE@ fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ @source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LTCOMPILE) -c `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`
+
+.c.lo:
+@USECCDV@ @echo "Building $@"
+@am__fastdepCC_TRUE@ @if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
+@am__fastdepCC_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; \
+@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
+@am__fastdepCC_TRUE@ fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ @source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Plo' tmpdepfile='$(DEPDIR)/$*.TPlo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<
+
+install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES)
+ @$(NORMAL_INSTALL)
+ $(mkinstalldirs) $(DESTDIR)$(pkglibdir)
+ @list='ls .libs/*.so'; for p in $$list; do \
+ if test -f $$p; then \
+ f="`echo $$p | sed -e 's|^.*/||'`"; \
+ $(CCDV) $(LIBTOOL) --mode=install $(pkglibLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(pkglibdir)/$$f; \
+ if test "x#" != "x@USECCDV@"; then echo "Installing $$f"; fi; \
+ else :; fi; \
+ done
+
+install-binSCRIPTS: $(bin_SCRIPTS)
+ @$(NORMAL_INSTALL)
+ test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
+ @list='$(bin_SCRIPTS)'; for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ if test -f $$d$$p; then \
+ f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
+ $(CCDV) $(binSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(bindir)/$$f"; \
+ if test "x#" != "x@USECCDV@"; then echo "Installing $$f"; fi; \
+ else :; fi; \
+ done
+
+install-dist_binSCRIPTS: $(dist_bin_SCRIPTS)
+ @$(NORMAL_INSTALL)
+ test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
+ @list='$(dist_bin_SCRIPTS)'; for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ if test -f $$d$$p; then \
+ f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
+ $(CCDV) $(dist_binSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(bindir)/$$f"; \
+ if test "x#" != "x@USECCDV@"; then echo "Installing $$f"; fi; \
+ else :; fi; \
+ done
+
+install-dist_dataDATA: $(dist_data_DATA)
+ @$(NORMAL_INSTALL)
+ test -z "$(datadir)" || $(mkdir_p) "$(DESTDIR)$(datadir)"
+ @list='$(dist_data_DATA)'; for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ f=$(am__strip_dir) \
+ $(CCDV) $(dist_dataDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(datadir)/$$f"; \
+ if test "x#" != "x@USECCDV@"; then echo "Installing $$f"; fi; \
+ done
+
+install-dist_docDATA: $(dist_doc_DATA)
+ @$(NORMAL_INSTALL)
+ test -z "$(docdir)" || $(mkdir_p) "$(DESTDIR)$(docdir)"
+ @list='$(dist_doc_DATA)'; for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ f=$(am__strip_dir) \
+ $(CCDV) $(dist_docDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(docdir)/$$f"; \
+ if test "x#" != "x@USECCDV@"; then echo "Installing $$f"; fi; \
+ done
+
+install-includeHEADERS: $(include_HEADERS)
+ @$(NORMAL_INSTALL)
+ test -z "$(includedir)" || $(mkdir_p) "$(DESTDIR)$(includedir)"
+ @list='$(include_HEADERS)'; for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ f=$(am__strip_dir) \
+ $(CCDV) $(includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(includedir)/$$f"; \
+ if test "x#" != "x@USECCDV@"; then echo "Installing $$f"; fi; \
+ done
+
+install-binPROGRAMS: $(bin_PROGRAMS)
+ @$(NORMAL_INSTALL)
+ test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
+ @list='$(bin_PROGRAMS)'; for p in $$list; do \
+ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
+ if test -f $$p \
+ || test -f $$p1 \
+ ; then \
+ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
+ $(CCDV) $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
+ if test "x#" != "x@USECCDV@"; then echo "Installing $$f"; fi; \
+ else :; fi; \
+ done
+
+install-libLTLIBRARIES: $(lib_LTLIBRARIES)
+ @$(NORMAL_INSTALL)
+ test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)"
+ @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+ if test -f $$p; then \
+ f=$(am__strip_dir) \
+ $(CCDV) $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \
+ if test "x#" != "x@USECCDV@"; then echo "Installing $$f"; fi; \
+ else :; fi; \
+ done
+# 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:
Added: trunk/modules/limitserv/help.c
==============================================================================
--- (empty file)
+++ trunk/modules/limitserv/help.c Fri May 20 05:52:53 2005
@@ -0,0 +1,56 @@
+/* NeoStats - IRC Statistical Services
+** Copyright (c) 1999-2005 Adam Rutter, Justin Hammond, Mark Hetherington
+** http://www.neostats.net/
+**
+** 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: help.c 2597 2005-05-18 23:14:38Z Mark $
+*/
+
+#include "neostats.h"
+
+const char *ls_about[] =
+{
+ "\2TextServ\2 is a text messaging service",
+ NULL
+};
+
+const char ls_help_add_oneline[] ="Add a channel";
+const char ls_help_del_oneline[] ="Delete a channel";
+const char ls_help_list_oneline[] ="List channels";
+
+const char *ls_help_add[] = {
+ "Syntax: \2ADD <channel>\2",
+ "",
+ "Register a channel with limitserv.",
+ "<channel> is the name of the channel",
+ NULL
+};
+
+const char *ls_help_del[] = {
+ "Syntax: \2DEL <channel>\2",
+ "",
+ "Delete a channel.",
+ NULL
+};
+
+const char *ls_help_list[] = {
+ "Syntax: \2LIST\2",
+ "",
+ "Lists channels.",
+ NULL
+};
Added: trunk/modules/limitserv/limitserv.h
==============================================================================
--- (empty file)
+++ trunk/modules/limitserv/limitserv.h Fri May 20 05:52:53 2005
@@ -0,0 +1,32 @@
+/* NeoStats - IRC Statistical Services
+** Copyright (c) 1999-2005 Adam Rutter, Justin Hammond, Mark Hetherington
+** http://www.neostats.net/
+**
+** 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: quoteserv.h 2597 2005-05-18 23:14:38Z Mark $
+*/
+
+extern const char *ls_about[];
+
+extern const char ls_help_add_oneline[];
+extern const char ls_help_del_oneline[];
+extern const char ls_help_list_oneline[];
+
+extern const char *ls_help_add[];
+extern const char *ls_help_del[];
+extern const char *ls_help_list[];
Added: trunk/modules/limitserv/limitserv.vcproj
==============================================================================
--- (empty file)
+++ trunk/modules/limitserv/limitserv.vcproj Fri May 20 05:52:53 2005
@@ -0,0 +1,146 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="7.10"
+ Name="limitserv"
+ ProjectGUID="{5E3A1DF8-46AF-485A-BAB2-3DC78C922F8F}"
+ Keyword="Win32Proj">
+ <Platforms>
+ <Platform
+ Name="Win32"/>
+ </Platforms>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="Debug"
+ IntermediateDirectory="Debug"
+ ConfigurationType="2"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\include;..\..\lib\curl;..\..\lib\pcre"
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;limitserv_EXPORTS"
+ MinimalRebuild="TRUE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="TRUE"
+ DebugInformationFormat="4"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="neostats.lib"
+ OutputFile="../limitservd.dll"
+ LinkIncremental="2"
+ AdditionalLibraryDirectories="..\..\src\Debug"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile="$(OutDir)/limitserv.pdb"
+ SubSystem="2"
+ ImportLibrary="$(OutDir)/limitserv.lib"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="Release"
+ IntermediateDirectory="Release"
+ ConfigurationType="2"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="..\..\include;..\..\lib\curl;..\..\lib\pcre"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;limitserv_EXPORTS"
+ RuntimeLibrary="0"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="TRUE"
+ DebugInformationFormat="3"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="neostats.lib"
+ OutputFile="../limitserv.dll"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\src\Release"
+ GenerateDebugInformation="TRUE"
+ SubSystem="2"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ ImportLibrary="$(OutDir)/limitserv.lib"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
+ <File
+ RelativePath=".\help.c">
+ </File>
+ <File
+ RelativePath=".\main.c">
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
+ <File
+ RelativePath=".\limitserv.h">
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
Added: trunk/modules/limitserv/main.c
==============================================================================
--- (empty file)
+++ trunk/modules/limitserv/main.c Fri May 20 05:52:53 2005
@@ -0,0 +1,274 @@
+/* NeoStats - IRC Statistical Services
+** Copyright (c) 1999-2005 Adam Rutter, Justin Hammond, Mark Hetherington
+** http://www.neostats.net/
+**
+** 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: main.c 2599 2005-05-19 20:50:01Z Mark $
+*/
+
+#include "neostats.h"
+#include "limitserv.h"
+
+typedef struct ls_channel {
+ char name[MAXCHANLEN];
+}ls_channel;
+
+/** Bot command function prototypes */
+static int ls_cmd_add( CmdParams *cmdparams );
+static int ls_cmd_list( CmdParams *cmdparams );
+static int ls_cmd_del( CmdParams *cmdparams );
+
+/** hash to store ls_channel and bot info */
+static hash_t *qshash;
+
+/** Bot pointer */
+static Bot *ls_bot;
+
+/** Copyright info */
+const char *ls_copyright[] = {
+ "Copyright (c) 1999-2005, NeoStats",
+ "http://www.neostats.net/",
+ NULL
+};
+
+/** Module info */
+ModuleInfo module_info = {
+ "LimitServ",
+ "Channel limit service",
+ ls_copyright,
+ ls_about,
+ NEOSTATS_VERSION,
+ CORE_MODULE_VERSION,
+ __DATE__,
+ __TIME__,
+ 0,
+ 0,
+};
+
+/** Bot comand table */
+static bot_cmd ls_commands[]=
+{
+ {"ADD", ls_cmd_add, 1, NS_ULEVEL_ADMIN, ls_help_add, ls_help_add_oneline },
+ {"DEL", ls_cmd_del, 1, NS_ULEVEL_ADMIN, ls_help_del, ls_help_del_oneline },
+ {"LIST", ls_cmd_list, 0, NS_ULEVEL_ADMIN, ls_help_list, ls_help_list_oneline },
+ {NULL, NULL, 0, 0, NULL, NULL}
+};
+
+/** Bot setting table */
+static bot_setting ls_settings[]=
+{
+ {NULL, NULL, 0, 0, 0, 0, NULL, NULL, NULL },
+};
+
+/** TextServ BotInfo */
+static BotInfo ls_botinfo =
+{
+ "LimitServ",
+ "LimitServ1",
+ "TS",
+ BOT_COMMON_HOST,
+ "Limit service",
+ BOT_FLAG_SERVICEBOT|BOT_FLAG_DEAF,
+ ls_commands,
+ NULL,
+};
+
+/** @brief load_ls_channel
+ *
+ * load ls_channel
+ *
+ * @param none
+ *
+ * @return none
+ */
+
+static int load_ls_channel( void *data, int size )
+{
+ ls_channel *db;
+
+ db = ns_calloc( sizeof( ls_channel ) );
+ os_memcpy( &db->name, data, MAXCHANLEN );
+ hnode_create_insert( qshash, db, db->name );
+ return NS_FALSE;
+}
+
+/** @brief ModInit
+ *
+ * Init handler
+ *
+ * @param none
+ *
+ * @return NS_SUCCESS if suceeds else NS_FAILURE
+ */
+
+int ModInit( void )
+{
+ qshash = hash_create( -1, 0, 0 );
+ if( !qshash ) {
+ nlog( LOG_CRITICAL, "Unable to create ls_channel hash" );
+ return -1;
+ }
+ DBAFetchRows( "channels", load_ls_channel );
+ ModuleConfig( ls_settings );
+ return NS_SUCCESS;
+}
+
+/** @brief ModSynch
+ *
+ * Startup handler
+ * Introduce bot onto network
+ *
+ * @param none
+ *
+ * @return NS_SUCCESS if suceeds else NS_FAILURE
+ */
+
+int ModSynch( void )
+{
+ ls_bot = AddBot( &ls_botinfo );
+ if( !ls_bot )
+ {
+ return NS_FAILURE;
+ }
+ return NS_SUCCESS;
+}
+
+/** @brief ModFini
+ *
+ * Fini handler
+ *
+ * @param none
+ *
+ * @return NS_SUCCESS if suceeds else NS_FAILURE
+ */
+
+int ModFini( void )
+{
+ ls_channel *db;
+ hnode_t *hn;
+ hscan_t hs;
+
+ SET_SEGV_LOCATION();
+ hash_scan_begin( &hs, qshash );
+ while( ( hn = hash_scan_next( &hs ) ) != NULL ) {
+ db =( ( ls_channel * )hnode_get( hn ) );
+ hash_delete( qshash, hn );
+ hnode_destroy( hn );
+ ns_free( db );
+ }
+ hash_destroy( qshash );
+ return NS_SUCCESS;
+}
+
+/** @brief ls_cmd_add
+ *
+ * Command handler for ADD
+ *
+ * @param cmdparams
+ * cmdparams->av[0] = channel
+ *
+ * @return NS_SUCCESS if succeeds, else NS_FAILURE
+ */
+
+static int ls_cmd_add( CmdParams *cmdparams )
+{
+ ls_channel *db;
+
+ SET_SEGV_LOCATION();
+ if( hash_lookup( qshash, cmdparams->av[0] ) != NULL )
+ {
+ irc_prefmsg( ls_bot, cmdparams->source,
+ "%s already exists in the channel list", cmdparams->av[0] );
+ return NS_SUCCESS;
+ }
+ db = ns_calloc( sizeof( ls_channel ) );
+ strlcpy( db->name, cmdparams->av[0], MAXCHANLEN );
+ hnode_create_insert( qshash, db, db->name );
+ DBAStore( "channels", db->name,( void * )db->name, MAXCHANLEN );
+ return NS_SUCCESS;
+}
+
+/** @brief ls_cmd_list
+ *
+ * Command handler for LIST
+ *
+ * @param cmdparams
+ *
+ * @return NS_SUCCESS if succeeds, else NS_FAILURE
+ */
+
+static int ls_cmd_list( CmdParams *cmdparams )
+{
+ ls_channel *db;
+ hnode_t *hn;
+ hscan_t hs;
+ int i = 1;
+
+ SET_SEGV_LOCATION();
+ if( hash_count( qshash ) == 0 ) {
+ irc_prefmsg( ls_bot, cmdparams->source, "No channels are defined." );
+ return NS_SUCCESS;
+ }
+ hash_scan_begin( &hs, qshash );
+ irc_prefmsg( ls_bot, cmdparams->source, "channels" );
+ while( ( hn = hash_scan_next( &hs ) ) != NULL ) {
+ db =( ( ls_channel * )hnode_get( hn ) );
+ irc_prefmsg( ls_bot, cmdparams->source, "%d - %s", i, db->name );
+ i++;
+ }
+ irc_prefmsg( ls_bot, cmdparams->source, "End of list." );
+ return NS_SUCCESS;
+}
+
+/** @brief ls_cmd_del
+ *
+ * Command handler for DEL
+ * cmdparams->av[0] = ls_channel to delete
+ *
+ * @param cmdparams
+ *
+ * @return NS_SUCCESS if succeeds, else NS_FAILURE
+ */
+
+static int ls_cmd_del( CmdParams *cmdparams )
+{
+ ls_channel *db;
+ hnode_t *hn;
+ hscan_t hs;
+
+ SET_SEGV_LOCATION();
+ hash_scan_begin( &hs, qshash );
+ while( ( hn = hash_scan_next( &hs ) ) != NULL ) {
+ db =( ls_channel * )hnode_get( hn );
+ if( ircstrcasecmp( db->name, cmdparams->av[0] ) == 0 ) {
+ hash_scan_delete( qshash, hn );
+ irc_prefmsg( ls_bot, cmdparams->source,
+ "Deleted %s from the channel list", cmdparams->av[0] );
+ CommandReport( ls_bot, "%s deleted %s from the channel list",
+ cmdparams->source->name, cmdparams->av[0] );
+ nlog( LOG_NOTICE, "%s deleted %s from the channel list",
+ cmdparams->source->name, cmdparams->av[0] );
+ hnode_destroy( hn );
+ DBADelete( "channels", db->name );
+ ns_free( db );
+ return NS_SUCCESS;
+ }
+ }
+ irc_prefmsg( ls_bot, cmdparams->source, "No entry for %s", cmdparams->av[0] );
+ return NS_SUCCESS;
+}
Modified: trunk/neostats.sln
==============================================================================
--- trunk/neostats.sln (original)
+++ trunk/neostats.sln Fri May 20 05:52:53 2005
@@ -115,6 +115,10 @@
ProjectSection(ProjectDependencies) = postProject
EndProjectSection
EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "limitserv", "modules\limitserv\limitserv.vcproj", "{5E3A1DF8-46AF-485A-BAB2-3DC78C922F8F}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
Global
GlobalSection(SolutionConfiguration) = preSolution
Debug = Debug
@@ -225,6 +229,10 @@
{5E3A1DF8-46AF-485A-BAB2-3DC78C922F8F}.Debug.Build.0 = Debug|Win32
{5E3A1DF8-46AF-485A-BAB2-3DC78C922F8F}.Release.ActiveCfg = Release|Win32
{5E3A1DF8-46AF-485A-BAB2-3DC78C922F8F}.Release.Build.0 = Release|Win32
+ {5E3A1DF8-46AF-485A-BAB2-3DC78C922F8F}.Debug.ActiveCfg = Debug|Win32
+ {5E3A1DF8-46AF-485A-BAB2-3DC78C922F8F}.Debug.Build.0 = Debug|Win32
+ {5E3A1DF8-46AF-485A-BAB2-3DC78C922F8F}.Release.ActiveCfg = Release|Win32
+ {5E3A1DF8-46AF-485A-BAB2-3DC78C922F8F}.Release.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
EndGlobalSection
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.