You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(2) |
Dec
(2) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(29) |
Feb
(3) |
Mar
|
Apr
(2) |
May
|
Jun
(17) |
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
(5) |
Dec
|
2004 |
Jan
(2) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2005 |
Jan
|
Feb
|
Mar
|
Apr
(3) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2009 |
Jan
(4) |
Feb
|
Mar
|
Apr
(4) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2010 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
From: Jochen <den...@us...> - 2010-09-05 16:46:44
|
Committer : Jochen Meesters <den...@us...> CVSROOT : /cvsroot/mod-uworld Module : mod.uworld Commit time: 2010-09-05 16:46:34 UTC Modified files: LOGINCommand.cc Makefile.in aclocal.m4 configure configure.ac ltmain.sh autom4te.cache/output.0 autom4te.cache/requests autom4te.cache/traces.0 Log message: Author: Spike Log message: * Update automake tools. * Allow main configure to pass --with-extra-includes to us. * Added include in LOGINCommand.cc to support current compilers. ---------------------- diff included ---------------------- Index: mod.uworld/LOGINCommand.cc diff -u mod.uworld/LOGINCommand.cc:1.6 mod.uworld/LOGINCommand.cc:1.7 --- mod.uworld/LOGINCommand.cc:1.6 Wed Jan 14 16:20:53 2009 +++ mod.uworld/LOGINCommand.cc Sun Sep 5 16:46:24 2010 @@ -3,6 +3,7 @@ #include <string> #include <iomanip> #include <sstream> +#include <stdint.h> #include "md5hash.h" #include "StringTokenizer.h" @@ -12,7 +13,7 @@ #include "uwUser.h" #include "levels.h" -const char LOGINCommand_cc_rcsId[] = "$Id: LOGINCommand.cc,v 1.6 2009/01/14 16:20:53 ultike Exp $" ; +const char LOGINCommand_cc_rcsId[] = "$Id: LOGINCommand.cc,v 1.7 2010/09/05 16:46:24 denspike Exp $" ; namespace gnuworld { Index: mod.uworld/Makefile.in diff -u mod.uworld/Makefile.in:1.5 mod.uworld/Makefile.in:1.6 --- mod.uworld/Makefile.in:1.5 Wed Jan 14 12:20:23 2009 +++ mod.uworld/Makefile.in Sun Sep 5 16:46:24 2010 @@ -1,8 +1,9 @@ -# Makefile.in generated by automake 1.7.9 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ -# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 -# Free Software Foundation, Inc. +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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. @@ -14,18 +15,14 @@ @SET_MAKE@ -# "$Id: Makefile.in,v 1.5 2009/01/14 12:20:23 ultike Exp $" +# "$Id: Makefile.in,v 1.6 2010/09/05 16:46:24 denspike Exp $" -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = . - +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ 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 @@ -37,10 +34,95 @@ NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : +build_triplet = @build@ host_triplet = @host@ +subdir = . +DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in $(top_srcdir)/configure AUTHORS COPYING \ + ChangeLog INSTALL NEWS config.guess config.sub depcomp \ + install-sh ltmain.sh missing mkinstalldirs +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ + configure.lineno config.status.lineno +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_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 = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(libdir)" +LTLIBRARIES = $(lib_LTLIBRARIES) +libuworld_la_LIBADD = +am_libuworld_la_OBJECTS = uworld.lo uwAGL.lo uwUser.lo uwGline.lo \ + uwServer.lo uwLog.lo uworldCommands.lo ACCESSCommand.lo \ + ADDUSERCommand.lo AGLCommand.lo BADCHANCommand.lo \ + CHANINFOCommand.lo CHECKNETCommand.lo CLEARCHANCommand.lo \ + DEAUTHCommand.lo DELSERVERCommand.lo FDEAUTHCommand.lo \ + GLOBALNOTCommand.lo GLINECommand.lo HELPCommand.lo \ + INVITECommand.lo INVMECommand.lo JOINCommand.lo JUPECommand.lo \ + LASTCOMMCommand.lo LEARNNETCommand.lo LISTCommand.lo \ + LOGINCommand.lo MODECommand.lo MODUSERCommand.lo \ + NEWPASSCommand.lo OMSGCommand.lo OPCHANCommand.lo \ + PARTCommand.lo QUOTECommand.lo RELOADCommand.lo \ + REMBADCHANCommand.lo REMGLINECommand.lo REMUSERCommand.lo \ + SAYCommand.lo SCANCommand.lo SERVLISTCommand.lo \ + SHUTDOWNCommand.lo STATUSCommand.lo SUSPENDCommand.lo \ + TRANSLATECommand.lo UPTIMECommand.lo UNSUSPENDCommand.lo \ + WALLOPSCommand.lo WHOISCommand.lo +libuworld_la_OBJECTS = $(am_libuworld_la_OBJECTS) +libuworld_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(libuworld_la_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +CXXLD = $(CXX) +CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libuworld_la_SOURCES) +DIST_SOURCES = $(libuworld_la_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +distdir = $(PACKAGE)-$(VERSION) +top_distdir = $(distdir) +am__remove_distdir = \ + { test ! -d "$(distdir)" \ + || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ + && rm -fr "$(distdir)"; }; } +DIST_ARCHIVES = $(distdir).tar.gz +GZIP_ENV = --best +distuninstallcheck_listfiles = find . -type f -print +distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ @@ -59,38 +141,46 @@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ -ECHO = @ECHO@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ +FGREP = @FGREP@ GREP = @GREP@ INCLTDL = @INCLTDL@ +INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ LDFLAGS = @LDFLAGS@ LIBLTDL = @LIBLTDL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ +LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ -MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ -MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PGSQL_INCLUDE = @PGSQL_INCLUDE@ @@ -101,22 +191,25 @@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ -am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ -am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ 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@ +builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ @@ -136,7 +229,9 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ mandir = @mandir@ +mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ @@ -144,9 +239,12 @@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ - +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ lib_LTLIBRARIES = libuworld.la libuworld_la_SOURCES = uworld.cc \ uwAGL.cc \ @@ -202,149 +300,80 @@ libuworld_la_LDFLAGS = -module -export-dynamic -L$(top_builddir)/../db \ -lgnuworldDB -subdir = . -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs -CONFIG_CLEAN_FILES = -LTLIBRARIES = $(lib_LTLIBRARIES) - -libuworld_la_LIBADD = -am_libuworld_la_OBJECTS = uworld.lo uwAGL.lo uwUser.lo uwGline.lo \ - uwServer.lo uwLog.lo uworldCommands.lo ACCESSCommand.lo \ - ADDUSERCommand.lo AGLCommand.lo BADCHANCommand.lo \ - CHANINFOCommand.lo CHECKNETCommand.lo CLEARCHANCommand.lo \ - DEAUTHCommand.lo DELSERVERCommand.lo FDEAUTHCommand.lo \ - GLOBALNOTCommand.lo GLINECommand.lo HELPCommand.lo \ - INVITECommand.lo INVMECommand.lo JOINCommand.lo JUPECommand.lo \ - LASTCOMMCommand.lo LEARNNETCommand.lo LISTCommand.lo \ - LOGINCommand.lo MODECommand.lo MODUSERCommand.lo \ - NEWPASSCommand.lo OMSGCommand.lo OPCHANCommand.lo \ - PARTCommand.lo QUOTECommand.lo RELOADCommand.lo \ - REMBADCHANCommand.lo REMGLINECommand.lo REMUSERCommand.lo \ - SAYCommand.lo SCANCommand.lo SERVLISTCommand.lo \ - SHUTDOWNCommand.lo STATUSCommand.lo SUSPENDCommand.lo \ - TRANSLATECommand.lo UPTIMECommand.lo UNSUSPENDCommand.lo \ - WALLOPSCommand.lo WHOISCommand.lo -libuworld_la_OBJECTS = $(am_libuworld_la_OBJECTS) - -DEFAULT_INCLUDES = -I. -I$(srcdir) -depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles -@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/ACCESSCommand.Plo \ -@AMDEP_TRUE@ ./$(DEPDIR)/ADDUSERCommand.Plo \ -@AMDEP_TRUE@ ./$(DEPDIR)/AGLCommand.Plo \ -@AMDEP_TRUE@ ./$(DEPDIR)/BADCHANCommand.Plo \ -@AMDEP_TRUE@ ./$(DEPDIR)/CHANINFOCommand.Plo \ -@AMDEP_TRUE@ ./$(DEPDIR)/CHECKNETCommand.Plo \ -@AMDEP_TRUE@ ./$(DEPDIR)/CLEARCHANCommand.Plo \ -@AMDEP_TRUE@ ./$(DEPDIR)/DEAUTHCommand.Plo \ -@AMDEP_TRUE@ ./$(DEPDIR)/DELSERVERCommand.Plo \ -@AMDEP_TRUE@ ./$(DEPDIR)/FDEAUTHCommand.Plo \ -@AMDEP_TRUE@ ./$(DEPDIR)/GLINECommand.Plo \ -@AMDEP_TRUE@ ./$(DEPDIR)/GLOBALNOTCommand.Plo \ -@AMDEP_TRUE@ ./$(DEPDIR)/HELPCommand.Plo \ -@AMDEP_TRUE@ ./$(DEPDIR)/INVITECommand.Plo \ -@AMDEP_TRUE@ ./$(DEPDIR)/INVMECommand.Plo \ -@AMDEP_TRUE@ ./$(DEPDIR)/JOINCommand.Plo \ -@AMDEP_TRUE@ ./$(DEPDIR)/JUPECommand.Plo \ -@AMDEP_TRUE@ ./$(DEPDIR)/LASTCOMMCommand.Plo \ -@AMDEP_TRUE@ ./$(DEPDIR)/LEARNNETCommand.Plo \ -@AMDEP_TRUE@ ./$(DEPDIR)/LISTCommand.Plo \ -@AMDEP_TRUE@ ./$(DEPDIR)/LOGINCommand.Plo \ -@AMDEP_TRUE@ ./$(DEPDIR)/MODECommand.Plo \ -@AMDEP_TRUE@ ./$(DEPDIR)/MODUSERCommand.Plo \ -@AMDEP_TRUE@ ./$(DEPDIR)/NEWPASSCommand.Plo \ -@AMDEP_TRUE@ ./$(DEPDIR)/OMSGCommand.Plo \ -@AMDEP_TRUE@ ./$(DEPDIR)/OPCHANCommand.Plo \ -@AMDEP_TRUE@ ./$(DEPDIR)/PARTCommand.Plo \ -@AMDEP_TRUE@ ./$(DEPDIR)/QUOTECommand.Plo \ -@AMDEP_TRUE@ ./$(DEPDIR)/RELOADCommand.Plo \ -@AMDEP_TRUE@ ./$(DEPDIR)/REMBADCHANCommand.Plo \ -@AMDEP_TRUE@ ./$(DEPDIR)/REMGLINECommand.Plo \ -@AMDEP_TRUE@ ./$(DEPDIR)/REMUSERCommand.Plo \ -@AMDEP_TRUE@ ./$(DEPDIR)/SAYCommand.Plo \ -@AMDEP_TRUE@ ./$(DEPDIR)/SCANCommand.Plo \ -@AMDEP_TRUE@ ./$(DEPDIR)/SERVLISTCommand.Plo \ -@AMDEP_TRUE@ ./$(DEPDIR)/SHUTDOWNCommand.Plo \ -@AMDEP_TRUE@ ./$(DEPDIR)/STATUSCommand.Plo \ -@AMDEP_TRUE@ ./$(DEPDIR)/SUSPENDCommand.Plo \ -@AMDEP_TRUE@ ./$(DEPDIR)/TRANSLATECommand.Plo \ -@AMDEP_TRUE@ ./$(DEPDIR)/UNSUSPENDCommand.Plo \ -@AMDEP_TRUE@ ./$(DEPDIR)/UPTIMECommand.Plo \ -@AMDEP_TRUE@ ./$(DEPDIR)/WALLOPSCommand.Plo \ -@AMDEP_TRUE@ ./$(DEPDIR)/WHOISCommand.Plo ./$(DEPDIR)/uwAGL.Plo \ -@AMDEP_TRUE@ ./$(DEPDIR)/uwGline.Plo ./$(DEPDIR)/uwLog.Plo \ -@AMDEP_TRUE@ ./$(DEPDIR)/uwServer.Plo ./$(DEPDIR)/uwUser.Plo \ -@AMDEP_TRUE@ ./$(DEPDIR)/uworld.Plo \ -@AMDEP_TRUE@ ./$(DEPDIR)/uworldCommands.Plo -CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -LTCXXCOMPILE = $(LIBTOOL) --mode=compile $(CXX) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CXXFLAGS) $(CXXFLAGS) -CXXLD = $(CXX) -CXXLINK = $(LIBTOOL) --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ -DIST_SOURCES = $(libuworld_la_SOURCES) -DIST_COMMON = README $(srcdir)/Makefile.in $(srcdir)/configure AUTHORS \ - COPYING ChangeLog INSTALL Makefile.am NEWS aclocal.m4 \ - config.guess config.sub configure configure.ac depcomp \ - install-sh ltmain.sh missing mkinstalldirs -SOURCES = $(libuworld_la_SOURCES) - all: all-am .SUFFIXES: .SUFFIXES: .cc .lo .o .obj +am--refresh: + @: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \ + $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + echo ' $(SHELL) ./config.status'; \ + $(SHELL) ./config.status;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ + esac; -am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ - configure.lineno -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4) - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu Makefile -Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in $(top_builddir)/config.status - cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe) - -$(top_builddir)/config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck -$(srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(srcdir)/configure.ac $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES) - cd $(srcdir) && $(AUTOCONF) -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.ac - cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) -libLTLIBRARIES_INSTALL = $(INSTALL) +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + $(am__cd) $(srcdir) && $(AUTOCONF) +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) +$(am__aclocal_m4_deps): install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) - $(mkinstalldirs) $(DESTDIR)$(libdir) - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ + test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" + @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ + list2=; for p in $$list; do \ if test -f $$p; then \ - f="`echo $$p | sed -e 's|^.*/||'`"; \ - echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(libdir)/$$f"; \ - $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(libdir)/$$f; \ + list2="$$list2 $$p"; \ else :; fi; \ - done + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ + } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - p="`echo $$p | sed -e 's|^.*/||'`"; \ - echo " $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$$p"; \ - $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$$p; \ + @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" = "$$p" && dir=.; \ + test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libuworld.la: $(libuworld_la_OBJECTS) $(libuworld_la_DEPENDENCIES) - $(CXXLINK) -rpath $(libdir) $(libuworld_la_LDFLAGS) $(libuworld_la_OBJECTS) $(libuworld_la_LIBADD) $(LIBS) + $(libuworld_la_LINK) -rpath $(libdir) $(libuworld_la_OBJECTS) $(libuworld_la_LIBADD) $(LIBS) mostlyclean-compile: - -rm -f *.$(OBJEXT) core *.core + -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @@ -401,37 +430,25 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/uworldCommands.Plo@am__quote@ .cc.o: -@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ -@am__fastdepCXX_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \ -@am__fastdepCXX_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ -@am__fastdepCXX_TRUE@ fi +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$< +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< .cc.obj: -@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ -@am__fastdepCXX_TRUE@ -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \ -@am__fastdepCXX_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ -@am__fastdepCXX_TRUE@ fi +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi` +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cc.lo: -@am__fastdepCXX_TRUE@ if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ -@am__fastdepCXX_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; \ -@am__fastdepCXX_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ -@am__fastdepCXX_TRUE@ fi +@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/$*.Plo' tmpdepfile='$(DEPDIR)/$*.TPlo' @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$< +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo @@ -440,131 +457,161 @@ -rm -rf .libs _libs distclean-libtool: - -rm -f libtool -uninstall-info-am: - -ETAGS = etags -ETAGSFLAGS = - -CTAGS = ctags -CTAGSFLAGS = - -tags: TAGS + -rm -f libtool config.lt 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; }'`; \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique +tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) - tags=; \ + set x; \ 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 "$(ETAGS_ARGS)$$tags$$unique" \ - || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique - + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + 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" \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique + $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) - -top_distdir = . -distdir = $(PACKAGE)-$(VERSION) - -am__remove_distdir = \ - { test ! -d $(distdir) \ - || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ - && rm -fr $(distdir); }; } - -GZIP_ENV = --best -distuninstallcheck_listfiles = find . -type f -print -distcleancheck_listfiles = find . -type f -print distdir: $(DISTFILES) $(am__remove_distdir) - mkdir $(distdir) - @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; \ + test -d "$(distdir)" || mkdir "$(distdir)" + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; 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 \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done - -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ + -test -n "$(am__skip_mode_fix)" \ + || find "$(distdir)" -type d ! -perm -755 \ + -exec chmod u+rwx,go+rx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ - ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \ - || chmod -R a+r $(distdir) + ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ + || chmod -R a+r "$(distdir)" dist-gzip: distdir - $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + $(am__remove_distdir) + +dist-bzip2: distdir + tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 + $(am__remove_distdir) + +dist-lzma: distdir + tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma + $(am__remove_distdir) + +dist-xz: distdir + tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz + $(am__remove_distdir) + +dist-tarZ: distdir + tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z + $(am__remove_distdir) + +dist-shar: distdir + shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz + $(am__remove_distdir) + +dist-zip: distdir + -rm -f $(distdir).zip + zip -rq $(distdir).zip $(distdir) $(am__remove_distdir) dist dist-all: distdir - $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist - $(am__remove_distdir) - GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf - + case '$(DIST_ARCHIVES)' in \ + *.tar.gz*) \ + GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ + *.tar.bz2*) \ + bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ + *.tar.lzma*) \ + lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\ + *.tar.xz*) \ + xz -dc $(distdir).tar.xz | $(am__untar) ;;\ + *.tar.Z*) \ + uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ + *.shar.gz*) \ + GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ + *.zip*) \ + unzip $(distdir).zip ;;\ + esac chmod -R a-w $(distdir); chmod a+w $(distdir) mkdir $(distdir)/_build mkdir $(distdir)/_inst chmod a-w $(distdir) + test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ - && cd $(distdir)/_build \ + && am__cwd=`pwd` \ + && $(am__cd) $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ @@ -577,21 +624,24 @@ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ - (cd ../.. && $(mkinstalldirs) "$$dc_destdir") \ + (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ - && $(MAKE) $(AM_MAKEFLAGS) dist-gzip \ - && rm -f $(distdir).tar.gz \ - && $(MAKE) $(AM_MAKEFLAGS) distcleancheck + && $(MAKE) $(AM_MAKEFLAGS) dist \ + && rm -rf $(DIST_ARCHIVES) \ + && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ + && cd "$$am__cwd" \ + || exit 1 $(am__remove_distdir) - @echo "$(distdir).tar.gz is ready for distribution" | \ - sed 'h;s/./=/g;p;x;p;x' + @(echo "$(distdir) archives ready for distribution: "; \ + list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ + sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: - @cd $(distuninstallcheck_dir) \ + @$(am__cd) '$(distuninstallcheck_dir)' \ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ @@ -611,9 +661,10 @@ check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) - installdirs: - $(mkinstalldirs) $(DESTDIR)$(libdir) + for dir in "$(DESTDIR)$(libdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done install: install-am install-exec: install-exec-am install-data: install-data-am @@ -633,7 +684,8 @@ clean-generic: distclean-generic: - -rm -f $(CONFIG_CLEAN_FILES) + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -654,18 +706,40 @@ dvi-am: +html: html-am + +html-am: + info: info-am info-am: install-data-am: +install-dvi: install-dvi-am + +install-dvi-am: + install-exec-am: install-libLTLIBRARIES +install-html: install-html-am + +install-html-am: + install-info: install-info-am +install-info-am: + install-man: +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + installcheck-am: maintainer-clean: maintainer-clean-am @@ -688,21 +762,26 @@ ps-am: -uninstall-am: uninstall-info-am uninstall-libLTLIBRARIES +uninstall-am: uninstall-libLTLIBRARIES -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libLTLIBRARIES clean-libtool ctags dist dist-all \ - dist-gzip distcheck distclean distclean-compile \ +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \ + clean-generic clean-libLTLIBRARIES clean-libtool ctags dist \ + dist-all dist-bzip2 dist-gzip dist-lzma dist-shar dist-tarZ \ + dist-xz dist-zip distcheck distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags \ - distcleancheck distdir distuninstallcheck 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-libLTLIBRARIES install-man install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ + distcleancheck distdir distuninstallcheck dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-libLTLIBRARIES install-man install-pdf \ + install-pdf-am install-ps install-ps-am 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-libLTLIBRARIES + tags uninstall uninstall-am uninstall-libLTLIBRARIES + # 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. Index: mod.uworld/aclocal.m4 diff -u mod.uworld/aclocal.m4:1.4 mod.uworld/aclocal.m4:1.5 --- mod.uworld/aclocal.m4:1.4 Wed Jan 14 12:20:23 2009 +++ mod.uworld/aclocal.m4 Sun Sep 5 16:46:24 2010 @@ -1,7 +1,7 @@ -# generated automatically by aclocal 1.7.9 -*- Autoconf -*- +# generated automatically by aclocal 1.11.1 -*- Autoconf -*- -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002 -# Free Software Foundation, Inc. +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. # This file 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. @@ -11,1030 +11,1381 @@ # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. -# Do all the work for Automake. -*- Autoconf -*- - -# This macro actually does too much some checks are only needed if -# your package does certain things. But this isn't really a big deal. - -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 -# Free Software Foundation, Inc. - -# 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, or (at your option) -# any later version. +m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],, +[m4_warning([this file was generated for autoconf 2.65. +You have another version of autoconf. It may work, but is not guaranteed to. +If you have problems, you may need to regenerate the build system entirely. +To do so, use the procedure documented by the package, typically `autoreconf'.])]) -# This program is distributed in the hope that it will be useful, +# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- +# +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, +# 2006, 2007, 2008 Free Software Foundation, Inc. +# Written by Gordon Matzigkeit, 1996 +# +# This file 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. + +m4_define([_LT_COPYING], [dnl +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, +# 2006, 2007, 2008 Free Software Foundation, Inc. +# Written by Gordon Matzigkeit, 1996 +# +# This file is part of GNU Libtool. +# +# GNU Libtool 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. +# +# As a special exception to the GNU General Public License, +# if you distribute this file as part of a program or library that +# is built using GNU Libtool, you may include this file under the +# same distribution terms that you use for the rest of that program. +# +# GNU Libtool 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. +# along with GNU Libtool; see the file COPYING. If not, a copy +# can be downloaded from http://www.gnu.org/licenses/gpl.html, or +# obtained by writing to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +]) -# serial 10 +# serial 56 LT_INIT -AC_PREREQ([2.54]) -# Autoconf 2.50 wants to disallow AM_ names. We explicitly allow -# the ones we care about. -m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl +# LT_PREREQ(VERSION) +# ------------------ +# Complain and exit if this libtool version is less that VERSION. +m4_defun([LT_PREREQ], +[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, + [m4_default([$3], + [m4_fatal([Libtool version $1 or higher is required], + 63)])], + [$2])]) -# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) -# AM_INIT_AUTOMAKE([OPTIONS]) -# ----------------------------------------------- -# The call with PACKAGE and VERSION arguments is the old style -# call (pre autoconf-2.50), which is being phased out. PACKAGE -# and VERSION should now be passed to AC_INIT and removed from -# the call to AM_INIT_AUTOMAKE. -# We support both call styles for the transition. After -# the next Automake release, Autoconf can make the AC_INIT -# arguments mandatory, and then we can depend on a new Autoconf -# release and drop the old call support. -AC_DEFUN([AM_INIT_AUTOMAKE], -[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl - AC_REQUIRE([AC_PROG_INSTALL])dnl -# test to see if srcdir already configured -if test "`cd $srcdir && pwd`" != "`pwd`" && - test -f $srcdir/config.status; then - AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) -fi -# test whether we have cygpath -if test -z "$CYGPATH_W"; then - if (cygpath --version) >/dev/null 2>/dev/null; then - CYGPATH_W='cygpath -w' - else - CYGPATH_W=echo - fi -fi -AC_SUBST([CYGPATH_W]) +# _LT_CHECK_BUILDDIR +# ------------------ +# Complain if the absolute build directory name contains unusual characters +m4_defun([_LT_CHECK_BUILDDIR], +[case `pwd` in + *\ * | *\ *) + AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; +esac +]) -# Define the identity of the package. -dnl Distinguish between old-style and new-style calls. -m4_ifval([$2], -[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl - AC_SUBST([PACKAGE], [$1])dnl - AC_SUBST([VERSION], [$2])], -[_AM_SET_OPTIONS([$1])dnl - AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl - AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl -_AM_IF_OPTION([no-define],, -[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) - AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl +# LT_INIT([OPTIONS]) +# ------------------ +AC_DEFUN([LT_INIT], +[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT +AC_BEFORE([$0], [LT_LANG])dnl +AC_BEFORE([$0], [LT_OUTPUT])dnl +AC_BEFORE([$0], [LTDL_INIT])dnl +m4_require([_LT_CHECK_BUILDDIR])dnl + +dnl Autoconf doesn't catch unexpanded LT_ macros by default: +m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl +m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl +dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 +dnl unless we require an AC_DEFUNed macro: +AC_REQUIRE([LTOPTIONS_VERSION])dnl +AC_REQUIRE([LTSUGAR_VERSION])dnl +AC_REQUIRE([LTVERSION_VERSION])dnl +AC_REQUIRE([LTOBSOLETE_VERSION])dnl +m4_require([_LT_PROG_LTMAIN])dnl -# Some tools Automake needs. -AC_REQUIRE([AM_SANITY_CHECK])dnl -AC_REQUIRE([AC_ARG_PROGRAM])dnl -AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) -AM_MISSING_PROG(AUTOCONF, autoconf) -AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) -AM_MISSING_PROG(AUTOHEADER, autoheader) -AM_MISSING_PROG(MAKEINFO, makeinfo) -AM_MISSING_PROG(AMTAR, tar) -AM_PROG_INSTALL_SH -AM_PROG_INSTALL_STRIP -# We need awk for the "check" target. The system "awk" is bad on -# some platforms. -AC_REQUIRE([AC_PROG_AWK])dnl -AC_REQUIRE([AC_PROG_MAKE_SET])dnl -AC_REQUIRE([AM_SET_LEADING_DOT])dnl +dnl Parse OPTIONS +_LT_SET_OPTIONS([$0], [$1]) -_AM_IF_OPTION([no-dependencies],, -[AC_PROVIDE_IFELSE([AC_PROG_CC], - [_AM_DEPENDENCIES(CC)], - [define([AC_PROG_CC], - defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl -AC_PROVIDE_IFELSE([AC_PROG_CXX], - [_AM_DEPENDENCIES(CXX)], - [define([AC_PROG_CXX], - defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl -]) -]) +# This can be used to rebuild libtool when needed +LIBTOOL_DEPS="$ltmain" + +# Always use our own libtool. +LIBTOOL='$(SHELL) $(top_builddir)/libtool' +AC_SUBST(LIBTOOL)dnl +_LT_SETUP -# When config.status generates a header, we must update the stamp-h file. -# This file resides in the same directory as the config header -# that is generated. The stamp files are numbered to have different names. +# Only expand once: +m4_define([LT_INIT]) +])# LT_INIT + +# Old names: +AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) +AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_PROG_LIBTOOL], []) +dnl AC_DEFUN([AM_PROG_LIBTOOL], []) -# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the -# loop where config.status creates the headers, so we can generate -# our stamp files there. -AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], -[# Compute $1's index in $config_headers. -_am_stamp_count=1 -for _am_header in $config_headers :; do - case $_am_header in - $1 | $1:* ) - break ;; - * ) - _am_stamp_count=`expr $_am_stamp_count + 1` ;; + +# _LT_CC_BASENAME(CC) +# ------------------- +# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. +m4_defun([_LT_CC_BASENAME], +[for cc_temp in $1""; do + case $cc_temp in + compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; + distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; + \-*) ;; + *) break;; esac done -echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) - -# Copyright 2002 Free Software Foundation, Inc. +cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` +]) -# 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, 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. +# _LT_FILEUTILS_DEFAULTS +# ---------------------- +# It is okay to use these file commands and assume they have been set +# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. +m4_defun([_LT_FILEUTILS_DEFAULTS], +[: ${CP="cp -f"} +: ${MV="mv -f"} +: ${RM="rm -f"} +])# _LT_FILEUTILS_DEFAULTS -# 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 -# AM_AUTOMAKE_VERSION(VERSION) -# ---------------------------- -# Automake X.Y traces this macro to ensure aclocal.m4 has been -# generated from the m4 files accompanying Automake X.Y. -AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"]) +# _LT_SETUP +# --------- +m4_defun([_LT_SETUP], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_CANONICAL_BUILD])dnl +_LT_DECL([], [host_alias], [0], [The host system])dnl +_LT_DECL([], [host], [0])dnl +_LT_DECL([], [host_os], [0])dnl +dnl +_LT_DECL([], [build_alias], [0], [The build system])dnl +_LT_DECL([], [build], [0])dnl +_LT_DECL([], [build_os], [0])dnl +dnl +AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([LT_PATH_LD])dnl +AC_REQUIRE([LT_PATH_NM])dnl +dnl +AC_REQUIRE([AC_PROG_LN_S])dnl +test -z "$LN_S" && LN_S="ln -s" +_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl +dnl +AC_REQUIRE([LT_CMD_MAX_LEN])dnl +_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl +_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl +dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_CHECK_SHELL_FEATURES])dnl +m4_require([_LT_CMD_RELOAD])dnl +m4_require([_LT_CHECK_MAGIC_METHOD])dnl +m4_require([_LT_CMD_OLD_ARCHIVE])dnl +m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl + +_LT_CONFIG_LIBTOOL_INIT([ +# See if we are running on zsh, and set the options which allow our +# commands through without removal of \ escapes INIT. +if test -n "\${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST +fi +]) +if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST +fi -# AM_SET_CURRENT_AUTOMAKE_VERSION -# ------------------------------- -# Call AM_AUTOMAKE_VERSION so it can be traced. -# This function is AC_REQUIREd by AC_INIT_AUTOMAKE. -AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], - [AM_AUTOMAKE_VERSION([1.7.9])]) +_LT_CHECK_OBJDIR -# Helper functions for option handling. -*- Autoconf -*- +m4_require([_LT_TAG_COMPILER])dnl +_LT_PROG_ECHO_BACKSLASH -# Copyright 2001, 2002 Free Software Foundation, Inc. +case $host_os in +aix3*) + # AIX sometimes has problems with the GCC collect2 program. For some + # reason, if we set the COLLECT_NAMES environment variable, the problems + # vanish in a puff of smoke. + if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES + fi + ;; +esac -# 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, or (at your option) -# any later version. +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' -# 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. +# Same as above, but do not quote variable references. +double_quote_subst='s/\([["`\\]]\)/\\\1/g' -# 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. +# Sed substitution to delay expansion of an escaped shell variable in a +# double_quote_subst'ed string. +delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' -# serial 2 +# Sed substitution to delay expansion of an escaped single quote. +delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' -# _AM_MANGLE_OPTION(NAME) -# ----------------------- -AC_DEFUN([_AM_MANGLE_OPTION], -[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) +# Sed substitution to avoid accidental globbing in evaled expressions +no_glob_subst='s/\*/\\\*/g' -# _AM_SET_OPTION(NAME) -# ------------------------------ -# Set option NAME. Presently that only means defining a flag for this option. -AC_DEFUN([_AM_SET_OPTION], -[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) +# Global variables: +ofile=libtool +can_build_shared=yes -# _AM_SET_OPTIONS(OPTIONS) -# ---------------------------------- -# OPTIONS is a space-separated list of Automake options. -AC_DEFUN([_AM_SET_OPTIONS], -[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) +# All known linkers require a `.a' archive for static linking (except MSVC, +# which needs '.lib'). +libext=a -# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) -# ------------------------------------------- -# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. -AC_DEFUN([_AM_IF_OPTION], -[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) +with_gnu_ld="$lt_cv_prog_gnu_ld" -# -# Check to make sure that the build environment is sane. -# +old_CC="$CC" +old_CFLAGS="$CFLAGS" -# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc. +# Set sane defaults for various variables +test -z "$CC" && CC=cc +test -z "$LTCC" && LTCC=$CC +test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS +test -z "$LD" && LD=ld +test -z "$ac_objext" && ac_objext=o -# 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, or (at your option) -# any later version. +_LT_CC_BASENAME([$compiler]) -# 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. +# Only perform the check for file, if the check method requires it +test -z "$MAGIC_CMD" && MAGIC_CMD=file +case $deplibs_check_method in +file_magic*) + if test "$file_magic_cmd" = '$MAGIC_CMD'; then + _LT_PATH_MAGIC + fi + ;; +esac -# 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. +# Use C for the default configuration in the libtool script +LT_SUPPORTED_TAG([CC]) +_LT_LANG_C_CONFIG +_LT_LANG_DEFAULT_CONFIG +_LT_CONFIG_COMMANDS +])# _LT_SETUP -# serial 3 -# AM_SANITY_CHECK +# _LT_PROG_LTMAIN # --------------- -AC_DEFUN([AM_SANITY_CHECK], -[AC_MSG_CHECKING([whether build environment is sane]) -# Just in case -sleep 1 -echo timestamp > conftest.file -# Do `set' in a subshell so we don't clobber the current shell's -# arguments. Must try -L first in case configure is actually a -# symlink; some systems play weird games with the mod time of symlinks -# (eg FreeBSD returns the mod time of the symlink's containing -# directory). -if ( - set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` - if test "$[*]" = "X"; then - # -L didn't work. - set X `ls -t $srcdir/configure conftest.file` - fi - rm -f conftest.file - if test "$[*]" != "X $srcdir/configure conftest.file" \ - && test "$[*]" != "X conftest.file $srcdir/configure"; then +# Note that this code is called both from `configure', and `config.status' +# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, +# `config.status' has no value for ac_aux_dir unless we are using Automake, +# so we pass a copy along to make sure it has a sensible value anyway. +m4_defun([_LT_PROG_LTMAIN], +[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl +_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) +ltmain="$ac_aux_dir/ltmain.sh" +])# _LT_PROG_LTMAIN - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken -alias in your environment]) - fi - test "$[2]" = conftest.file - ) -then - # Ok. - : -else - AC_MSG_ERROR([newly created file is older than distributed files! -Check your system clock]) -fi -AC_MSG_RESULT(yes)]) -# -*- Autoconf -*- +# So that we can recreate a full libtool script including additional +# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS +# in macros and then make a single call at the end using the `libtool' +# label. -# Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc. +# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) +# ---------------------------------------- +# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. +m4_define([_LT_CONFIG_LIBTOOL_INIT], +[m4_ifval([$1], + [m4_append([_LT_OUTPUT_LIBTOOL_INIT], + [$1 +])])]) -# 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, or (at your option) -# any later version. +# Initialize. +m4_define([_LT_OUTPUT_LIBTOOL_INIT]) -# 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. +# _LT_CONFIG_LIBTOOL([COMMANDS]) +# ------------------------------ +# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. +m4_define([_LT_CONFIG_LIBTOOL], +[m4_ifval([$1], + [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], + [$1 +])])]) + +# Initialize. +m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) + + +# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) +# ----------------------------------------------------- +m4_defun([_LT_CONFIG_SAVE_COMMANDS], +[_LT_CONFIG_LIBTOOL([$1]) +_LT_CONFIG_LIBTOOL_INIT([$2]) +]) -# serial 3 - -# AM_MISSING_PROG(NAME, PROGRAM) -# ------------------------------ -AC_DEFUN([AM_MISSING_PROG], -[AC_REQUIRE([AM_MISSING_HAS_RUN]) -$1=${$1-"${am_missing_run}$2"} -AC_SUBST($1)]) +# _LT_FORMAT_COMMENT([COMMENT]) +# ----------------------------- +# Add leading comment marks to the start of each line, and a trailing +# full-stop to the whole comment if one is not present already. +m4_define([_LT_FORMAT_COMMENT], +[m4_ifval([$1], [ +m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], + [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) +)]) -# AM_MISSING_HAS_RUN -# ------------------ -# Define MISSING if not defined so far and test if it supports --run. -# If it does, set am_missing_run to use it, otherwise, to nothing. -AC_DEFUN([AM_MISSING_HAS_RUN], -[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" -# Use eval to expand $SHELL -if eval "$MISSING --run true"; then - am_missing_run="$MISSING --run " -else - am_missing_run= - AC_MSG_WARN([`missing' script is too old or missing]) -fi -]) -# AM_AUX_DIR_EXPAND -# Copyright 2001 Free Software Foundation, Inc. -# 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, 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. +# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) +# ------------------------------------------------------------------- +# CONFIGNAME is the name given to the value in the libtool script. +# VARNAME is the (base) name used in the configure script. +# VALUE may be 0, 1 or 2 for a computed quote escaped value based on +# VARNAME. Any other value will be used directly. +m4_define([_LT_DECL], +[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], + [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], + [m4_ifval([$1], [$1], [$2])]) + lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) + m4_ifval([$4], + [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) + lt_dict_add_subkey([lt_decl_dict], [$2], + [tagged?], [m4_ifval([$5], [yes], [no])])]) +]) -# 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. -# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets -# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to -# `$srcdir', `$srcdir/..', or `$srcdir/../..'. -# -# Of course, Automake must honor this variable whenever it calls a -# tool from the auxiliary directory. The problem is that $srcdir (and -# therefore $ac_aux_dir as well) can be either absolute or relative, -# depending on how configure is run. This is pretty annoying, since -# it makes $ac_aux_dir quite unusable in subdirectories: in the top -# source directory, any form will work fine, but in subdirectories a -# relative path needs to be adjusted first. -# -# $ac_aux_dir/missing -# fails when called from a subdirectory if $ac_aux_dir is relative -# $top_srcdir/$ac_aux_dir/missing -# fails if $ac_aux_dir is absolute, -# fails when called from a subdirectory in a VPATH build with -# a relative $ac_aux_dir -# -# The reason of the latter failure is that $top_srcdir and $ac_aux_dir -# are both prefixed by $srcdir. In an in-source build this is usually -# harmless because $srcdir is `.', but things will broke when you -# start a VPATH build or use an absolute $srcdir. -# -# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, -# iff we strip the leading $srcdir from $ac_aux_dir. That would be: -# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` -# and then we would define $MISSING as -# MISSING="\${SHELL} $am_aux_dir/missing" -# This will work as long as MISSING is not called from configure, because -# unfortunately $(top_srcdir) has no meaning in configure. -# However there are other variables, like CC, which are often used in -# configure, and could therefore not use this "fixed" $ac_aux_dir. -# -# Another solution, used here, is to always expand $ac_aux_dir to an -# absolute PATH. The drawback is that using absolute paths prevent a -# configured tree to be moved without reconfiguration. +# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) +# -------------------------------------------------------- +m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) + + +# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) +# ------------------------------------------------ +m4_define([lt_decl_tag_varnames], +[_lt_decl_filter([tagged?], [yes], $@)]) + + +# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) +# --------------------------------------------------------- +m4_define([_lt_decl_filter], +[m4_case([$#], + [0], [m4_fatal([$0: too few arguments: $#])], + [1], [m4_fatal([$0: too few arguments: $#: $1])], + [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], + [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], + [lt_dict_filter([lt_decl_dict], $@)])[]dnl +]) -# Rely on autoconf to set up CDPATH properly. -AC_PREREQ([2.50]) -AC_DEFUN([AM_AUX_DIR_EXPAND], [ -# expand $ac_aux_dir to an absolute path -am_aux_dir=`cd $ac_aux_dir && pwd` +# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) +# -------------------------------------------------- +m4_define([lt_decl_quote_varnames], +[_lt_decl_filter([value], [1], $@)]) + + +# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) +# --------------------------------------------------- +m4_def... [truncated message content] |
From: Matthias C. <ul...@us...> - 2009-04-08 07:21:19
|
Committer : Matthias Crauwels <ul...@us...> CVSROOT : /cvsroot/mod-uworld Module : website Commit time: 2009-04-08 07:21:12 UTC Modified files: inc_database.php inc_logon.php inc_tableutils.php layout.php logon.php main.php Log message: Author: Matthias Crauwels <mat...@no...> Log message: * Fixed the register_globals problems * Changed the layout to div's * Added sortable and pageable data table * Added search function ---------------------- diff included ---------------------- Index: website/inc_database.php diff -u website/inc_database.php:1.1 website/inc_database.php:1.2 --- website/inc_database.php:1.1 Sun Jan 26 18:59:02 2003 +++ website/inc_database.php Wed Apr 8 07:21:02 2009 @@ -1,35 +1,36 @@ -<?php - - /** UWorld PHP Backend - * - * @author: Christoph Cantillon - * @homepage: http://home.azinesoftware.com/ - */ - - $global_connection = null; - - function db_connect() { - return pg_connect("host=annelies.sharpnet.be dbname=uworld user=ultimate"); - } - - function db_query($query, $connection=null) { - global $global_connection; - if (!$connection) $resource = $global_connection; - if (!$connection) $connection = $global_connection = db_connect(); - - return pg_query($connection, $query); - } - - function db_fetchrow($result) { - return pg_fetch_array($result); - } - - function db_countrows($result) { - return pg_numrows($result); - } - - function db_fetchobject($result) { - return pg_fetch_object($result); - } - -?> \ No newline at end of file +<?php + + /** UWorld PHP Backend + * + * @author: Christoph Cantillon + * @homepage: http://home.azinesoftware.com/ + */ + + $global_connection = null; + + function db_connect() { + return pg_connect("host=localhost port=5432 dbname=boomnet-uworld user=irc"); + } + + function db_query($query, $connection=null) { + global $global_connection; + if (!$connection) $resource = $global_connection; + if (!$connection) $connection = $global_connection = db_connect(); + if (!$connection) echo 'error'; + + return pg_query($connection, $query); + } + + function db_fetchrow($result) { + return pg_fetch_array($result); + } + + function db_countrows($result) { + return pg_numrows($result); + } + + function db_fetchobject($result) { + return pg_fetch_object($result); + } + +?> Index: website/inc_logon.php diff -u website/inc_logon.php:1.1 website/inc_logon.php:1.2 --- website/inc_logon.php:1.1 Sun Jan 26 18:59:02 2003 +++ website/inc_logon.php Wed Apr 8 07:21:02 2009 @@ -1,49 +1,45 @@ -<?php - - /** UWorld PHP Backend - * - * @author: Christoph Cantillon - * @homepage: http://home.azinesoftware.com/ - */ - - require_once('inc_database.php'); - - session_start(); - session_register('userid'); - - function logon_checklogon($username, $password) { - $result = db_query("select password, id from users where lower(user_name) = '".strtolower($username)."';"); - - if ( db_countrows($result) != 1 ) return -1; - - $user = db_fetchobject($result); - if ($user->password == '') return $user->id; else { - $salt = substr($user->password,0,8); - $hash = substr($user->password,8); - - if (md5($salt.$password) == $hash) return $user->id; - else return -1; - } - } - - function logon_login($username, $password) { - global $userid; - return $userid = logon_checklogon($username, $password); - session_register('userid'); - } - - function logon_logout() { - global $userid; - $userid = -1; - } - - function logon_getuserid() { - global $userid; - return $userid; - } - - function logon_isloggedin() { - global $userid; - return ($userid != -1 && $userid != ''); - } -?> \ No newline at end of file +<?php + + /** UWorld PHP Backend + * + * @author: Christoph Cantillon + * @homepage: http://home.azinesoftware.com/ + */ + + require_once('inc_database.php'); + + session_start(); + session_register('userid'); + + function logon_checklogon($username, $password) { + $result = db_query("select password, id from users where lower(user_name) = '".strtolower($username)."';"); + + if ( db_countrows($result) != 1 ) return -1; + + $user = db_fetchobject($result); + if ($user->password == '') return $user->id; else { + $salt = substr($user->password,0,8); + $hash = substr($user->password,8); + + if (md5($salt.$password) == $hash) return $user->id; + else return -1; + } + } + + function logon_login($username, $password) { + $_SESSION['userid'] = logon_checklogon($username, $password); + return $_SESSION['userid']; + } + + function logon_logout() { + $_SESSION['userid'] = -1; + } + + function logon_getuserid() { + return $_SESSION['userid']; + } + + function logon_isloggedin() { + return ($_SESSION['userid'] != -1 && $_SESSION['userid'] != ''); + } +?> Index: website/inc_tableutils.php diff -u website/inc_tableutils.php:1.1 website/inc_tableutils.php:1.2 --- website/inc_tableutils.php:1.1 Sun Jan 26 18:59:02 2003 +++ website/inc_tableutils.php Wed Apr 8 07:21:02 2009 @@ -1,39 +1,115 @@ -<?php - - /** UWorld PHP Backend - * - * @author: Christoph Cantillon - * @homepage: http://home.azinesoftware.com/ - */ - - function table_opentable($format) { - $out = "<CENTER><TABLE CELLSPACING=0 CELLPADDING=4> - <TR CLASS='headerrow'>"; - - foreach($format as $key => $title) $out .= " - <TD>$title</TD>"; - - $out .= " - </TR>"; - - return $out; - } - - function table_newrow($format, $rowdata) { - $out = " - <TR>"; - - foreach($format as $key => $title) $out .= " - <TD>$rowdata[$key]</TD>"; - - $out .= " - </TR>"; - - return $out; - } - - function table_closetable($format) { - return " - </TABLE></CENTER>"; - } -?> \ No newline at end of file +<?php + + /** UWorld PHP Backend + * + * @author: Christoph Cantillon + * @homepage: http://home.azinesoftware.com/ + * @author: Matthias Crauwels <ult...@no...> + */ +/* + function table_opentable($format) { + $out = "<CENTER><TABLE CELLSPACING=0 CELLPADDING=4> + <TR CLASS='headerrow'>"; + + foreach($format as $key => $title) $out .= " + <TD>$title</TD>"; + + $out .= " + </TR>"; + + return $out; + } + + function table_newrow($format, $rowdata) { + $out = " + <TR>"; + + foreach($format as $key => $title) $out .= " + <TD>$rowdata[$key]</TD>"; + + $out .= " + </TR>"; + + return $out; + } + + function table_closetable($format) { + return " + </TABLE></CENTER>"; + } +*/ + function data_table($data, $header = array()) + { + $page = isset($_GET['page']) ? $_GET['page'] : 0; + $per_page = isset($_GET['per_page']) ? $_GET['per_page'] : 20; + $sort_col = isset($_GET['sort_col']) ? $_GET['sort_col'] : 0; + $sort_dir = isset($_GET['sort_dir']) ? $_GET['sort_dir'] : 'ASC'; + $max_page = (intval(count($data) / $per_page) + 1); + + + $content = ''; + if(count($data) > $per_page) + { + $content .= get_pager($page, $per_page, $max_page, $sort_col, $sort_dir); + } + + // display the header-row + $content .= '<table class="data_table" width="100%">' . "\n"; + $content .= '<tr class="headerrow">'; + foreach ($header as $id => $value) + { + if($id == $sort_col) + { + $content .= '<td><a href="' . $_SERVER['PHP_SELF'] . '?action=' . $_GET['action'] . '&page=' . $page . '&sort_col='. $sort_col . '&sort_dir=' . ($sort_dir == 'ASC' ? 'DESC' : 'ASC') . '">' . $value . ($sort_dir == 'ASC' ? ' ↓' : ' ↑') . '</a></td>'; + } + else + { + $content .= '<td><a href="' . $_SERVER['PHP_SELF'] . '?action=' . $_GET['action'] . '&page=' . $page . '&sort_col='. $id . '">' . $value . '</a></td>'; + } + + } + $content .= '</tr>' . "\n"; + + //display the data... + for($r = ($page * $per_page); $r < (($page+1) * $per_page) AND $r < count($data); $r++) + { + $row = $data[$r]; + $content .= '<tr class="'. ($id % 2 == 0 ? 'row_even' : 'row_odd').'">'; + + for($i = 0; $i < count($header); $i++) + { + $content .= '<td>' . $row[$i] . '</td>'; + } + $content .= '</tr>' . "\n"; + } + $content .= '</table>'; + return $content; + + } + + function get_pager($page, $per_page, $max_page, $sort_col, $sort_dir) + { + $links[] = $page > 0 ? '<a href="' . $_SERVER['PHP_SELF'] . '?action=' . $_GET['action'] . '&sort_col='. $sort_col . '&sort_dir=' . $sort_dir . '&page=0"><<</a>' : '<a><<</a>'; + $links[] = $page > 0 ? '<a href="' . $_SERVER['PHP_SELF'] . '?action=' . $_GET['action'] . '&sort_col='. $sort_col . '&sort_dir=' . $sort_dir . '&page=' . ($page - 1) . '"><</a>' : '<a><</a>'; + $links[] = ($page+1) . ' / ' . $max_page; + $links[] = ($page+1) < $max_page ? '<a href="' . $_SERVER['PHP_SELF'] . '?action=' . $_GET['action'] . '&sort_col='. $sort_col . '&sort_dir=' . $sort_dir . '&page=' . ($page + 1) . '">></a>' : '<a>></a>'; + $links[] = ($page+1) < $max_page ? '<a href="' . $_SERVER['PHP_SELF'] . '?action=' . $_GET['action'] . '&sort_col='. $sort_col . '&sort_dir=' . $sort_dir . '&page=' . ($max_page - 1) . '">>></a>' : '<a>>></a>'; + return '<div style="width: 100%; text-align: center;">' . implode(' ', $links) . '</div>'; + } + + function get_search_form($searchfields = array()) + { + $return .= '<form action="main.php?action=' . $_GET['action'] . '" method="POST">'; + foreach($searchfields as $key => $label) + { + $return .= '<div>'; + $return .= '<div style="float: left; width:100px; text-align: right;">' . $label . '</div>'; + $return .= '<div style="float: right; width: 250px;"><input size="35" type="text" name="' . $key . '" /></div>'; + $return .= '<div style="clear: both;"></div>'; + $return .= '</div>'; + } + $return .= '<div style="width: 100%; text-align: right; margin: 5px;"><input type="submit" value="Search" /></div>'; + $return .= '</form>'; + return '<div style="text-align: left; width: 400px; margin: 13px;">' . $return . '</div>'; + } +?> Index: website/layout.php diff -u website/layout.php:1.1 website/layout.php:1.2 --- website/layout.php:1.1 Sun Jan 26 18:59:02 2003 +++ website/layout.php Wed Apr 8 07:21:02 2009 @@ -1,35 +1,102 @@ -<?php - - /** UWorld PHP Backend - * - * @author: Christoph Cantillon - * @homepage: http://home.azinesoftware.com/ - */ - - require_once('inc_logon.php'); -?> -<HTML> -<HEAD> - <TITLE>UWorld</TITLE> - <STYLE TYPE='text/css'><!-- - BODY, .contentcell { font-family: Verdana, sans-serif; font-size: 11px; color: black; } - .headerrow { color: white; background: black; font-weight: bold; } - .headerrow A { color: white; } - TD { font-family: Verdana, sans-serif; font-size: 11px; } - A { color: black; text-decoration: underline; } - A:hover { text-decoration: overline underline; } - TR { border-collapse: collapse; border-bottom: 1px dashed #999999; } - --></STYLE> -</HEAD> -<BODY BGCOLOR=WHITE LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0> -<TABLE WIDTH="100%" CELLSPACING=0 CELLPADDING=10><TR CLASS='headerrow'> - <TD STYLE='font-size: 34px; font-weight: bold;'>UWorld</TD> - <TD ALIGN=RIGHT><?php - if (logon_isloggedin()) print("<A HREF='logon.php?action=logout'>Log Out</A> | <A HREF='main.php?action=glines'>gLines</A> | <A HREF='main.php?action=log'>Logs</A>"); - else print("Log In"); ?></TD></TR> -<TR><TD CLASS='contentcell' COLSPAN=2> -<?php print $content; ?> -</TD></TR> -</TABLE> -</BODY> -</HTML> \ No newline at end of file +<?php + + /** UWorld PHP Backend + * + * @author: Christoph Cantillon + * @homepage: http://home.azinesoftware.com/ + */ + + require_once('inc_logon.php'); +?> +<html> +<head> + <title>Uworld</title> +<style type='text/css'> +<!-- +body, .contentcell { + font-family: Verdana, sans-serif; + font-size: 11px; + color: black; +} + +td { + font-family: Verdana, sans-serif; + font-size: 11px; +} + +.headerrow { + color: white; + background: black; + font-weight: bold; +} +.headerrow a { + color: white; +} + +a { + color: black; + text-decoration: underline; +} +a:hover { + text-decoration: overline underline; +} + +.data_table { + border-collapse: collapse; + width: 100%; + padding: 5px; +} + +.data_table th { + padding-right: 20px; + border: 1px solid gray; + background-color: #E5EDF9; +} + +data_table tr.row_odd { + background-color: #fafafa; +} + +.data_table tr.row_odd:hover, .data_table tr.row_even:hover { + background-color: #f0f0f0; +} + +.data_table tr.row_even { + background-color: #fff; +} + +.data_table td { + padding: 5px; + vertical-align: top; + border-bottom: 1px solid #b0b0b0; + border-right: 1px dotted #e1e1e1; + border-left: 1px dotted #e1e1e1; +} + +--> +</style> +</head> +<body bgcolor="white" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"> +<div class='headerrow' style="padding: 13px;"> + <div style='font-size: 34px; font-weight: bold;'>Uworld</div> + <div style="text-align: right; margin: 13px;"> + <?php + if (logon_isloggedin()) + { + print("<a href='logon.php?action=logout'>Log Out</a> | "); + print("<a href='main.php?action=glines'>gLines</a> | "); + print("<a href='main.php?action=log'>Logs</a>"); + } + else + { + print("Log In"); + } + ?> + </div> +</div> +<div class='contentcell'> + <?php print $content; ?> +</div> + +</body> +</html> Index: website/logon.php diff -u website/logon.php:1.1 website/logon.php:1.2 --- website/logon.php:1.1 Sun Jan 26 18:59:02 2003 +++ website/logon.php Wed Apr 8 07:21:02 2009 @@ -1,46 +1,46 @@ -<?php - - /** UWorld PHP Backend - * - * @author: Christoph Cantillon - * @homepage: http://home.azinesoftware.com/ - */ - - require_once('inc_database.php'); - - require('inc_logon.php'); - - if ($action == 'logon') { - if (logon_login($username,$password) != -1) { - header('Location: main.php'); - } else { - $content = "<CENTER>An error occured loging in. Try again.</CENTER>"; - } - } else if ($action == 'logout') { - logon_logout(); - } - - if (! logon_isloggedin() ) { - $content .= "<FORM ACTION='logon.php' METHOD='post'> - <CENTER> - <TABLE> - <TR CLASS='headerrow'> - <TD COLSPAN=2 ALIGN=CENTER> - Login - </TD></TR><TR> - <TD ALIGN=RIGHT>Username:</TD> - <TD><INPUT TYPE='text' NAME='username' STYLE='width: 100;'></TD> - </TR><TR> - <TD ALIGN=RIGHT>Password:</TD> - <TD><INPUT TYPE='password' NAME='password' STYLE='width: 100;'></TD> - </TR> - <TR> - <TD COLSPAN=2 ALIGN=RIGHT><INPUT TYPE='hidden' NAME='action' VALUE='logon'><INPUT TYPE='Submit' NAME='submit' VALUE='Log In'></TD> - </TR></TABLE></FORM> - </CENTER>"; - } else { - $content = "You are already logged in as ".logon_getuserid()."."; - } - - require_once('layout.php'); -?> \ No newline at end of file +<?php + + /** UWorld PHP Backend + * + * @author: Christoph Cantillon + * @homepage: http://home.azinesoftware.com/ + */ + + require_once('inc_database.php'); + + require('inc_logon.php'); + + if ($_POST['action'] == 'logon') { + if (logon_login($_POST['username'],$_POST['password']) != -1) { + header('Location: main.php'); + } else { + $content = "<CENTER>An error occured loging in. Try again.</CENTER>"; + } + } else if ($_GET['action'] == 'logout') { + logon_logout(); + } + + if (! logon_isloggedin() ) { + $content .= "<FORM ACTION='logon.php' METHOD='post'> + <CENTER> + <TABLE> + <TR CLASS='headerrow'> + <TD COLSPAN=2 ALIGN=CENTER> + Login + </TD></TR><TR> + <TD ALIGN=RIGHT>Username:</TD> + <TD><INPUT TYPE='text' NAME='username' STYLE='width: 100;'></TD> + </TR><TR> + <TD ALIGN=RIGHT>Password:</TD> + <TD><INPUT TYPE='password' NAME='password' STYLE='width: 100;'></TD> + </TR> + <TR> + <TD COLSPAN=2 ALIGN=RIGHT><INPUT TYPE='hidden' NAME='action' VALUE='logon'><INPUT TYPE='Submit' NAME='submit' VALUE='Log In'></TD> + </TR></TABLE></FORM> + </CENTER>"; + } else { + $content = "You are already logged in as ".logon_getuserid()."."; + } + + require_once('layout.php'); +?> Index: website/main.php diff -u website/main.php:1.1 website/main.php:1.2 --- website/main.php:1.1 Sun Jan 26 18:59:02 2003 +++ website/main.php Wed Apr 8 07:21:02 2009 @@ -1,58 +1,97 @@ -<?php - - /** UWorld PHP Backend - * - * @author: Christoph Cantillon - * @homepage: http://home.azinesoftware.com/ - */ - - require_once('inc_database.php'); - require_once('inc_tableutils.php'); - - require('inc_logon.php'); - - if (! logon_isloggedin() ) { - $content = "You must be logged in in order for this functionality to work. Click <a href='logon.php#'>here</a> to log in."; - } else { - if ($action == 'glines') { - $res = db_query("SELECT * FROM glines;"); - $format = array( - 'id' => 'ID', - 'host' => 'Host', - 'addedby' => 'Added By', - 'addedon' => 'Added On', - 'addedlevel' => 'Added Level', - 'expiresat' => 'Expires', - 'reason' => 'Reason'); - - $content .= table_opentable($format); - - while($row = db_fetchrow($res)) { - $content .= table_newrow($format, $row); - } - - $content .= table_closetable($format); - } else if ($action == "log") { - $res = db_query("SELECT * FROM logs;"); - - $format = array( - 'id' => 'ID', - 'username' => 'Username', - 'nickuserhost' => 'User', - 'ts' => 'Time', - 'log' => 'Description'); - - $content .= table_opentable($format); - - while($row = db_fetchrow($res)) { - $content .= table_newrow($format, $row); - } - - $content .= table_closetable($format); - - } - - } - - require_once('layout.php'); -?> \ No newline at end of file +<?php + /** UWorld PHP Backend + * + * @author: Christoph Cantillon + * @homepage: http://home.azinesoftware.com/ + * @author: Matthias Crauwels <ult...@no...> + */ + + require_once('inc_database.php'); + require_once('inc_tableutils.php'); + + require('inc_logon.php'); + + if (! logon_isloggedin() ) { + $content = "You must be logged in in order for this functionality to work. Click <a href='logon.php#'>here</a> to log in."; + } else { + $sort_col = isset($_GET['sort_col']) && is_numeric($_GET['sort_col']) ? $_GET['sort_col'] : 0; + $sort_dir = isset($_GET['sort_dir']) ? $_GET['sort_dir'] : 'ASC'; + $sort_col++; + if($sort_dir != 'ASC' AND $sort_dir != 'DESC') $sort_dir = 'ASC'; + + if(isset($_POST)) + { + $where_opts = array(); + foreach($_POST as $key => $value) + { + if(!empty($value)) + { + $where_opts[] = 'lower(' . $key . ') LIKE \'%' . strtolower($value) . '%\''; + } + } + + if(!empty($where_opts)) + { + $sql_where = ' WHERE ' . implode(' AND ', $where_opts) . ' '; + $_SESSION['sql_where'][$_GET['action']] = $sql_where; + } + elseif(!empty($_SESSION['sql_where']) && empty($_POST)) + { + $sql_where = $_SESSION['sql_where'][$_GET['action']]; + } + else + { + unset($_SESSION['sql_where'][$_GET['action']]); + } + } + + if ($_GET['action'] == 'glines') { + $res = db_query("SELECT * FROM glines $sql_where ORDER BY $sort_col $sort_dir;"); + $header = array('ID', 'Host', 'Added By', 'Added On', 'Added Level', 'Expires', 'Reason'); + + $data = array(); + while($dbrow = db_fetchrow($res)) + { + print_r($db_row); + $row = array(); + $row[] = $dbrow['id']; + $row[] = $dbrow['host']; + $row[] = $dbrow['addedby']; + $row[] = strftime('%c', $dbrow['addedon']); + $row[] = $dbrow['addedlevel']; + $row[] = strftime('%c', $dbrow['expiresat']); + $row[] = $dbrow['reason']; + $data[] = $row; + + } + + $content = get_search_form(array('host' => 'Host', 'addedby' => 'Added by', 'reason' => 'Reason')); + $content .= data_table($data, $header); + + } else if ($_GET['action'] == "log") { + $res = db_query("SELECT * FROM logs $sql_where ORDER BY $sort_col $sort_dir;"); + + $header = array('ID', 'Username', 'User', 'Time', 'Description'); + + $data = array(); + while($dbrow = db_fetchrow($res)) + { + print_r($db_row); + $row = array(); + $row[] = $dbrow['id']; + $row[] = $dbrow['username']; + $row[] = $dbrow['nickuserhost']; + $row[] = strftime('%c', $dbrow['ts']); + $row[] = $dbrow['log']; + $data[] = $row; + + } + + $content = get_search_form(array('username' => 'Username', 'nickuserhost' => 'User', 'log' => 'Description')); + $content .= data_table($data, $header); + } + + } + + require_once('layout.php'); +?> ----------------------- End of diff ----------------------- |
From: Matthias C. <ul...@us...> - 2009-04-07 10:38:18
|
Committer : Matthias Crauwels <ul...@us...> CVSROOT : /cvsroot/mod-uworld Module : mod.uworld Commit time: 2009-04-07 10:38:01 UTC Modified files: uworld.cc uworld.h Log message: Author: Matthias Crauwels <ult...@no...> Log message: * Over the years the signature of OnTimer seems to have changed... This caused the timers not to work anymore. ---------------------- diff included ---------------------- Index: mod.uworld/uworld.cc diff -u mod.uworld/uworld.cc:1.15 mod.uworld/uworld.cc:1.16 --- mod.uworld/uworld.cc:1.15 Fri Apr 3 07:22:04 2009 +++ mod.uworld/uworld.cc Tue Apr 7 10:37:50 2009 @@ -266,8 +266,11 @@ ptr->second->setServer( MyUplink ) ; } - expiredTimer = MyUplink->RegisterTimer(::time(0) + ExpiredInterval,this,NULL); - dbConnectionCheck = MyUplink->RegisterTimer(::time(0) + dbConnectionTimer,this,NULL); + time_t theTime = time(NULL) + ExpiredInterval; + expiredTimer = MyUplink->RegisterTimer(theTime, this, NULL); + + theTime = time(NULL) + dbConnectionTimer; + dbConnectionCheck = MyUplink->RegisterTimer(theTime, this, NULL); // Register the events that we wish to listen for @@ -607,21 +610,18 @@ } - void uworld::OnTimer(xServer::timerID timer_id, void*) + void uworld::OnTimer(const xServer::timerID& timer_id, void*) { - if (timer_id == expiredTimer) { refreshGlines(); - //refreshIgnores(); refreshSuspends(); - expiredTimer = MyUplink->RegisterTimer(::time(0) + ExpiredInterval, - this,NULL); + expiredTimer = MyUplink->RegisterTimer(::time(0) + ExpiredInterval, this, NULL); } else if(timer_id == dbConnectionCheck) { checkDbConnection(); - dbConnectionCheck = MyUplink->RegisterTimer(::time(0) + dbConnectionTimer,this,NULL); + dbConnectionCheck = MyUplink->RegisterTimer(::time(0) + dbConnectionTimer, this, NULL); } } @@ -785,7 +785,7 @@ vsprintf( buffer, Msg, list ) ; va_end( list ) ; - xClient::Notice((Network->findChannel(msgChannel))->getName(),"%s", buffer); + Notice((Network->findChannel(msgChannel))->getName(),"%s", buffer); ConsoleWall(buffer); } Index: mod.uworld/uworld.h diff -u mod.uworld/uworld.h:1.10 mod.uworld/uworld.h:1.11 --- mod.uworld/uworld.h:1.10 Fri Apr 3 07:22:04 2009 +++ mod.uworld/uworld.h Tue Apr 7 10:37:50 2009 @@ -2,7 +2,7 @@ */ #ifndef __uworld_H -#define __uworld_H "$Id: uworld.h,v 1.10 2009/04/03 07:22:04 ultike Exp $" +#define __uworld_H "$Id: uworld.h,v 1.11 2009/04/07 10:37:50 ultike Exp $" #include <string> #include <vector> @@ -122,7 +122,7 @@ const string&, bool Secure = false ) ; - virtual void OnTimer(xServer::timerID, void*); + virtual void OnTimer(const xServer::timerID&, void*); /** * This method is invoked each time a network event occurs. ----------------------- End of diff ----------------------- |
From: Matthias C. <ul...@us...> - 2009-04-03 07:22:23
|
Committer : Matthias Crauwels <ul...@us...> CVSROOT : /cvsroot/mod-uworld Module : mod.uworld Commit time: 2009-04-03 07:22:15 UTC Modified files: uworld.cc uworld.h Log message: Author: Matthias Crauwels <ult...@no...> Log message: * Do the BurstGlines properly by overriding the xClient function. This way it loads it's own glines during the burst instead of after it... * Fixed a problem that makes it core in handling the event EVT_REMGLINE ---------------------- diff included ---------------------- Index: mod.uworld/uworld.cc diff -u mod.uworld/uworld.cc:1.14 mod.uworld/uworld.cc:1.15 --- mod.uworld/uworld.cc:1.14 Thu Apr 2 19:00:57 2009 +++ mod.uworld/uworld.cc Fri Apr 3 07:22:04 2009 @@ -230,6 +230,29 @@ MyUplink->RegisterChannelEvent( msgChannel, this ) ; MyUplink->RegisterChannelEvent( operChannel, this ) ; } + + bool uworld::BurstGlines() + { + elog << "bursting glines ..." << endl; + + uwGline *theGline = 0 ; + unsigned int Expires = 0; + for(glineListType::iterator ptr = glineList.begin(); ptr != glineList.end(); ++ptr) + { + theGline = ptr->second; + Expires = theGline->getExpires() - ::time(0); + // TAG + if(/*Expires < 0 && */ theGline->getHost().substr(0,1) == "#") + Expires = 3600*24*500; + elog << theGline->getHost() << ": " << theGline->getReason() << endl; + MyUplink->setGline(MyUplink->getName(), theGline->getHost(), theGline->getReason(), Expires, ::time(0), this); + theGline->clearBurst(); + } + + return xClient::BurstGlines(); + } + + // I don't really like doing this. // In order for each of this bot's Command's to have a valid server @@ -465,32 +488,39 @@ if(newGline) { - //ConsoleWall("DEBUG: this gline level = %d", newGline->getAddedLevel()); - //ConsoleWall("DEBUG: remote gline level = %d", levels::gline::remotegline); - if (newGline->getAddedLevel() <= levels::gline::remotegline) - { - remGline(newGline); - newGline->Delete(); - delete newGline; - - } else { - int gLength = newGline->getExpires() - newGline->getAddedOn(); - newGline->setAddedBy(MyUplink->getName()); - newGline->setAddedOn(::time(0)); - MyUplink->setGline(MyUplink->getName(), - newGline->getHost(), - newGline->getReason(), - gLength, - ::time(0), - this); - } + remGline(newGline); + newGline->Delete(); + delete newGline; } + + //if(newGline) + //{ + // //ConsoleWall("DEBUG: this gline level = %d", newGline->getAddedLevel()); + // //ConsoleWall("DEBUG: remote gline level = %d", levels::gline::remotegline); + // if (newGline->getAddedLevel() <= levels::gline::remotegline) + // { + // remGline(newGline); + // newGline->Delete(); + // delete newGline; + // + // } else { + // int gLength = newGline->getExpires() - newGline->getAddedOn(); + // newGline->setAddedBy(MyUplink->getName()); + // newGline->setAddedOn(::time(0)); + // MyUplink->setGline(MyUplink->getName(), + // newGline->getHost(), + // newGline->getReason(), + // gLength, + // ::time(0), + // this); + // } + //} break; } case EVT_BURST_CMPLT: { refreshGlines(); - burstGlines(); + //burstGlines(); addNet(); numLogs = 0; break; @@ -1237,26 +1267,6 @@ } - bool uworld::burstGlines() - { - elog << "bursting glines ..." << endl; - - uwGline *theGline = 0 ; - unsigned int Expires = 0; - for(glineListType::iterator ptr = glineList.begin(); ptr != glineList.end(); ++ptr) - { - theGline = ptr->second; - Expires = theGline->getExpires() - ::time(0); - // TAG - if(/*Expires < 0 && */ theGline->getHost().substr(0,1) == "#") - Expires = 3600*24*500; - MyUplink->setGline(MyUplink->getName(), theGline->getHost(), theGline->getReason(), Expires, ::time(0), this); - theGline->clearBurst(); - } - - return xClient::BurstGlines(); - } - void uworld::listUsers(iClient* theClient, bool PrivMsg) { uwUser* curUser; Index: mod.uworld/uworld.h diff -u mod.uworld/uworld.h:1.9 mod.uworld/uworld.h:1.10 --- mod.uworld/uworld.h:1.9 Wed Jan 14 16:20:54 2009 +++ mod.uworld/uworld.h Fri Apr 3 07:22:04 2009 @@ -2,7 +2,7 @@ */ #ifndef __uworld_H -#define __uworld_H "$Id: uworld.h,v 1.9 2009/01/14 16:20:54 ultike Exp $" +#define __uworld_H "$Id: uworld.h,v 1.10 2009/04/03 07:22:04 ultike Exp $" #include <string> #include <vector> @@ -105,6 +105,7 @@ * the xServer of the channels this client wishes to burst. */ virtual void BurstChannels() ; + virtual bool BurstGlines(); /** * This method is called when a network client sends @@ -205,7 +206,6 @@ void loadGlines(); void listGlines(iClient*); void listBadChans(iClient*); - bool burstGlines(); void refreshSuspends(); void loadUsers(); ----------------------- End of diff ----------------------- |
From: Matthias C. <ul...@us...> - 2009-04-02 19:01:13
|
Committer : Matthias Crauwels <ul...@us...> CVSROOT : /cvsroot/mod-uworld Module : mod.uworld Commit time: 2009-04-02 19:01:09 UTC Modified files: BADCHANCommand.cc GLINECommand.cc uworld.cc Log message: Author: Matthias Crauwels <ult...@no...> Log message: Passing on extra parameters to setGline() ---------------------- diff included ---------------------- Index: mod.uworld/BADCHANCommand.cc diff -u mod.uworld/BADCHANCommand.cc:1.5 mod.uworld/BADCHANCommand.cc:1.6 --- mod.uworld/BADCHANCommand.cc:1.5 Wed Jan 14 16:20:52 2009 +++ mod.uworld/BADCHANCommand.cc Thu Apr 2 19:00:57 2009 @@ -1,6 +1,6 @@ /* * BADCHANCommand.cc - * $Id: BADCHANCommand.cc,v 1.5 2009/01/14 16:20:52 ultike Exp $ + * $Id: BADCHANCommand.cc,v 1.6 2009/04/02 19:00:57 ultike Exp $ * */ @@ -21,7 +21,6 @@ bool BADCHANCommand::Exec( iClient* theClient, const string& Message ) { - StringTokenizer st( Message ) ; bool PrivMsg = bot->SendPrivmsg(theClient); @@ -124,7 +123,7 @@ bot->MsgChanLog("%s ( %s ) badchanned %s untill %s", theUser->getUserName().c_str(), theClient->getNickUserHost().c_str(), newGline->getHost().c_str(), (newGline->getExpires() == 0) ? "PERMANENT" : bot->convertToAscTime(newGline->getExpires()) ); - server->setGline(server->getName(), newGline->getHost(), reason, (gLength == 0) ? (3600*24*500) : gLength); + server->setGline(server->getName(), newGline->getHost(), reason, (gLength == 0) ? (3600*24*500) : gLength, ::time(0), bot); } return true; Index: mod.uworld/GLINECommand.cc diff -u mod.uworld/GLINECommand.cc:1.5 mod.uworld/GLINECommand.cc:1.6 --- mod.uworld/GLINECommand.cc:1.5 Wed Jan 14 16:20:52 2009 +++ mod.uworld/GLINECommand.cc Thu Apr 2 19:00:57 2009 @@ -1,6 +1,6 @@ /* * GLINECommand.cc - * $Id: GLINECommand.cc,v 1.5 2009/01/14 16:20:52 ultike Exp $ + * $Id: GLINECommand.cc,v 1.6 2009/04/02 19:00:57 ultike Exp $ * */ @@ -18,7 +18,6 @@ namespace uwrld { - bool GLINECommand::Exec( iClient* theClient, const string& Message ) { @@ -187,7 +186,7 @@ bot->MsgChanLog("%s ( %s ) added gline %s untill %s", theUser->getUserName().c_str(), theClient->getNickUserHost().c_str(), newGline->getHost().c_str(), bot->convertToAscTime(newGline->getExpires())); - server->setGline(server->getName(), newGline->getHost(), theReason, gLength); + server->setGline(server->getName(), newGline->getHost(), theReason, gLength, ::time(0), bot); } return true; @@ -284,7 +283,7 @@ //need to load the id tmpGline->loadData(tmpGline->getHost()); bot->addGline(tmpGline); - server->setGline(server->getName(), tmpGline->getHost(), theReason, gLength); + server->setGline(server->getName(), tmpGline->getHost(), theReason, gLength, ::time(0), bot); affected++; } } Index: mod.uworld/uworld.cc diff -u mod.uworld/uworld.cc:1.13 mod.uworld/uworld.cc:1.14 --- mod.uworld/uworld.cc:1.13 Wed Jan 14 16:20:54 2009 +++ mod.uworld/uworld.cc Thu Apr 2 19:00:57 2009 @@ -20,7 +20,7 @@ #include "server.h" #include "StringTokenizer.h" #include "EConfig.h" -#include "uworldCommands.h" +#include "uworldCommands.h" #include "uwUser.h" #include "Network.h" #include "md5hash.h" @@ -43,7 +43,7 @@ namespace uwrld { - + using gnuworld::xServer; @@ -480,7 +480,9 @@ MyUplink->setGline(MyUplink->getName(), newGline->getHost(), newGline->getReason(), - gLength); + gLength, + ::time(0), + this); } } break; @@ -1248,7 +1250,7 @@ // TAG if(/*Expires < 0 && */ theGline->getHost().substr(0,1) == "#") Expires = 3600*24*500; - MyUplink->setGline(MyUplink->getName(), theGline->getHost(), theGline->getReason(), Expires); + MyUplink->setGline(MyUplink->getName(), theGline->getHost(), theGline->getReason(), Expires, ::time(0), this); theGline->clearBurst(); } @@ -1600,7 +1602,7 @@ //need to load the id newGline->loadData(newGline->getHost()); addGline(newGline); - MyUplink->setGline(MyUplink->getName(), newGline->getHost(), theReason, aglLength); + MyUplink->setGline(MyUplink->getName(), newGline->getHost(), theReason, aglLength, ::time(0), this); }// !newGline } // isModeK? } //for ----------------------- End of diff ----------------------- |
From: Matthias C. <ul...@us...> - 2009-01-14 16:21:14
|
Committer : Matthias Crauwels <ul...@us...> CVSROOT : /cvsroot/mod-uworld Module : mod.uworld Commit time: 2009-01-14 16:21:04 UTC Modified files: ACCESSCommand.cc ADDUSERCommand.cc AGLCommand.cc BADCHANCommand.cc CHANINFOCommand.cc CHECKNETCommand.cc CLEARCHANCommand.cc DEAUTHCommand.cc DELSERVERCommand.cc FDEAUTHCommand.cc GLINECommand.cc GLOBALNOTCommand.cc HELPCommand.cc INVITECommand.cc INVMECommand.cc JOINCommand.cc JUPECommand.cc LASTCOMMCommand.cc LEARNNETCommand.cc LISTCommand.cc LOGINCommand.cc MODECommand.cc MODUSERCommand.cc NEWPASSCommand.cc OMSGCommand.cc OPCHANCommand.cc PARTCommand.cc QUOTECommand.cc RELOADCommand.cc REMBADCHANCommand.cc REMGLINECommand.cc REMUSERCommand.cc SAYCommand.cc SCANCommand.cc SERVLISTCommand.cc SHUTDOWNCommand.cc STATUSCommand.cc SUSPENDCommand.cc TRANSLATECommand.cc UNSUSPENDCommand.cc UPTIMECommand.cc WALLOPSCommand.cc WHOISCommand.cc uwAGL.cc uwGline.cc uwLog.cc uwServer.cc uwUser.cc uworld.cc uworld.h uworldCommands.cc Log message: Author: Matthias Crauwels <ult...@no...> Log message: * 2009-01-14 - Adjusted indentation... ---------------------- diff included ---------------------- Index: mod.uworld/ACCESSCommand.cc diff -u mod.uworld/ACCESSCommand.cc:1.4 mod.uworld/ACCESSCommand.cc:1.5 --- mod.uworld/ACCESSCommand.cc:1.4 Thu Jan 8 01:24:25 2004 +++ mod.uworld/ACCESSCommand.cc Wed Jan 14 16:20:52 2009 @@ -13,68 +13,68 @@ #include "uworldCommands.h" #include "constants.h" -const char ACCESSCommand_cc_rcsId[] = "$Id: ACCESSCommand.cc,v 1.4 2004/01/08 01:24:25 ultike Exp $"; +const char ACCESSCommand_cc_rcsId[] = "$Id: ACCESSCommand.cc,v 1.5 2009/01/14 16:20:52 ultike Exp $"; namespace gnuworld { - -using std::string ; -using std::endl ; -using std::stringstream ; -using std::ends ; - -namespace uwrld -{ - -bool ACCESSCommand::Exec( iClient* theClient, const string& Message) -{ - -StringTokenizer st( Message ) ; - - -bool PrivMsg = bot->SendPrivmsg(theClient); - -string Uname; -if(st.size() > 1) + + using std::string ; + using std::endl ; + using std::stringstream ; + using std::ends ; + + namespace uwrld { - uwUser* curUser = bot->getUser(bot->removeSqlChars(st[1])); - if(!curUser) + + bool ACCESSCommand::Exec( iClient* theClient, const string& Message) { - bot->SendTo(theClient, PrivMsg, "No such user"); - return false; + + StringTokenizer st( Message ) ; + + + bool PrivMsg = bot->SendPrivmsg(theClient); + + string Uname; + if(st.size() > 1) + { + uwUser* curUser = bot->getUser(bot->removeSqlChars(st[1])); + if(!curUser) + { + bot->SendTo(theClient, PrivMsg, "No such user"); + return false; + } + + bot->SendTo(theClient, PrivMsg, "USER: \002%12s \002 ACCESS: \002 %4d\002", + curUser->getUserName().c_str(), curUser->getAccess() ); + bot->SendTo(theClient, PrivMsg, "NeedOp: \002%s\002 Console: \002%s\002 Privmsg: \002%s\002" , + curUser->getFlag(uwUser::NONEEDOP) ? "NO" : "YES", + curUser->getFlag(uwUser::CONSOLE) ? "YES" : "NO", + curUser->getFlag(uwUser::PRIVMSG) ? "YES" : "NO"); + if (curUser->getFlag(uwUser::SUSPEND)) + { + bot->SendTo(theClient, PrivMsg, "\002User is suspended until %s (level %d)\002", + bot->convertToAscTime(curUser->getSuspendExpire() ), + curUser->getSuspendLevel() ); + } + iClient* curClient = bot->isAuthed(curUser); + if(curClient) + { + bot->SendTo(theClient, PrivMsg, "Currently logged in as: %s", + curClient->getRealNickUserHost().c_str()); + } + else + bot->SendTo(theClient, PrivMsg, "Currently not logged in."); + } + else + bot->listUsers(theClient, PrivMsg); + + bot->addLog(theClient, "ACCESS %s", st.assemble(1).c_str()); + + // no msgchanlog here! + + return true; } - - bot->SendTo(theClient, PrivMsg, "USER: \002%12s \002 ACCESS: \002 %4d\002", - curUser->getUserName().c_str(), curUser->getAccess() ); - bot->SendTo(theClient, PrivMsg, "NeedOp: \002%s\002 Console: \002%s\002 Privmsg: \002%s\002" , - curUser->getFlag(uwUser::NONEEDOP) ? "NO" : "YES", - curUser->getFlag(uwUser::CONSOLE) ? "YES" : "NO", - curUser->getFlag(uwUser::PRIVMSG) ? "YES" : "NO"); - if (curUser->getFlag(uwUser::SUSPEND)) - { - bot->SendTo(theClient, PrivMsg, "\002User is suspended until %s (level %d)\002", - bot->convertToAscTime(curUser->getSuspendExpire() ), - curUser->getSuspendLevel() ); - } - iClient* curClient = bot->isAuthed(curUser); - if(curClient) - { - bot->SendTo(theClient, PrivMsg, "Currently logged in as: %s", - curClient->getRealNickUserHost().c_str()); - } - else - bot->SendTo(theClient, PrivMsg, "Currently not logged in."); + } -else - bot->listUsers(theClient, PrivMsg); - -bot->addLog(theClient, "ACCESS %s", st.assemble(1).c_str()); - -// no msgchanlog here! - -return true; -} - -} - + } // namespace gnuworld Index: mod.uworld/ADDUSERCommand.cc diff -u mod.uworld/ADDUSERCommand.cc:1.4 mod.uworld/ADDUSERCommand.cc:1.5 --- mod.uworld/ADDUSERCommand.cc:1.4 Thu Jan 8 01:24:25 2004 +++ mod.uworld/ADDUSERCommand.cc Wed Jan 14 16:20:52 2009 @@ -17,88 +17,88 @@ #include "levels.h" #include "uworld.h" -const char ADDUSERCommand_cc_rcsId[] = "$Id: ADDUSERCommand.cc,v 1.4 2004/01/08 01:24:25 ultike Exp $"; +const char ADDUSERCommand_cc_rcsId[] = "$Id: ADDUSERCommand.cc,v 1.5 2009/01/14 16:20:52 ultike Exp $"; namespace gnuworld { - -using std::string ; -using std::endl ; -using std::stringstream ; -using std::ends ; - -namespace uwrld -{ - -bool ADDUSERCommand::Exec( iClient* theClient, const string& Message ) -{ - -// adduser <nick> <level> <pass> -StringTokenizer st( Message ) ; - -bool PrivMsg = bot->SendPrivmsg(theClient); - -unsigned short int operLevel = bot->getOperLevel(theClient); -if(operLevel < levels::adduser) - { - bot->SendTo(theClient, PrivMsg, "This command requires access level %d!", levels::adduser); - return false; - } - -if( st.size() < 4 ) - { - Usage(theClient); - return true; - } - -if(st[1].size() > 64) - { - bot->SendTo(theClient, PrivMsg, "User name can't be more than 64 chars"); - return false; - } - -uwUser* tmpUser = bot->getUser(bot->removeSqlChars(st[1])); -if( tmpUser ) - { - bot->SendTo(theClient, PrivMsg, "This user allready exists!!"); - return false; - } - -int level = atoi(st[2].c_str()); -if( level >= bot->getOperLevel(theClient)) - { - bot->SendTo(theClient, PrivMsg, "You can NOT add users with access higher or equal to your own!"); - return false; - } - -if( (level < 0) || (level > 1000) ) + + using std::string ; + using std::endl ; + using std::stringstream ; + using std::ends ; + + namespace uwrld { - bot->SendTo(theClient, PrivMsg, "An access level has to been between 0 and 1000"); - return false; - } - -string pass = bot->CryptPass(st[3]).c_str(); - - -uwUser* newUser = new (std::nothrow) uwUser(bot->SQLDb); -assert( newUser != 0 ) ; + + bool ADDUSERCommand::Exec( iClient* theClient, const string& Message ) + { + + // adduser <nick> <level> <pass> + StringTokenizer st( Message ) ; + + bool PrivMsg = bot->SendPrivmsg(theClient); + + unsigned short int operLevel = bot->getOperLevel(theClient); + if(operLevel < levels::adduser) + { + bot->SendTo(theClient, PrivMsg, "This command requires access level %d!", levels::adduser); + return false; + } + + if( st.size() < 4 ) + { + Usage(theClient); + return true; + } + + if(st[1].size() > 64) + { + bot->SendTo(theClient, PrivMsg, "User name can't be more than 64 chars"); + return false; + } + + uwUser* tmpUser = bot->getUser(bot->removeSqlChars(st[1])); + if( tmpUser ) + { + bot->SendTo(theClient, PrivMsg, "This user allready exists!!"); + return false; + } + + int level = atoi(st[2].c_str()); + if( level >= bot->getOperLevel(theClient)) + { + bot->SendTo(theClient, PrivMsg, "You can NOT add users with access higher or equal to your own!"); + return false; + } + + if( (level < 0) || (level > 1000) ) + { + bot->SendTo(theClient, PrivMsg, "An access level has to been between 0 and 1000"); + return false; + } + + string pass = bot->CryptPass(st[3]).c_str(); + + + uwUser* newUser = new (std::nothrow) uwUser(bot->SQLDb); + assert( newUser != 0 ) ; + + newUser->setUserName(bot->removeSqlChars(st[1])); + newUser->setAccess(level); + newUser->setPassword(pass); + newUser->Insert(); + bot->addUser(newUser); + + bot->SendTo(theClient, PrivMsg, "Added %s with level %d", bot->removeSqlChars(st[1]).c_str(), level); + + bot->addLog(theClient, "ADDUSER %s %s", st[1].c_str(), st[2].c_str()); + bot->MsgChanLog("%s ( %s ) added user %s with access %d", theClient->getNickName().c_str(), + theClient->getNickUserHost().c_str(), newUser->getUserName().c_str(), newUser->getAccess()); + + + return true; + } + + } // uwrld -newUser->setUserName(bot->removeSqlChars(st[1])); -newUser->setAccess(level); -newUser->setPassword(pass); -newUser->Insert(); -bot->addUser(newUser); - -bot->SendTo(theClient, PrivMsg, "Added %s with level %d", bot->removeSqlChars(st[1]).c_str(), level); - -bot->addLog(theClient, "ADDUSER %s %s", st[1].c_str(), st[2].c_str()); -bot->MsgChanLog("%s ( %s ) added user %s with access %d", theClient->getNickName().c_str(), - theClient->getNickUserHost().c_str(), newUser->getUserName().c_str(), newUser->getAccess()); - - -return true; -} - -} // uwrld - } // gnuworld Index: mod.uworld/AGLCommand.cc diff -u mod.uworld/AGLCommand.cc:1.5 mod.uworld/AGLCommand.cc:1.6 --- mod.uworld/AGLCommand.cc:1.5 Thu Jan 8 01:24:25 2004 +++ mod.uworld/AGLCommand.cc Wed Jan 14 16:20:52 2009 @@ -3,7 +3,7 @@ * * AUTO-GLINE handler * - * $Id: AGLCommand.cc,v 1.5 2004/01/08 01:24:25 ultike Exp $ + * $Id: AGLCommand.cc,v 1.6 2009/01/14 16:20:52 ultike Exp $ */ #include <string> @@ -18,174 +18,174 @@ namespace gnuworld { - -using std::string ; - -namespace uwrld -{ - -bool AGLCommand::Exec( iClient* theClient, const string& Message ) -{ - -StringTokenizer st( Message ) ; -bool PrivMsg = bot->SendPrivmsg(theClient); -short int operLevel = bot->getOperLevel(theClient); - -if( st.size() < 2 ) - { - // send help - Usage( theClient ) ; - return false ; - } - -string command = string_upper(st[1]); - -uwUser* theUser = bot->isAuthed(theClient); -if(!theUser) - return false; - -bot->addLog(theClient, "AGL %s", st.assemble(1).c_str()); -bot->MsgChanLog("%s ( %s ) - AGL %s", theUser->getUserName().c_str(), - theClient->getNickUserHost().c_str(), st.assemble(1).c_str()); - - - -if(command == "LIST") - { - if(operLevel < levels::agl::list) - { - bot->SendTo(theClient, PrivMsg, "This command requires access level %d!", levels::agl::list); - return false; - } - bot->listAGL(theClient, PrivMsg); - return true; - } - -if(command == "ADD") - { - if(operLevel < levels::agl::add) - { - bot->SendTo(theClient, PrivMsg, "This command requires access level %d!", levels::agl::add); - return false; - } - - if( st.size() < 4 ) - { - Usage( theClient ) ; - return false ; - } - - uwAGL* theAGL = bot->findAGL(st[2]); - if(theAGL) - { - bot->SendTo(theClient, PrivMsg, "This entry allready exists! Use AGL UPDATE <host>"); - return false; - } - - if(atoi(st[3].c_str()) < 1) - { - bot->SendTo(theClient, PrivMsg, "The minimum connections you have allow is 1"); - return false; - } - - string hostname; - iClient* targetClient = Network->findNick(st[2]); - if(targetClient) - hostname = targetClient->getRealInsecureHost(); - else + using std::string ; + + namespace uwrld + { + + bool AGLCommand::Exec( iClient* theClient, const string& Message ) { - string::size_type atPos = st[ 2 ].find_first_of( '@' ) ; - if( string::npos == atPos ) - hostname = st[2]; - else - hostname = st[2].substr( atPos + 1 ); + + StringTokenizer st( Message ) ; + bool PrivMsg = bot->SendPrivmsg(theClient); + short int operLevel = bot->getOperLevel(theClient); + + if( st.size() < 2 ) + { + // send help + Usage( theClient ) ; + return false ; + } + + string command = string_upper(st[1]); + + uwUser* theUser = bot->isAuthed(theClient); + if(!theUser) + return false; + + bot->addLog(theClient, "AGL %s", st.assemble(1).c_str()); + bot->MsgChanLog("%s ( %s ) - AGL %s", theUser->getUserName().c_str(), + theClient->getNickUserHost().c_str(), st.assemble(1).c_str()); + + + + if(command == "LIST") + { + if(operLevel < levels::agl::list) + { + bot->SendTo(theClient, PrivMsg, "This command requires access level %d!", levels::agl::list); + return false; + } + bot->listAGL(theClient, PrivMsg); + return true; + } + + if(command == "ADD") + { + if(operLevel < levels::agl::add) + { + bot->SendTo(theClient, PrivMsg, "This command requires access level %d!", levels::agl::add); + return false; + } + + if( st.size() < 4 ) + { + Usage( theClient ) ; + return false ; + } + + uwAGL* theAGL = bot->findAGL(st[2]); + if(theAGL) + { + bot->SendTo(theClient, PrivMsg, "This entry allready exists! Use AGL UPDATE <host>"); + return false; + } + + if(atoi(st[3].c_str()) < 1) + { + bot->SendTo(theClient, PrivMsg, "The minimum connections you have allow is 1"); + return false; + } + + string hostname; + + iClient* targetClient = Network->findNick(st[2]); + if(targetClient) + hostname = targetClient->getRealInsecureHost(); + else + { + string::size_type atPos = st[ 2 ].find_first_of( '@' ) ; + if( string::npos == atPos ) + hostname = st[2]; + else + hostname = st[2].substr( atPos + 1 ); + } + + theAGL = new (std::nothrow) uwAGL(bot->SQLDb); + assert( theAGL != 0 ) ; + + theAGL->setAGLHost(hostname); + theAGL->setNumberConn(atoi(st[3].c_str())); + theAGL->setAddedBy(theUser->getUserName()); + theAGL->setAddedOn(::time(0)); + theAGL->Insert(); + + bot->addAGL(theAGL); + + bot->SendTo(theClient, PrivMsg, "I added a new AGL-entry for %s allowing %d connections", + theAGL->getAGLHost().c_str(), theAGL->getNumberConn()); + return true; + } + + if(command == "UPDATE") + { + if(operLevel < levels::agl::update) + { + bot->SendTo(theClient, PrivMsg, "This command requires access level %d!", levels::agl::del); + return false; + } + if( st.size() < 4 ) + { + Usage( theClient ) ; + return false ; + } + + uwAGL* theAGL = bot->findAGL(st[2]); + if(!theAGL) + { + bot->SendTo(theClient, PrivMsg, "This entry does NOT exist!"); + return false; + } + + if(atoi(st[3].c_str()) < 1) + { + bot->SendTo(theClient, PrivMsg, "The minimum connections you have allow is 1"); + return false; + } + + theAGL->setNumberConn(atoi(st[3].c_str())); + theAGL->setAddedBy(theUser->getUserName()); + theAGL->setAddedOn(::time(0)); + theAGL->Update(); + bot->updateAGL(theAGL); + + bot->SendTo(theClient, PrivMsg, "I updated the AGL-entry for %s now allowing %d connections", + theAGL->getAGLHost().c_str(), theAGL->getNumberConn()); + return true; + } + if(command == "DEL") + { + if(operLevel < levels::agl::del) + { + bot->SendTo(theClient, PrivMsg, "This command requires access level %d!", levels::agl::del); + return false; + } + + if( st.size() < 3 ) + { + Usage( theClient ) ; + return false ; + } + + + uwAGL* theAGL = bot->findAGL(st[2]); + if(!theAGL) + { + bot->SendTo(theClient, PrivMsg, "This entry does NOT exist!"); + return false; + } + theAGL->Delete(); + bot->remAGL(theAGL); + bot->SendTo(theClient, PrivMsg, "I deleted the AGL-entry for %s", theAGL->getAGLHost().c_str()); + delete theAGL; + return true; + } + + Usage( theClient ); + return true; } - - theAGL = new (std::nothrow) uwAGL(bot->SQLDb); - assert( theAGL != 0 ) ; - - theAGL->setAGLHost(hostname); - theAGL->setNumberConn(atoi(st[3].c_str())); - theAGL->setAddedBy(theUser->getUserName()); - theAGL->setAddedOn(::time(0)); - theAGL->Insert(); - - bot->addAGL(theAGL); - - bot->SendTo(theClient, PrivMsg, "I added a new AGL-entry for %s allowing %d connections", - theAGL->getAGLHost().c_str(), theAGL->getNumberConn()); - return true; - } - -if(command == "UPDATE") - { - if(operLevel < levels::agl::update) - { - bot->SendTo(theClient, PrivMsg, "This command requires access level %d!", levels::agl::del); - return false; - } - if( st.size() < 4 ) - { - Usage( theClient ) ; - return false ; - } - - uwAGL* theAGL = bot->findAGL(st[2]); - if(!theAGL) - { - bot->SendTo(theClient, PrivMsg, "This entry does NOT exist!"); - return false; - } - - if(atoi(st[3].c_str()) < 1) - { - bot->SendTo(theClient, PrivMsg, "The minimum connections you have allow is 1"); - return false; - } - - theAGL->setNumberConn(atoi(st[3].c_str())); - theAGL->setAddedBy(theUser->getUserName()); - theAGL->setAddedOn(::time(0)); - theAGL->Update(); - bot->updateAGL(theAGL); - - bot->SendTo(theClient, PrivMsg, "I updated the AGL-entry for %s now allowing %d connections", - theAGL->getAGLHost().c_str(), theAGL->getNumberConn()); - return true; - } -if(command == "DEL") - { - if(operLevel < levels::agl::del) - { - bot->SendTo(theClient, PrivMsg, "This command requires access level %d!", levels::agl::del); - return false; - } - - if( st.size() < 3 ) - { - Usage( theClient ) ; - return false ; - } - - - uwAGL* theAGL = bot->findAGL(st[2]); - if(!theAGL) - { - bot->SendTo(theClient, PrivMsg, "This entry does NOT exist!"); - return false; - } - theAGL->Delete(); - bot->remAGL(theAGL); - bot->SendTo(theClient, PrivMsg, "I deleted the AGL-entry for %s", theAGL->getAGLHost().c_str()); - delete theAGL; - return true; - } - -Usage( theClient ); -return true; -} - -} + + } } Index: mod.uworld/BADCHANCommand.cc diff -u mod.uworld/BADCHANCommand.cc:1.4 mod.uworld/BADCHANCommand.cc:1.5 --- mod.uworld/BADCHANCommand.cc:1.4 Thu Jan 8 01:24:25 2004 +++ mod.uworld/BADCHANCommand.cc Wed Jan 14 16:20:52 2009 @@ -1,6 +1,6 @@ /* * BADCHANCommand.cc - * $Id: BADCHANCommand.cc,v 1.4 2004/01/08 01:24:25 ultike Exp $ + * $Id: BADCHANCommand.cc,v 1.5 2009/01/14 16:20:52 ultike Exp $ * */ @@ -14,121 +14,121 @@ namespace gnuworld { -using std::string ; - -namespace uwrld -{ - -bool BADCHANCommand::Exec( iClient* theClient, const string& Message ) -{ - -StringTokenizer st( Message ) ; -bool PrivMsg = bot->SendPrivmsg(theClient); - -if( st.size() < 3 ) - { - Usage(theClient); - return true; - } - -unsigned short int operLevel = bot->getOperLevel(theClient); -if(operLevel < levels::gline::channel) - { - bot->SendTo(theClient, PrivMsg, "This command requires access level %d!", levels::gline::channel); - return false; - } - -int gLength = 0; -string reason = "No reason added for some reason"; -int requiredLevel = levels::gline::channel; - -Channel* theChan = Network->findChannel(st[1]); -if(!theChan) - { - bot->SendTo(theClient, PrivMsg, "You need to badchan an existing channel!"); - return false; - } - -string length; -length.assign(st[2]); -int len = strlen(st[2].c_str()); -const char unit = st[2][len-1]; - -if(!isdigit(unit)) - length = length.substr( 0, length.length() - 1 ); - -if(!IsNumeric(length)) - { - reason = st.assemble(2); - requiredLevel = levels::gline::permchannel; - } -else - { - if( st.size() < 4 ) - { - Usage(theClient); - return true; - } + using std::string ; - reason = st.assemble(3); - if(unit == 'd') - gLength = (atoi(length.c_str()) * 3600 * 24); - else if(unit == 'h') - gLength = (atoi(length.c_str()) * 3600); - else if(unit == 'm') - { - gLength = (atoi(length.c_str()) * 60); - } - else - gLength = (atoi(length.c_str())); - } - -if(gLength > 3600 * 24 * 2) + namespace uwrld { - if( requiredLevel < levels::gline::longterm ) - requiredLevel = levels::gline::longterm; - } - -if(operLevel < requiredLevel) - { - bot->SendTo(theClient, PrivMsg, "This gline requires access level %d!", requiredLevel); - return false; - } - -uwGline* newGline = bot->findGline(theChan->getName()); -if(!newGline) -{ - newGline = new (std::nothrow) uwGline(bot->SQLDb); - assert (newGline != NULL); - - newGline->setAddedBy(theClient->getRealNickUserHost().c_str()); - newGline->setAddedOn(::time(0)); - newGline->setHost(theChan->getName()); - newGline->setAddedLevel(requiredLevel); - newGline->setReason(reason); - if(gLength != 0) - newGline->setExpires(::time(0) + gLength ); - else - newGline->setExpires(0); - newGline->Insert(); - - //need to load the id - newGline->loadData(newGline->getHost()); - bot->addGline(newGline); - bot->SendTo(theClient, PrivMsg, "Badchan for %s added.", newGline->getHost().c_str()); - - uwUser* theUser = bot->isAuthed(theClient); - if(!theUser) return false; - - bot->addLog(theClient, "BADCHAN %s", st.assemble(1).c_str()); - bot->MsgChanLog("%s ( %s ) badchanned %s untill %s", theUser->getUserName().c_str(), theClient->getNickUserHost().c_str(), - newGline->getHost().c_str(), (newGline->getExpires() == 0) ? "PERMANENT" : bot->convertToAscTime(newGline->getExpires()) ); - - server->setGline(server->getName(), newGline->getHost(), reason, (gLength == 0) ? (3600*24*500) : gLength); - -} -return true; -} //badchancmd - -} // namespace uwrld + + bool BADCHANCommand::Exec( iClient* theClient, const string& Message ) + { + + StringTokenizer st( Message ) ; + bool PrivMsg = bot->SendPrivmsg(theClient); + + if( st.size() < 3 ) + { + Usage(theClient); + return true; + } + + unsigned short int operLevel = bot->getOperLevel(theClient); + if(operLevel < levels::gline::channel) + { + bot->SendTo(theClient, PrivMsg, "This command requires access level %d!", levels::gline::channel); + return false; + } + + int gLength = 0; + string reason = "No reason added for some reason"; + int requiredLevel = levels::gline::channel; + + Channel* theChan = Network->findChannel(st[1]); + if(!theChan) + { + bot->SendTo(theClient, PrivMsg, "You need to badchan an existing channel!"); + return false; + } + + string length; + length.assign(st[2]); + int len = strlen(st[2].c_str()); + const char unit = st[2][len-1]; + + if(!isdigit(unit)) + length = length.substr( 0, length.length() - 1 ); + + if(!IsNumeric(length)) + { + reason = st.assemble(2); + requiredLevel = levels::gline::permchannel; + } + else + { + if( st.size() < 4 ) + { + Usage(theClient); + return true; + } + + reason = st.assemble(3); + if(unit == 'd') + gLength = (atoi(length.c_str()) * 3600 * 24); + else if(unit == 'h') + gLength = (atoi(length.c_str()) * 3600); + else if(unit == 'm') + { + gLength = (atoi(length.c_str()) * 60); + } + else + gLength = (atoi(length.c_str())); + } + + if(gLength > 3600 * 24 * 2) + { + if( requiredLevel < levels::gline::longterm ) + requiredLevel = levels::gline::longterm; + } + + if(operLevel < requiredLevel) + { + bot->SendTo(theClient, PrivMsg, "This gline requires access level %d!", requiredLevel); + return false; + } + + uwGline* newGline = bot->findGline(theChan->getName()); + if(!newGline) + { + newGline = new (std::nothrow) uwGline(bot->SQLDb); + assert (newGline != NULL); + + newGline->setAddedBy(theClient->getRealNickUserHost().c_str()); + newGline->setAddedOn(::time(0)); + newGline->setHost(theChan->getName()); + newGline->setAddedLevel(requiredLevel); + newGline->setReason(reason); + if(gLength != 0) + newGline->setExpires(::time(0) + gLength ); + else + newGline->setExpires(0); + newGline->Insert(); + + //need to load the id + newGline->loadData(newGline->getHost()); + bot->addGline(newGline); + bot->SendTo(theClient, PrivMsg, "Badchan for %s added.", newGline->getHost().c_str()); + + uwUser* theUser = bot->isAuthed(theClient); + if(!theUser) return false; + + bot->addLog(theClient, "BADCHAN %s", st.assemble(1).c_str()); + bot->MsgChanLog("%s ( %s ) badchanned %s untill %s", theUser->getUserName().c_str(), theClient->getNickUserHost().c_str(), + newGline->getHost().c_str(), (newGline->getExpires() == 0) ? "PERMANENT" : bot->convertToAscTime(newGline->getExpires()) ); + + server->setGline(server->getName(), newGline->getHost(), reason, (gLength == 0) ? (3600*24*500) : gLength); + + } + return true; + } //badchancmd + + } // namespace uwrld } // namespace gnuworld. Index: mod.uworld/CHANINFOCommand.cc diff -u mod.uworld/CHANINFOCommand.cc:1.4 mod.uworld/CHANINFOCommand.cc:1.5 --- mod.uworld/CHANINFOCommand.cc:1.4 Thu Jan 8 01:24:25 2004 +++ mod.uworld/CHANINFOCommand.cc Wed Jan 14 16:20:52 2009 @@ -3,7 +3,7 @@ * * Shows information about a channel * - * $Id: CHANINFOCommand.cc,v 1.4 2004/01/08 01:24:25 ultike Exp $ + * $Id: CHANINFOCommand.cc,v 1.5 2009/01/14 16:20:52 ultike Exp $ * */ #include <string> @@ -18,53 +18,53 @@ namespace gnuworld { - -using std::string ; - -namespace uwrld -{ - -bool CHANINFOCommand::Exec( iClient* theClient, const string& Message ) -{ -StringTokenizer st( Message ); -bool PrivMsg = bot->SendPrivmsg(theClient); - -if( st.size() < 2 ) - { - Usage(theClient); - return true; - } - -short int operLevel = bot->getOperLevel(theClient); -if(operLevel < levels::chaninfo) - { - bot->SendTo(theClient, PrivMsg, "This command requires access level %d!", levels::opchan); - return false; - } - -Channel* theChan = Network->findChannel(st[1]); -if(!theChan) + + using std::string ; + + namespace uwrld { - bot->SendTo(theClient, PrivMsg, "Unable to find channel %s", st[1].c_str()); - return true; - } - -bot->SendTo(theClient, PrivMsg, "Channel %s is mode %s", st[1].c_str(), theChan->getModeString().c_str()); -bot->SendTo(theClient, PrivMsg, "Created at time: %s", bot->convertToAscTime(theChan->getCreationTime())); -bot->SendTo(theClient, PrivMsg, "Number of channel users: %d", theChan->size()); - + + bool CHANINFOCommand::Exec( iClient* theClient, const string& Message ) + { + StringTokenizer st( Message ); + bool PrivMsg = bot->SendPrivmsg(theClient); + + if( st.size() < 2 ) + { + Usage(theClient); + return true; + } + + short int operLevel = bot->getOperLevel(theClient); + if(operLevel < levels::chaninfo) + { + bot->SendTo(theClient, PrivMsg, "This command requires access level %d!", levels::opchan); + return false; + } + + Channel* theChan = Network->findChannel(st[1]); + if(!theChan) + { + bot->SendTo(theClient, PrivMsg, "Unable to find channel %s", st[1].c_str()); + return true; + } + + bot->SendTo(theClient, PrivMsg, "Channel %s is mode %s", st[1].c_str(), theChan->getModeString().c_str()); + bot->SendTo(theClient, PrivMsg, "Created at time: %s", bot->convertToAscTime(theChan->getCreationTime())); + bot->SendTo(theClient, PrivMsg, "Number of channel users: %d", theChan->size()); + #ifdef TOPIC_TRACK - bot->SendTo(theClient, PrivMsg, "Topic: %s", theChan->getTopic().c_str()); + bot->SendTo(theClient, PrivMsg, "Topic: %s", theChan->getTopic().c_str()); #endif - -uwUser* theUser = bot->isAuthed(theClient); -bot->addLog(theClient, "CHANINFO %s", st[1].c_str()); -bot->MsgChanLog("%s ( %s ) - CHANINFO %s", theUser ? theUser->getUserName().c_str() : "notLoggedIn", - theClient->getNickUserHost().c_str(), st[1].c_str()); - - -return true ; -} - -} + + uwUser* theUser = bot->isAuthed(theClient); + bot->addLog(theClient, "CHANINFO %s", st[1].c_str()); + bot->MsgChanLog("%s ( %s ) - CHANINFO %s", theUser ? theUser->getUserName().c_str() : "notLoggedIn", + theClient->getNickUserHost().c_str(), st[1].c_str()); + + + return true ; + } + + } } // namespace gnuworld Index: mod.uworld/CHECKNETCommand.cc diff -u mod.uworld/CHECKNETCommand.cc:1.4 mod.uworld/CHECKNETCommand.cc:1.5 --- mod.uworld/CHECKNETCommand.cc:1.4 Thu Jan 8 01:24:25 2004 +++ mod.uworld/CHECKNETCommand.cc Wed Jan 14 16:20:52 2009 @@ -1,6 +1,6 @@ /* * CHECKNETCommand.cc - * $Id: CHECKNETCommand.cc,v 1.4 2004/01/08 01:24:25 ultike Exp $ + * $Id: CHECKNETCommand.cc,v 1.5 2009/01/14 16:20:52 ultike Exp $ * */ @@ -12,40 +12,40 @@ namespace gnuworld { -using std::string ; - -namespace uwrld -{ - -bool CHECKNETCommand::Exec( iClient* theClient, const string& Message ) -{ - -StringTokenizer st( Message ) ; -bool PrivMsg = bot->SendPrivmsg(theClient); - -if( st.size() < 1 ) + using std::string ; + + namespace uwrld { - Usage(theClient); - return true; - } - -unsigned short int operLevel = bot->getOperLevel(theClient); -if(operLevel < levels::checknet) - { - bot->SendTo(theClient, PrivMsg, "This command requires access level %d!", levels::checknet); - return false; - } - -bot->SendTo(theClient, PrivMsg, "Listing missing servers..."); -bot->listMissingServers(theClient, PrivMsg); - -uwUser* theUser = bot->isAuthed(theClient); -if(!theUser) return false; -bot->addLog(theClient, "CHECKNET"); -bot->MsgChanLog("%s ( %s ) - CHECKNET", theUser->getUserName().c_str(), theClient->getNickUserHost().c_str() ); - -return true; -} - -} // namespace uwrld + + bool CHECKNETCommand::Exec( iClient* theClient, const string& Message ) + { + + StringTokenizer st( Message ) ; + bool PrivMsg = bot->SendPrivmsg(theClient); + + if( st.size() < 1 ) + { + Usage(theClient); + return true; + } + + unsigned short int operLevel = bot->getOperLevel(theClient); + if(operLevel < levels::checknet) + { + bot->SendTo(theClient, PrivMsg, "This command requires access level %d!", levels::checknet); + return false; + } + + bot->SendTo(theClient, PrivMsg, "Listing missing servers..."); + bot->listMissingServers(theClient, PrivMsg); + + uwUser* theUser = bot->isAuthed(theClient); + if(!theUser) return false; + bot->addLog(theClient, "CHECKNET"); + bot->MsgChanLog("%s ( %s ) - CHECKNET", theUser->getUserName().c_str(), theClient->getNickUserHost().c_str() ); + + return true; + } + + } // namespace uwrld } // namespace gnuworld. Index: mod.uworld/CLEARCHANCommand.cc diff -u mod.uworld/CLEARCHANCommand.cc:1.5 mod.uworld/CLEARCHANCommand.cc:1.6 --- mod.uworld/CLEARCHANCommand.cc:1.5 Tue Apr 5 22:44:22 2005 +++ mod.uworld/CLEARCHANCommand.cc Wed Jan 14 16:20:52 2009 @@ -14,231 +14,231 @@ #include "StringTokenizer.h" #include "levels.h" -const char CLEARCHANCommand_cc_rcsId[] = "$Id: CLEARCHANCommand.cc,v 1.5 2005/04/05 22:44:22 ultike Exp $"; +const char CLEARCHANCommand_cc_rcsId[] = "$Id: CLEARCHANCommand.cc,v 1.6 2009/01/14 16:20:52 ultike Exp $"; namespace gnuworld { - -using std::string ; -using std::vector ; -using gnuworld::iClient; - -namespace uwrld -{ - -bool CLEARCHANCommand::Exec( iClient* theClient, const string& Message ) -{ -StringTokenizer st( Message ) ; -bool Desynch = false; -bool PrivMsg = bot->SendPrivmsg(theClient); - -short int operLevel = bot->getOperLevel(theClient); -if(operLevel < levels::clearchan) - { - bot->SendTo(theClient, PrivMsg, "This command requires access level %d!", levels::clearchan); - return false; - } - -if( st.size() < 2 ) + + using std::string ; + using std::vector ; + using gnuworld::iClient; + + namespace uwrld { - Usage( theClient ) ; - return true ; - } - - -Channel* theChan = Network->findChannel( st[ 1 ] ) ; -if( NULL == theChan ) - { - bot->Notice( theClient, "Unable to find channel %s", - st[ 1 ].c_str() ) ; - return true ; - } - -string doModes; //This holds the modes the user asked to be removed -string remModes = ""; //Holds the modes that we are removing -string args = ""; //Holds the arguments for the remModes - -uwUser* theUser = bot->isAuthed(theClient); -if(!theUser) return false; -bot->addLog(theClient, "CLEARCHAN %s", theChan->getName().c_str()); -bot->MsgChanLog("%s ( %s ) - CLEARCHAN %s", theUser->getUserName().c_str(), - theClient->getNickUserHost().c_str(), st.assemble(1).c_str()); - -//Check if the user specified the modes, if not assume he ment all of the modes -if(st.size() == 2) - doModes = "OBKLIM"; -else if(!strcasecmp(string_upper(st[ 2 ]).c_str(),"ALL")) - doModes = "OBKLINMSPT"; -else if(!strcasecmp(string_upper(st [ 2]).c_str(),"-D")) - Desynch = true; -else - doModes = string_upper(st [ 2 ]); - -if(Desynch) - { - vector<iClient*> KickVec; - bot->Join(theChan->getName(),"+i",0,true); - //bot->Mode(theChan,Channel::MODE_I); - for( Channel::const_userIterator ptr = theChan->userList_begin(); - ptr != theChan->userList_end() ; ++ptr ) + + bool CLEARCHANCommand::Exec( iClient* theClient, const string& Message ) + { + StringTokenizer st( Message ) ; + bool Desynch = false; + bool PrivMsg = bot->SendPrivmsg(theClient); + + short int operLevel = bot->getOperLevel(theClient); + if(operLevel < levels::clearchan) { + bot->SendTo(theClient, PrivMsg, "This command requires access level %d!", levels::clearchan); + return false; + } - if ( !ptr->second->getClient()->getMode(iClient::MODE_SERVICES) ) - { - KickVec.push_back(ptr->second->getClient()); - } - else - { - /* - its a +k user, need to make sure its not us - */ - if(strcmp(ptr->second->getClient()->getCharYYXXX().c_str(), - bot->getCharYYXXX().c_str())) - { - bot->Message(ptr->second->getClient(),"OPERPART %s" - ,theChan->getName().c_str()); - } - } + if( st.size() < 2 ) + { + Usage( theClient ) ; + return true ; } - if(KickVec.size() > 0) - { - string reason = "Desynch clearing"; - bot->Kick(theChan,KickVec,reason); - } - bot->Part(theChan->getName()); - return true; - } - - -bot->ClearMode( theChan, doModes, true ) ; -return true ; - -/* -for( string::size_type modePos = 0 ; modePos < doModes.size() ; ++modePos ) - { - switch( doModes[ modePos ] ) - { - case 'B': //Ban? + + + Channel* theChan = Network->findChannel( st[ 1 ] ) ; + if( NULL == theChan ) { - string ban; - string modes = "-"; - string args = ""; - Channel::banListSizeType end = theChan->banList_size(); - Channel::banIterator ptr = theChan->banList_begin() ; - for(Channel::banListSizeType i=0; i != end ;i++) - { - ban = *ptr; - ptr++; - args += ban + ' '; - modes+= "b"; - theChan->removeBan(ban); - if(modes.size() > 5) //if we got more than 5 , set the mode and continue - { - bot->ModeAsServer( theChan, modes + ' ' + args ) ; - modes = "-"; - args = ""; - } - } - if(!args.empty()) - bot->ModeAsServer( theChan, modes + ' ' + args ) ; - break; + bot->Notice( theClient, "Unable to find channel %s", + st[ 1 ].c_str() ) ; + return true ; } - case 'O': //Chanops? + + string doModes; //This holds the modes the user asked to be removed + string remModes = ""; //Holds the modes that we are removing + string args = ""; //Holds the arguments for the remModes + + uwUser* theUser = bot->isAuthed(theClient); + if(!theUser) return false; + bot->addLog(theClient, "CLEARCHAN %s", theChan->getName().c_str()); + bot->MsgChanLog("%s ( %s ) - CLEARCHAN %s", theUser->getUserName().c_str(), + theClient->getNickUserHost().c_str(), st.assemble(1).c_str()); + + //Check if the user specified the modes, if not assume he ment all of the modes + if(st.size() == 2) + doModes = "OBKLIM"; + else if(!strcasecmp(string_upper(st[ 2 ]).c_str(),"ALL")) + doModes = "OBKLINMSPT"; + else if(!strcasecmp(string_upper(st [ 2]).c_str(),"-D")) + Desynch = true; + else + doModes = string_upper(st [ 2 ]); + + if(Desynch) { - string modes = "-"; - string args = ""; - for( Channel::const_userIterator ptr = theChan->userList_begin(); - ptr != theChan->userList_end() ; ++ptr ) + vector<iClient*> KickVec; + bot->Join(theChan->getName(),"+i",0,true); + //bot->Mode(theChan,Channel::MODE_I); + for( Channel::const_userIterator ptr = theChan->userList_begin(); + ptr != theChan->userList_end() ; ++ptr ) { - if( ptr->second->getMode(ChannelUser::MODE_O)) - { - // Don't deop +k things + if ( !ptr->second->getClient()->getMode(iClient::MODE_SERVICES) ) - { - modes+= 'o'; - args+= ptr->second->getCharYYXXX() + " "; - ptr->second->removeMode(ChannelUser::MODE_O); - } - } // If opped. - if(modes.size() > 5) //if we got more than 5 , set the mode and continue { - bot->ModeAsServer( theChan, modes + ' ' + args ) ; - modes = "-"; - args = ""; + KickVec.push_back(ptr->second->getClient()); + } + else + { + /* + its a +k user, need to make sure its not us + */ + if(strcmp(ptr->second->getClient()->getCharYYXXX().c_str(), + bot->getCharYYXXX().c_str())) + { + bot->Message(ptr->second->getClient(),"OPERPART %s" + ,theChan->getName().c_str()); + } } } - if(!args.empty()) - bot->ModeAsServer(theChan,modes + " " + args); - } - break; - case 'K': //Key? - if(theChan->getMode(Channel::MODE_K)) - { - theChan->removeMode(Channel::MODE_K); - remModes+= "k"; - args+= theChan->getKey() + " "; - theChan->setKey(""); - } - break; - case 'I': //Invite? - if(theChan->getMode(Channel::MODE_I)) - { - theChan->removeMode(Channel::MODE_I); - remModes+= "i"; - } - break; - case 'L': //Limit? - if(theChan->getMode(Channel::MODE_L)) - { - theChan->removeMode(Channel::MODE_L); - remModes+= "l"; - //args+= theChan->getLimit() + " "; - } - break; - case 'P': //Private? - if(theChan->getMode(Channel::MODE_P)) - { - theChan->removeMode(Channel::MODE_P); - remModes+= "p"; - } - break; - case 'S': //Secret? - if(theChan->getMode(Channel::MODE_S)) - { - theChan->removeMode(Channel::MODE_S); - remModes+= "s"; - } - break; - case 'M': //Moderated? - if(theChan->getMode(Channel::MODE_M)) - { - theChan->removeMode(Channel::MODE_M); - remModes+= "m"; - } - break; - case 'N': //No External Messages? - if(theChan->getMode(Channel::MODE_N)) - { - theChan->removeMode(Channel::MODE_N); - remModes+= "n"; - } - break; - case 'T': //Topic? - if(theChan->getMode(Channel::MODE_T)) + if(KickVec.size() > 0) { - theChan->removeMode(Channel::MODE_T); - remModes+= "t"; + string reason = "Desynch clearing"; + bot->Kick(theChan,KickVec,reason); } - break; - default:; - } } -if(!remModes.empty()) - bot->ModeAsServer(theChan,"-" + remModes + " " + args); - - -return true; -*/ -} - -} + bot->Part(theChan->getName()); + return true; + } + + + bot->ClearMode( theChan, doModes, true ) ; + return true ; + + /* + for( string::size_type modePos = 0 ; modePos < doModes.size() ; ++modePos ) + { + switch( doModes[ modePos ] ) + { + case 'B': //Ban? + { + string ban; + string modes = "-"; + string args = ""; + Channel::banListSizeType end = theChan->banList_size(); + Channel::banIterator ptr = theChan->banList_begin() ; + for(Channel::banListSizeType i=0; i != end ;i++) + { + ban = *ptr; + ptr++; + args += ban + ' '; + modes+= "b"; + theChan->removeBan(ban); + if(modes.size() > 5) //if we got more than 5 , set the mode and continue + { + bot->ModeAsServer( theChan, modes + ' ' + args ) ; + modes = "-"; + args = ""; + } + } + if(!args.empty()) + bot->ModeAsServer( theChan, modes + ' ' + args ) ; + break; + } + case 'O': //Chanops? + { + string modes = "-"; + string args = ""; + for( Channel::const_userIterator ptr = theChan->userList_begin(); + ptr != theChan->userList_end() ; ++ptr ) + { + if( ptr->second->getMode(ChannelUser::MODE_O)) + { + // Don't deop +k things + if ( !ptr->second->getClient()->getMode(iClient::MODE_SERVICES) ) + { + modes+= 'o'; + args+= ptr->second->getCharYYXXX() + " "; + ptr->second->removeMode(ChannelUser::MODE_O); + } + } // If opped. + if(modes.size() > 5) //if we got more than 5 , set the mode and continue + { + bot->ModeAsServer( theChan, modes + ' ' + args ) ; + modes = "-"; + args = ""; + } + } + if(!args.empty()) + bot->ModeAsServer(theChan,modes + " " + args); + } + break; + case 'K': //Key? + if(theChan->getMode(Channel::MODE_K)) + { + theChan->removeMode(Channel::MODE_K); + remModes+= "k"; + args+= theChan->getKey() + " "; + theChan->setKey(""); + } + break; + case 'I': //Invite? + if(theChan->getMode(Channel::MODE_I)) + { + theChan->removeMode(Channel::MODE_I); + remModes+= "i"; + } + break; + case 'L': //Limit? + if(theChan->getMode(Channel::MODE_L)) + { + theChan->removeMode(Channel::MODE_L); + remModes+= "l"; + //args+= theChan->getLimit() + " "; + } + break; + case 'P': //Private? + if(theChan->getMode(Channel::MODE_P)) + { + theChan->removeMode(Channel::MODE_P); + remModes+= "p"; + } + break; + case 'S': //Secret? + if(theChan->getMode(Channel::MODE_S)) + { + theChan->removeMode(Channel::MODE_S); + remModes+= "s"; + } + break; + case 'M': //Moderated? + if(theChan->getMode(Channel::MODE_M)) + { + theChan->removeMode(Channel::MODE_M); + remModes+= "m"; + } + break; + case 'N': //No External Messages? + if(theChan->getMode(Channel::MODE_N)) + { + theChan->removeMode(Channel::MODE_N); + remModes+= "n"; + } + break; + case 'T': //Topic? + if(theChan->getMode(Channel::MODE_T)) + { + theChan->removeMode(Channel::MODE_T); + remModes+= "t"; + } + break; + default:; + } } + if(!remModes.empty()) + bot->ModeAsServer(theChan,"-" + remModes + " " + args); + + + return true; + */ + } + + } } Index: mod.uworld/DEAUTHCommand.cc diff -u mod.uworld/DEAUTHCommand.cc:1.4 mod.uworld/DEAUTHCommand.cc:1.5 --- mod.uworld/DEAUTHCommand.cc:1.4 Thu Jan 8 01:24:25 2004 +++ mod.uworld/DEAUTHCommand.cc Wed Jan 14 16:20:52 2009 @@ -10,38 +10,38 @@ namespace gnuworld { -using std::string ; - -namespace uwrld -{ - -bool DEAUTHCommand::Exec( iClient* theClient, const string& Message ) -{ - -StringTokenizer st( Message ) ; -bool PrivMsg = bot->SendPrivmsg(theClient); - -if( st.size() < 1 ) + using std::string ; + + namespace uwrld { - Usage(theClient); - return true; - } - -uwUser* theUser = bot->isAuthed(theClient); -if(!theUser) - { - bot->SendTo(theClient, PrivMsg, "You have to be logged in before you can DEAUTH"); - return false; - } - -bot->addLog(theClient, "DEAUTH"); -bot->MsgChanLog("%s ( %s ) - DEAUTH %s", theUser->getUserName().c_str(), - theClient->getNickUserHost().c_str(), st.assemble(1).c_str()); - -bot->deAuthUser(theClient); -bot->SendTo(theClient, PrivMsg, "You have successfully been deauthed! Cya!"); -return true; -} - -} // namespace uwrld + + bool DEAUTHCommand::Exec( iClient* theClient, const string& Message ) + { + + StringTokenizer st( Message ) ; + bool PrivMsg = bot->SendPrivmsg(theClient); + + if( st.size() < 1 ) + { + Usage(theClient); + return true; + } + + uwUser* theUser = bot->isAuthed(theClient); + if(!theUser) + { + bot->SendTo(theClient, PrivMsg, "You have to be logged in before you can DEAUTH"); + return false; + } + + bot->addLog(theClient, "DEAUTH"); + bot->MsgChanLog("%s ( %s ) - DEAUTH %s", theUser->getUserName().c_str(), + theClient->getNickUserHost().c_str(), st.assemble(1).c_str()); + + bot->deAuthUser(theClient); + bot->SendTo(theClient, PrivMsg, "You have successfully been deauthed! Cya!"); + return true; + } + + } // namespace uwrld } // namespace gnuworld. Index: mod.uworld/DELSERVERCommand.cc diff -u mod.uworld/DELSERVERCommand.cc:1.4 mod.uworld/DELSERVERCommand.cc:1.5 --- mod.uworld/DELSERVERCommand.cc:1.4 Thu Jan 8 01:24:25 2004 +++ mod.uworld/DELSERVERCommand.cc Wed Jan 14 16:20:52 2009 @@ -1,6 +1,6 @@ /* * DELSERVERCommand.cc - * $Id: DELSERVERCommand.cc,v 1.4 2004/01/08 01:24:25 ultike Exp $ + * $Id: DELSERVERCommand.cc,v 1.5 2009/01/14 16:20:52 ultike Exp $ * */ @@ -13,56 +13,56 @@ namespace gnuworld { -using std::string ; - -namespace uwrld -{ - -bool DELSERVERCommand::Exec( iClient* theClient, const string& Message ) -{ - -StringTokenizer st( Message ) ; -bool PrivMsg = bot->SendPrivmsg(theClient); - -if( st.size() < 2 ) - { - Usage(theClient); - return true; - } - -unsigned short int operLevel = bot->getOperLevel(theClient); -if(operLevel < levels::delserver) - { - bot->SendTo(theClient, PrivMsg, "This command requires access level %d!", levels::delserver); - return false; - } - -uwServer* remServer = bot->findServer(st[1]); -if(!remServer) - { - bot->SendTo(theClient, PrivMsg, "No such server"); - return false; - } - -iServer* netServer = Network->findServerName(st[1]); -if(netServer) + using std::string ; + + namespace uwrld { - bot->SendTo(theClient, PrivMsg, "Would you delink this server first please!"); - return false; - } - -bot->remServer(remServer); -bot->SendTo(theClient, PrivMsg, "Removed %s from my memory!", st[1].c_str()); - -uwUser* theUser = bot->isAuthed(theClient); -if(!theUser) return false; -bot->addLog(theClient, "DELSERVER %s", st[1].c_str()); -bot->MsgChanLog("%s ( %s ) - DELSERVER %s", theUser->getUserName().c_str(), - theClient->getNickUserHost().c_str(), st[1].c_str()); - - -return true; -} - -} // namespace uwrld + + bool DELSERVERCommand::Exec( iClient* theClient, const string& Message ) + { + + StringTokenizer st( Message ) ; + bool PrivMsg = bot->SendPrivmsg(theClient); + + if( st.size() < 2 ) + { + Usage(theClient); + return true; + } + + unsigned short int operLevel = bot->getOperLevel(theClient); + if(operLevel < levels::delserver) + { + bot->SendTo(theClient, PrivMsg, "This command requires access level %d!", levels::delserver); + return false; + } + + uwServer* remServer = bot->findServer(st[1]); + if(!remServer) + { + bot->SendTo(theClient, PrivMsg, "No such server"); + return false; + } + + iServer* netServer = Network->findServerName(st[1]); + if(netServer) + { + bot->SendTo(theClient, PrivMsg, "Would you delink this server first please!"); + return false; + } + + bot->remServer(remServer); + bot->SendTo(theClient, PrivMsg, "Removed %s from my memory!", st[1].c_str()); + + uwUser* theUser = bot->isAuthed(theClient); + if(!theUser) return false; + bot->addLog(theClient, "DELSERVER %s", st[1].c_str()); + bot->MsgChanLog("%s ( %s ) - DELSERVER %s", theUser->getUserName().c_str(), + theClient->getNickUserHost().c_str(), st[1].c_str()); + + + return true; + } + + } // namespace uwrld } // namespace gnuworld. Index: mod.uworld/FDEAUTHCommand.cc diff -u mod.uworld/FDEAUTHCommand.cc:1.4 mod.uworld/FDEAUTHCommand.cc:1.5 --- mod.uworld/FDEAUTHCommand.cc:1.4 Thu Jan 8 01:24:25 2004 +++ mod.uworld/FDEAUTHCommand.cc Wed Jan 14 16:20:52 2009 @@ -11,60 +11,60 @@ namespace gnuworld { -using std::string ; - -namespace uwrld -{ - -bool FDEAUTHCommand::Exec( iClient* theClient, const string& Message ) -{ - -StringTokenizer st( Message ) ; -bool PrivMsg = bot->SendPrivmsg(theClient); - -if( st.size() < 2 ) + using std::string ; + + namespace uwrld { - Usage(theClient); - return true; - } - -short int operLevel = bot->getOperLevel(theClient); -if(operLevel < levels::fdeauth) - { - bot->SendTo(theClient, PrivMsg, "This command requires access level %d!", levels::fdeauth); - return false; - } - -iClient* targetClient = Network->findNick(st[1]); -if(!targetClient) - { - bot->SendTo(theClient, PrivMsg, "Can't find nick %s", st[1].c_str()); - return false; - } - -short int targetLevel = bot->getOperLevel(targetClient); -if(operLevel < targetLevel) - { - bot->SendTo(theClient, PrivMsg, "You can not deauthenticate users with access higher than your own!"); - return false; - } - -const uwUser* authUser = bot->isAuthed(targetClient); -if(!authUser) - { - bot->SendTo(theClient, PrivMsg, "User %s is not authed", st[1].c_str()); - return false; - } - -uwUser* theUser = bot->isAuthed(theClient); -if(!theUser) return false; -bot->addLog(theClient, "FDEAUTH %s", st[1].c_str()); -bot->MsgChanLog("%s ( %s ) - FDEAUTH %s", theUser->getUserName().c_str(), - theClient->getNickUserHost().c_str(), st.assemble(1).c_str()); - -bot->deAuthUser(targetClient); -return true; -} - -} // namespace uwrld + + bool FDEAUTHCommand::Exec( iClient* theClient, const string& Message ) + { + + StringTokenizer st( Message ) ; + bool PrivMsg = bot->SendPrivmsg(theClient); + + if( st.size() < 2 ) + { + Usage(theClient); + return true; + } + + short int operLevel = bot->getOperLevel(theClient); + if(operLevel < levels::fdeauth) + { + bot->SendTo(theClient, PrivMsg, "This command requires access level %d!", levels::fdeauth); + return false; + } + + iClient* targetClient = Network->findNick(st[1]); + if(!targetClient) + { + bot->SendTo(theClient, PrivMsg, "Can't find nick %s", st[1].c_str()); + return false; + } + + short int targetLevel = bot->getOperLevel(targetClient); + if(operLevel < targetLevel) + { + bot->SendTo(theClient, PrivMsg, "You can not deauthenticate users with access higher than your own!"); + return false; + } + + const uwUser* authUser = bot->isAuthed(targetClient); + if(!authUser) + { + bot->SendTo(theClient, PrivMsg, "User %s is not authed", st[1].c_str()); + return false; + } + + uwUser* theUser = bot->isAuthed(theClient); + if(!theUser) return false; + bot->addLog(theClient, "FDEAUTH %s", st[1].c_str()); + bot->MsgChanLog("%s ( %s ) - FDEAUTH %s", theUser->getUserName().c_str(), + theClient->getNickUserHost().c_str(), st.assemble(1).c_str()); + + bot->deAuthUser(targetClient); + return true; + } + + } // namespace uwrld } // namespace gnuworld. Index: mod.uworld/GLINECommand.cc diff -u mod.uworld/GLINECommand.cc:1.4 mod.uworld/GLINECommand.cc:1.5 --- mod.uworld/GLINECommand.cc:1.4 Thu Jan 8 01:24:25 2004 +++ mod.uworld/GLINECommand.cc Wed Jan 14 16:20:52 2009 @@ -1,6 +1,6 @@ /* * GLINECommand.cc - * $Id: GLINECommand.cc,v 1.4 2004/01/08 01:24:25 ultike Exp $ + * $Id: GLINECommand.cc,v 1.5 2009/01/14 16:20:52 ultike Exp $ * */ @@ -14,291 +14,291 @@ namespace gnuworld { -using std::string ; - -namespace uwrld -{ - -bool GLINECommand::Exec( iClient* theClient, const string& Message ) -{ - -StringTokenizer st( Message ) ; -bool PrivMsg = bot->SendPrivmsg(theClient); - -if( st.size() < 3 ) - { - Usage(theClient); - return true; - } - -unsigned short int operLevel = bot->getOperLevel(theClient); -if(operLevel < levels::gline::standard) - { - bot->SendTo(theClient, PrivMsg, "This command requires access level %d!", levels::gline::standard); - return false; - } - -StringTokenizer::size_type pos = 1 ; -string username; -string hostname; -int gLength = 3600; -string reason = "No reason added for some reason"; -bool nickname = false; -bool channel = false; - -if(st[1][0] == '#') - channel = true; - -if(!channel) -{ - -string::size_type atPos = st[ pos ].find_first_of( '@' ) ; -if( string::npos == atPos ) - { - // specified nickname - iClient* targetClient = Network->findNick(st[1]); - if (targetClient) - { - nickname = true; - hostname = targetClient->getRealInsecureHost(); - username = targetClient->getUserName(); - } - } -else - { - username = st[ pos ].substr( 0, atPos ) ; - hostname = st[ pos ].substr( atPos + 1 ) ; - } - -int requiredLevel = levels::gline::standard; - -if(!nickname) -{ - int parseRes = bot->parseHost(hostname); - switch (parseRes) - { - case 0: // standard - requiredLevel = levels::gline::standard; - break; - case 1: // ablock - requiredLevel = levels::gline::ablock; - break; - case 2: // bblock - requiredLevel = levels::gline::bblock; - break; - case 3: // cblock - requiredLevel = levels::gline::cblock; - break; - case 4: // tld - requiredLevel = levels::gline::tld; - break; - case 5: // isp - requiredLevel = levels::gline::isp; - break; - - - case 20: // err_illegalhost - bot->SendTo(theClient, PrivMsg, "I don't think that would be a valid hostname!"); - return false; - - } //switch -} // if(!nickname) - -string length; -length.assign(st[2]); -int len = strlen(st[2].c_str()); -const char unit = st[2][len-1]; - -if(!isdigit(unit)) - length = length.substr( 0, length.length() - 1 ); - -if(!IsNumeric(length)) - { - reason = st.assemble(2); - } -else - { - if( st.size() < 4 ) - { - Usage(theClient); - return true; - } + using std::string ; - reason = st.assemble(3); - if(unit == 'd') - gLength = (atoi(length.c_str()) * 3600 * 24); - else if(unit == 'h') - gLength = (atoi(length.c_str()) * 3600); - else if(unit == 'm') - { - gLength = (atoi(length.c_str()) * 60); - } - else - gLength = (atoi(length.c_str())); - } - -if(gLength > 3600 * 24 * 2) + namespace uwrld { - if( requiredLevel < levels::gline::longterm ) - requiredLevel = levels::gline::longterm; - } - -if(operLevel < requiredLevel) - { - bot->SendTo(theClient, PrivMsg, "This gline requires access level %d!", requiredLevel); - return false; - } - -int matches = Network->countMatchingUserHost(username + "@" + hostname); -char theReason[255]; -sprintf(theReason, "[%d] %s", matches, reason.c_str()); - -/* debugging stuff -bot->MsgChanLog("DEBUG: username = %s", username.c_str()); -bot->MsgChanLog("DEBUG: hostname = %s (%s IP) and has %d dots", hostname.c_str(), bot->isIP(hostname) ? "IS" : "is GEEN", - bot->CountDots(hostname) ); -bot->MsgChanLog("DEBUG: length = %s%c", length.c_str(), unit); -bot->MsgChanLog("DEBUG: gLength = %d", gLength); -bot->MsgChanLog("DEBUG: reason = %s", reason.c_str()); -bot->MsgChanLog("DEBUG: matches = %d", matches); -*/ - -uwGline* newGline = bot->findGline(username + "@" + hostname); -if(!newGline) -{ - newGline = new (std::nothrow) uwGline(bot->SQLDb); - assert (newGline != NULL); - - newGline->setAddedBy(theClient->getRealNickUserHost().c_str()); - newGline->setAddedOn(::time(0)); - newGline->setHost(username + "@" + hostname); - newGline->setAddedLevel(requiredLevel); - newGline->setReason(theReason); - newGline->setExpires(::time(0) + gLength ); - newGline->Insert(); - - //need to load the id - newGline->loadData(newGline->getHost()); - bot->addGline(newGline); - bot->SendTo(theClient, PrivMsg, "Gline %s added.", newGline->getHost().c_str()); - uwUser* theUser = bot->isAuthed(theClient); - if(!theUser) return false; - bot->addLog(theClient, "GLINE %s", st.assemble(1).c_str()); - bot->MsgChanLog("%s ( %s ) added gline %s untill %s", theUser->getUserName().c_str(), theClient->getNickUserHost().c_str(), - newGline->getHost().c_str(), bot->convertToAscTime(newGline->getExpires())); - - server->setGline(server->getName(), newGline->getHost(), theReason, gLength); - -} -return true; -} // if(!channel) - -// wel een channel-gline -if(operLevel < levels::gline::channel) - { - bot->SendTo(theClient, PrivMsg, "This command requires access level %d!", levels::gline::channel); - return false; - } - -Channel* theChan = Network->findChannel(st[1]); -if(!theChan) - { - bot->SendTo(theClient, PrivMsg, "Can NOT gchan a non-existing channel"); - return false; - } - -bool longterm = false; -string length; -length.assign(st[2]); -int len = strlen(st[2].c_str()); -const char unit = st[2][len-1]; - -if(!isdigit(unit)) - length = length.substr( 0, length.length() - 1 ); - -if(!IsNumeric(length)) - { - reason = st.assemble(2); - } -else - { - if( st.size() < 4 ) - { - Usage(theClient); - return true; - } - - reason = st.assemble(3); - if(unit == 'd') - gLength = (atoi(length.c_str()) * 3600 * 24); - else if(unit == 'h') - gLength = (atoi(length.c_str()) * 3600); - else if(unit == 'm') - { - gLength = (atoi(length.c_str()) * 60); - } - else - gLength = (atoi(length.c_str())); - } - -if(gLength > 3600 * 24 * 2) - { - if( operLevel < levels::gline::longterm ) - { - bot->SendTo(theClient, PrivMsg, "This command requires access level %d!", levels::gline::longterm); - return false; - } - longterm = true; - } - -uwGline* tmpGline; -iClient* tmpClient; -int affected = 0; -for( Channel::const_userIterator ptr = theChan->userList_begin() ; ptr != theChan->userList_end() ; ++ptr ) - { - tmpClient = ptr->second->getClient(); - if( !tmpClient->isOper() && !tmpClient->getMode(iClient::MODE_SERVICES) && !bot->isAuthed(tmpClient) ) + + bool GLINECommand::Exec( iClient* theClient, const string& Message ) { - hostname = tmpClient->getRealInsecureHost(); - username = tmpClient->getUserName(); - if(username.substr(0,1) == "~") username = "~*"; - - int matches = Network->countMatchingUserHost(username + "@" + hostname); - char theReason[255]; - sprintf(theReason, "[%d] %s", matches, reason.c_str()); - - tmpGline = bot->findGline(username + "@" + hostname); - if(!tmpGline) + + StringTokenizer st( Message ) ; + bool PrivMsg = bot->SendPrivmsg(theClient); + + if( st.size() < 3 ) { - tmpGline = new (std::nothrow) uwGline(bot->SQLDb); - assert (tmpGline != NULL); - - tmpGline->setAddedBy(theClient->getRealNickUserHost().c_str()); - tmpGline->setAddedOn(::time(0)); - tmpGline->setHost(username + "@" + hostname); - tmpGline->setAddedLevel(longterm ? (... [truncated message content] |
From: Matthias C. <ul...@us...> - 2009-01-14 14:25:31
|
Committer : Matthias Crauwels <ul...@us...> CVSROOT : /cvsroot/mod-uworld Module : mod.uworld Commit time: 2009-01-14 14:25:26 UTC Modified files: config.guess config.sub configure configure.ac ltmain.sh autom4te.cache/output.0 autom4te.cache/requests autom4te.cache/traces.0 Log message: Author: Matthias Crauwels <ult...@no...> Log message: * 2009-01-14 - do not redefine PACKAGE and VERSION ---------------------- diff included ---------------------- Index: mod.uworld/autom4te.cache/output.0 diff -u mod.uworld/autom4te.cache/output.0:1.2 mod.uworld/autom4te.cache/output.0:1.3 --- mod.uworld/autom4te.cache/output.0:1.2 Wed Jan 14 12:20:23 2009 +++ mod.uworld/autom4te.cache/output.0 Wed Jan 14 14:25:16 2009 @@ -1,5 +1,5 @@ @%:@! /bin/sh -@%:@ From configure.ac Revision: 1.3 . +@%:@ From configure.ac Revision: 1.4 . @%:@ Guess values for system-dependent variables and create Makefiles. @%:@ Generated by GNU Autoconf 2.61. @%:@ @@ -2222,15 +2222,6 @@ VERSION=2.2 -cat >>confdefs.h <<_ACEOF -@%:@define PACKAGE "$PACKAGE" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -@%:@define VERSION "$VERSION" -_ACEOF - # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} Index: mod.uworld/autom4te.cache/requests diff -u mod.uworld/autom4te.cache/requests:1.2 mod.uworld/autom4te.cache/requests:1.3 --- mod.uworld/autom4te.cache/requests:1.2 Wed Jan 14 12:20:23 2009 +++ mod.uworld/autom4te.cache/requests Wed Jan 14 14:25:16 2009 @@ -15,15 +15,15 @@ 'configure.ac' ], { - '_LT_AC_TAGCONFIG' => 1, 'AM_PROG_F77_C_O' => 1, - 'AC_INIT' => 1, + '_LT_AC_TAGCONFIG' => 1, 'm4_pattern_forbid' => 1, + 'AC_INIT' => 1, 'AC_CANONICAL_TARGET' => 1, - 'AC_SUBST' => 1, 'AC_CONFIG_LIBOBJ_DIR' => 1, - 'AC_FC_SRCEXT' => 1, + 'AC_SUBST' => 1, 'AC_CANONICAL_HOST' => 1, + 'AC_FC_SRCEXT' => 1, 'AC_PROG_LIBTOOL' => 1, 'AM_INIT_AUTOMAKE' => 1, 'AC_CONFIG_SUBDIRS' => 1, @@ -31,8 +31,8 @@ 'LT_CONFIG_LTDL_DIR' => 1, 'AC_REQUIRE_AUX_FILE' => 1, 'AC_CONFIG_LINKS' => 1, - 'm4_sinclude' => 1, 'LT_SUPPORTED_TAG' => 1, + 'm4_sinclude' => 1, 'AM_MAINTAINER_MODE' => 1, 'AM_GNU_GETTEXT_INTL_SUBDIR' => 1, '_m4_warn' => 1, @@ -49,11 +49,11 @@ 'AH_OUTPUT' => 1, '_AM_SUBST_NOTMAKE' => 1, 'AC_CONFIG_AUX_DIR' => 1, - 'sinclude' => 1, - 'm4_pattern_allow' => 1, 'AM_PROG_CC_C_O' => 1, - 'AC_CANONICAL_SYSTEM' => 1, + 'm4_pattern_allow' => 1, + 'sinclude' => 1, 'AM_CONDITIONAL' => 1, + 'AC_CANONICAL_SYSTEM' => 1, 'AC_CONFIG_HEADERS' => 1, 'AC_DEFINE_TRACE_LITERAL' => 1, 'm4_include' => 1, Index: mod.uworld/autom4te.cache/traces.0 diff -u mod.uworld/autom4te.cache/traces.0:1.2 mod.uworld/autom4te.cache/traces.0:1.3 --- mod.uworld/autom4te.cache/traces.0:1.2 Wed Jan 14 12:20:23 2009 +++ mod.uworld/autom4te.cache/traces.0 Wed Jan 14 14:25:16 2009 @@ -140,7 +140,7 @@ m4trace:configure.ac:8: -1- AC_SUBST([target_alias]) m4trace:configure.ac:8: -1- AC_SUBST_TRACE([target_alias]) m4trace:configure.ac:8: -1- m4_pattern_allow([^target_alias$]) -m4trace:configure.ac:10: -1- AM_INIT_AUTOMAKE([uworld], [2.2]) +m4trace:configure.ac:10: -1- AM_INIT_AUTOMAKE([uworld], [2.2], [no-define]) m4trace:configure.ac:10: -1- AM_AUTOMAKE_VERSION([1.7.9]) m4trace:configure.ac:10: -1- AC_REQUIRE_AUX_FILE([install-sh]) m4trace:configure.ac:10: -1- AC_SUBST([INSTALL_PROGRAM]) @@ -161,14 +161,6 @@ m4trace:configure.ac:10: -1- AC_SUBST([VERSION], [2.2]) m4trace:configure.ac:10: -1- AC_SUBST_TRACE([VERSION]) m4trace:configure.ac:10: -1- m4_pattern_allow([^VERSION$]) -m4trace:configure.ac:10: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE]) -m4trace:configure.ac:10: -1- m4_pattern_allow([^PACKAGE$]) -m4trace:configure.ac:10: -1- AH_OUTPUT([PACKAGE], [/* Name of package */ -#undef PACKAGE]) -m4trace:configure.ac:10: -1- AC_DEFINE_TRACE_LITERAL([VERSION]) -m4trace:configure.ac:10: -1- m4_pattern_allow([^VERSION$]) -m4trace:configure.ac:10: -1- AH_OUTPUT([VERSION], [/* Version number of package */ -#undef VERSION]) m4trace:configure.ac:10: -1- AC_SUBST([ACLOCAL]) m4trace:configure.ac:10: -1- AC_SUBST_TRACE([ACLOCAL]) m4trace:configure.ac:10: -1- m4_pattern_allow([^ACLOCAL$]) Index: mod.uworld/config.guess diff -u mod.uworld/config.guess:1.3 mod.uworld/config.guess:1.4 --- mod.uworld/config.guess:1.3 Thu Jul 10 14:22:18 2003 +++ mod.uworld/config.guess Wed Jan 14 14:25:16 2009 @@ -1,9 +1,10 @@ #! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003 Free Software Foundation, Inc. +# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, +# Inc. -timestamp='2003-05-09' +timestamp='2007-07-22' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -17,13 +18,15 @@ # # 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. +# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA +# 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. + # Originally written by Per Bothner <pe...@bo...>. # Please send patches to <con...@gn...>. Submit a context # diff and a properly formatted ChangeLog entry. @@ -53,7 +56,7 @@ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO @@ -66,11 +69,11 @@ while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) - echo "$timestamp" ; exit 0 ;; + echo "$timestamp" ; exit ;; --version | -v ) - echo "$version" ; exit 0 ;; + echo "$version" ; exit ;; --help | --h* | -h ) - echo "$usage"; exit 0 ;; + echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. @@ -104,8 +107,9 @@ trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; - { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; @@ -122,7 +126,7 @@ ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; -esac ;' +esac ; set_cc_for_build= ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (gh...@no... 1994-08-24) @@ -135,6 +139,23 @@ UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown +if [ "${UNAME_SYSTEM}" = "Linux" ] ; then + eval $set_cc_for_build + cat << EOF > $dummy.c + #include <features.h> + #ifdef __UCLIBC__ + # ifdef __UCLIBC_CONFIG_VERSION__ + LIBC=uclibc __UCLIBC_CONFIG_VERSION__ + # else + LIBC=uclibc + # endif + #else + LIBC=gnu + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep LIBC= | sed -e 's: ::g'` +fi + # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in @@ -157,6 +178,7 @@ arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; + sh5el) machine=sh5le-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched @@ -195,50 +217,32 @@ # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" - exit 0 ;; - amiga:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - arc:OpenBSD:*:*) - echo mipsel-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - hp300:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mac68k:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - macppc:OpenBSD:*:*) - echo powerpc-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mvme68k:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mvme88k:OpenBSD:*:*) - echo m88k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mvmeppc:OpenBSD:*:*) - echo powerpc-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - pmax:OpenBSD:*:*) - echo mipsel-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - sgi:OpenBSD:*:*) - echo mipseb-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - sun3:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - wgrisc:OpenBSD:*:*) - echo mipsel-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; + exit ;; *:OpenBSD:*:*) - echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; + UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` + echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} + exit ;; + *:ekkoBSD:*:*) + echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} + exit ;; + *:SolidBSD:*:*) + echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} + exit ;; + macppc:MirBSD:*:*) + echo powerpc-unknown-mirbsd${UNAME_RELEASE} + exit ;; + *:MirBSD:*:*) + echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} + exit ;; alpha:OSF1:*:*) - if test $UNAME_RELEASE = "V4.0"; then + case $UNAME_RELEASE in + *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` - fi + ;; + *5.*) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` + ;; + esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU @@ -276,39 +280,49 @@ "EV7.9 (21364A)") UNAME_MACHINE="alphaev79" ;; esac + # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. - echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - exit 0 ;; + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + exit ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix - exit 0 ;; + exit ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 - exit 0 ;; + exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 - exit 0;; + exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos - exit 0 ;; + exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos - exit 0 ;; + exit ;; *:OS/390:*:*) echo i370-ibm-openedition - exit 0 ;; + exit ;; + *:z/VM:*:*) + echo s390-ibm-zvmoe + exit ;; + *:OS400:*:*) + echo powerpc-ibm-os400 + exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} - exit 0;; + exit ;; + arm:riscos:*:*|arm:RISCOS:*:*) + echo arm-unknown-riscos + exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp - exit 0;; + exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # ak...@wp... (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then @@ -316,29 +330,32 @@ else echo pyramid-pyramid-bsd fi - exit 0 ;; + exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 - exit 0 ;; - DRS?6000:UNIX_SV:4.2*:7*) + exit ;; + DRS?6000:unix:4.0:6*) + echo sparc-icl-nx6 + exit ;; + DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in - sparc) echo sparc-icl-nx7 && exit 0 ;; + sparc) echo sparc-icl-nx7; exit ;; esac ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; + exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; - i86pc:SunOS:5.*:*) + exit ;; + i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; + exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; + exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) @@ -347,10 +364,10 @@ esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` - exit 0 ;; + exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} - exit 0 ;; + exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 @@ -362,10 +379,10 @@ echo sparc-sun-sunos${UNAME_RELEASE} ;; esac - exit 0 ;; + exit ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} - exit 0 ;; + exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor @@ -376,37 +393,40 @@ # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} - exit 0 ;; + exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} - exit 0 ;; + exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} - exit 0 ;; + exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} - exit 0 ;; + exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} - exit 0 ;; + exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} - exit 0 ;; + exit ;; + m68k:machten:*:*) + echo m68k-apple-machten${UNAME_RELEASE} + exit ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} - exit 0 ;; + exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 - exit 0 ;; + exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} - exit 0 ;; + exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} - exit 0 ;; + exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} - exit 0 ;; + exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c @@ -430,32 +450,33 @@ exit (-1); } EOF - $CC_FOR_BUILD -o $dummy $dummy.c \ - && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ - && exit 0 + $CC_FOR_BUILD -o $dummy $dummy.c && + dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && + SYSTEM_NAME=`$dummy $dummyarg` && + { echo "$SYSTEM_NAME"; exit; } echo mips-mips-riscos${UNAME_RELEASE} - exit 0 ;; + exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax - exit 0 ;; + exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax - exit 0 ;; + exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax - exit 0 ;; + exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix - exit 0 ;; + exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 - exit 0 ;; + exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 - exit 0 ;; + exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 - exit 0 ;; + exit ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` @@ -471,29 +492,29 @@ else echo i586-dg-dgux${UNAME_RELEASE} fi - exit 0 ;; + exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 - exit 0 ;; + exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 - exit 0 ;; + exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 - exit 0 ;; + exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd - exit 0 ;; + exit ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` - exit 0 ;; + exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. - echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id - exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id + exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix - exit 0 ;; + exit ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` @@ -501,7 +522,7 @@ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} - exit 0 ;; + exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build @@ -516,14 +537,18 @@ exit(0); } EOF - $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 - echo rs6000-ibm-aix3.2.5 + if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` + then + echo "$SYSTEM_NAME" + else + echo rs6000-ibm-aix3.2.5 + fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi - exit 0 ;; + exit ;; *:AIX:*:[45]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then @@ -537,28 +562,28 @@ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} - exit 0 ;; + exit ;; *:AIX:*:*) echo rs6000-ibm-aix - exit 0 ;; + exit ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 - exit 0 ;; + exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to - exit 0 ;; # report: romp-ibm BSD 4.3 + exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx - exit 0 ;; + exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 - exit 0 ;; + exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd - exit 0 ;; + exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 - exit 0 ;; + exit ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in @@ -620,9 +645,19 @@ esac if [ ${HP_ARCH} = "hppa2.0w" ] then - # avoid double evaluation of $set_cc_for_build - test -n "$CC_FOR_BUILD" || eval $set_cc_for_build - if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null + eval $set_cc_for_build + + # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating + # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler + # generating 64-bit code. GNU and HP use different nomenclature: + # + # $ CC_FOR_BUILD=cc ./config.guess + # => hppa2.0w-hp-hpux11.23 + # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess + # => hppa64-hp-hpux11.23 + + if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | + grep __LP64__ >/dev/null then HP_ARCH="hppa2.0w" else @@ -630,11 +665,11 @@ fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} - exit 0 ;; + exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} - exit 0 ;; + exit ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c @@ -662,147 +697,182 @@ exit (0); } EOF - $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 + $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && + { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 - exit 0 ;; + exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd - exit 0 ;; + exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd - exit 0 ;; + exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix - exit 0 ;; + exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf - exit 0 ;; + exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf - exit 0 ;; + exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi - exit 0 ;; + exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites - exit 0 ;; + exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd - exit 0 ;; + exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi - exit 0 ;; + exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd - exit 0 ;; + exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd - exit 0 ;; + exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd - exit 0 ;; + exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit 0 ;; + exit ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' - exit 0 ;; + exit ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit 0 ;; + exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit 0 ;; + exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit 0 ;; + exit ;; *:UNICOS/mp:*:*) - echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit 0 ;; + echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit 0 ;; + exit ;; + 5000:UNIX_System_V:4.*:*) + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` + echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} - exit 0 ;; + exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} - exit 0 ;; + exit ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} - exit 0 ;; - *:FreeBSD:*:*|*:GNU/FreeBSD:*:*) - # Determine whether the default compiler uses glibc. - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include <features.h> - #if __GLIBC__ >= 2 - LIBC=gnu - #else - LIBC= - #endif -EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC} - exit 0 ;; + exit ;; + *:FreeBSD:*:*) + case ${UNAME_MACHINE} in + pc98) + echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + amd64) + echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + *) + echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + esac + exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin - exit 0 ;; - i*:MINGW*:*) + exit ;; + *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 - exit 0 ;; + exit ;; + i*:windows32*:*) + # uname -m includes "-pc" on this system. + echo ${UNAME_MACHINE}-mingw32 + exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 - exit 0 ;; - x86:Interix*:3*) - echo i586-pc-interix3 - exit 0 ;; + exit ;; + *:Interix*:[3456]*) + case ${UNAME_MACHINE} in + x86) + echo i586-pc-interix${UNAME_RELEASE} + exit ;; + EM64T | authenticamd) + echo x86_64-unknown-interix${UNAME_RELEASE} + exit ;; + esac ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks - exit 0 ;; + exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix - exit 0 ;; + exit ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin - exit 0 ;; + exit ;; + amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) + echo x86_64-unknown-cygwin + exit ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin - exit 0 ;; + exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; + exit ;; *:GNU:*:*) + # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` - exit 0 ;; + exit ;; + *:GNU/*:*:*) + # other systems with GNU libc and userland + echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu + exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix - exit 0 ;; + exit ;; arm*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit 0 ;; + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + avr32*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + cris:Linux:*:*) + echo cris-axis-linux-${LIBC} + exit ;; + crisv32:Linux:*:*) + echo crisv32-axis-linux-${LIBC} + exit ;; + frv:Linux:*:*) + echo frv-unknown-linux-${LIBC} + exit ;; ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit 0 ;; + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + m32r*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; m68*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit 0 ;; + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; mips:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c @@ -819,8 +889,12 @@ #endif #endif EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` - test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 + eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' + /^CPU/{ + s: ::g + p + }'`" + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } ;; mips64:Linux:*:*) eval $set_cc_for_build @@ -838,15 +912,22 @@ #endif #endif EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` - test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 + eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' + /^CPU/{ + s: ::g + p + }'`" + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } ;; + or32:Linux:*:*) + echo or32-unknown-linux-${LIBC} + exit ;; ppc:Linux:*:*) - echo powerpc-unknown-linux-gnu - exit 0 ;; + echo powerpc-unknown-linux-${LIBC} + exit ;; ppc64:Linux:*:*) - echo powerpc64-unknown-linux-gnu - exit 0 ;; + echo powerpc64-unknown-linux-${LIBC} + exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; @@ -858,32 +939,41 @@ EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null - if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} - exit 0 ;; + if test "$?" = 0 ; then LIBC="gnulibc1" ; fi + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in - PA7*) echo hppa1.1-unknown-linux-gnu ;; - PA8*) echo hppa2.0-unknown-linux-gnu ;; - *) echo hppa-unknown-linux-gnu ;; + PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; + PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; + *) echo hppa-unknown-linux-${LIBC} ;; esac - exit 0 ;; + exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-gnu - exit 0 ;; + echo hppa64-unknown-linux-${LIBC} + exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux - exit 0 ;; + exit ;; + sh64*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; sh*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit 0 ;; + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit 0 ;; + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + vax:Linux:*:*) + echo ${UNAME_MACHINE}-dec-linux-${LIBC} + exit ;; x86_64:Linux:*:*) - echo x86_64-unknown-linux-gnu - exit 0 ;; + echo x86_64-unknown-linux-${LIBC} + exit ;; + xtensa:Linux:*:*) + echo xtensa-unknown-linux-${LIBC} + exit ;; i*86:Linux:*:*) # The BFD linker knows what the default object file format is, so # first see if it will tell us. cd to the root directory to prevent @@ -897,20 +987,22 @@ p'` case "$ld_supported_targets" in elf32-i386) - TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" + TENTATIVE="${UNAME_MACHINE}-pc-linux-${LIBC}" ;; a.out-i386-linux) - echo "${UNAME_MACHINE}-pc-linux-gnuaout" - exit 0 ;; + echo "${UNAME_MACHINE}-pc-linux-${LIBC}aout" + exit ;; coff-i386) - echo "${UNAME_MACHINE}-pc-linux-gnucoff" - exit 0 ;; + echo "${UNAME_MACHINE}-pc-linux-${LIBC}coff" + exit ;; "") # Either a pre-BFD a.out linker (linux-gnuoldld) or # one that does not give us useful --help. - echo "${UNAME_MACHINE}-pc-linux-gnuoldld" - exit 0 ;; + echo "${UNAME_MACHINE}-pc-linux-${LIBC}oldld" + exit ;; esac + # This should get integrated into the C code below, but now we hack + if [ "$LIBC" != "gnu" ] ; then echo "$TENTATIVE" && exit 0 ; fi # Determine whether the default compiler is a.out or elf eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c @@ -926,23 +1018,33 @@ LIBC=gnulibc1 # endif #else - #ifdef __INTEL_COMPILER + #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) LIBC=gnu #else LIBC=gnuaout #endif #endif + #ifdef __dietlibc__ + LIBC=dietlibc + #endif EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` - test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0 - test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 + eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' + /^LIBC/{ + s: ::g + p + }'`" + test x"${LIBC}" != x && { + echo "${UNAME_MACHINE}-pc-linux-${LIBC}" + exit + } + test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 - exit 0 ;; + exit ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... @@ -950,24 +1052,27 @@ # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} - exit 0 ;; + exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx - exit 0 ;; + exit ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop - exit 0 ;; + exit ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos - exit 0 ;; + exit ;; + i*86:syllable:*:*) + echo ${UNAME_MACHINE}-pc-syllable + exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) echo i386-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; + exit ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp - exit 0 ;; + exit ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then @@ -975,15 +1080,16 @@ else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi - exit 0 ;; - i*86:*:5:[78]*) + exit ;; + i*86:*:5:[678]*) + # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} - exit 0 ;; + exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name` @@ -1001,73 +1107,73 @@ else echo ${UNAME_MACHINE}-pc-sysv32 fi - exit 0 ;; + exit ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i386. echo i386-pc-msdosdjgpp - exit 0 ;; + exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 - exit 0 ;; + exit ;; paragon:*:*:*) echo i860-intel-osf1 - exit 0 ;; + exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi - exit 0 ;; + exit ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv - exit 0 ;; + exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv - exit 0 ;; + exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix - exit 0 ;; - M68*:*:R3V[567]*:*) - test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; - 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0) + exit ;; + M68*:*:R3V[5678]*:*) + test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; + 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && echo i486-ncr-sysv4.3${OS_REL} && exit 0 + && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && echo i486-ncr-sysv4 && exit 0 ;; + && { echo i486-ncr-sysv4; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; + exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 - exit 0 ;; + exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; + exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; + exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; + exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} - exit 0 ;; + exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 - exit 0 ;; + exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 - exit 0 ;; + exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` @@ -1075,68 +1181,81 @@ else echo ns32k-sni-sysv fi - exit 0 ;; + exit ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says <Ric...@cc...> echo i586-unisys-sysv4 - exit 0 ;; + exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes <he...@op...>. # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 - exit 0 ;; + exit ;; *:*:*:FTX*) # From se...@sw.... echo i860-stratus-sysv4 - exit 0 ;; + exit ;; + i*86:VOS:*:*) + # From Pau...@st.... + echo ${UNAME_MACHINE}-stratus-vos + exit ;; *:VOS:*:*) # From Pau...@st.... echo hppa1.1-stratus-vos - exit 0 ;; + exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} - exit 0 ;; + exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 - exit 0 ;; + exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi - exit 0 ;; + exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos - exit 0 ;; + exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos - exit 0 ;; + exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos - exit 0 ;; + exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} - exit 0 ;; + exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} - exit 0 ;; + exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} - exit 0 ;; + exit ;; + SX-7:SUPER-UX:*:*) + echo sx7-nec-superux${UNAME_RELEASE} + exit ;; + SX-8:SUPER-UX:*:*) + echo sx8-nec-superux${UNAME_RELEASE} + exit ;; + SX-8R:SUPER-UX:*:*) + echo sx8r-nec-superux${UNAME_RELEASE} + exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} - exit 0 ;; + exit ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} - exit 0 ;; + exit ;; *:Darwin:*:*) - case `uname -p` in - *86) UNAME_PROCESSOR=i686 ;; - powerpc) UNAME_PROCESSOR=powerpc ;; + UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown + case $UNAME_PROCESSOR in + unknown) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} - exit 0 ;; + exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then @@ -1144,22 +1263,25 @@ UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} - exit 0 ;; + exit ;; *:QNX:*:4*) echo i386-pc-qnx - exit 0 ;; - NSR-[DGKLNPTVW]:NONSTOP_KERNEL:*:*) + exit ;; + NSE-?:NONSTOP_KERNEL:*:*) + echo nse-tandem-nsk${UNAME_RELEASE} + exit ;; + NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} - exit 0 ;; + exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux - exit 0 ;; + exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv - exit 0 ;; + exit ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} - exit 0 ;; + exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 @@ -1170,25 +1292,47 @@ UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 - exit 0 ;; + exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 - exit 0 ;; + exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex - exit 0 ;; + exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 - exit 0 ;; + exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 - exit 0 ;; + exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 - exit 0 ;; + exit ;; *:ITS:*:*) echo pdp10-unknown-its - exit 0 ;; + exit ;; + SEI:*:*:SEIUX) + echo mips-sei-seiux${UNAME_RELEASE} + exit ;; + *:DragonFly:*:*) + echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` + exit ;; + *:*VMS:*:*) + UNAME_MACHINE=`(uname -p) 2>/dev/null` + case "${UNAME_MACHINE}" in + A*) echo alpha-dec-vms ; exit ;; + I*) echo ia64-dec-vms ; exit ;; + V*) echo vax-dec-vms ; exit ;; + esac ;; + *:XENIX:*:SysV) + echo i386-pc-xenix + exit ;; + i*86:skyos:*:*) + echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' + exit ;; + i*86:rdos:*:*) + echo ${UNAME_MACHINE}-pc-rdos + exit ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 @@ -1220,7 +1364,7 @@ #endif #if defined (__arm) && defined (__acorn) && defined (__unix) - printf ("arm-acorn-riscix"); exit (0); + printf ("arm-acorn-riscix\n"); exit (0); #endif #if defined (hp300) && !defined (hpux) @@ -1309,11 +1453,12 @@ } EOF -$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0 +$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && + { echo "$SYSTEM_NAME"; exit; } # Apollos put the system type in the environment. -test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } +test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } # Convex versions that predate uname can use getsysinfo(1) @@ -1322,22 +1467,22 @@ case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd - exit 0 ;; + exit ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi - exit 0 ;; + exit ;; c34*) echo c34-convex-bsd - exit 0 ;; + exit ;; c38*) echo c38-convex-bsd - exit 0 ;; + exit ;; c4*) echo c4-convex-bsd - exit 0 ;; + exit ;; esac fi @@ -1348,7 +1493,9 @@ the operating system you are using. It is advised that you download the most up to date version of the config scripts from - ftp://ftp.gnu.org/pub/gnu/config/ + http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess +and + http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub If the version you run ($0) is already up to date, please send the following data and any information you think might be Index: mod.uworld/config.sub diff -u mod.uworld/config.sub:1.3 mod.uworld/config.sub:1.4 --- mod.uworld/config.sub:1.3 Thu Jul 10 14:22:18 2003 +++ mod.uworld/config.sub Wed Jan 14 14:25:16 2009 @@ -1,9 +1,10 @@ #! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003 Free Software Foundation, Inc. +# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, +# Inc. -timestamp='2003-05-09' +timestamp='2007-06-28' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software @@ -21,14 +22,15 @@ # # 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. - +# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA +# 02110-1301, USA. +# # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. + # Please send patches to <con...@gn...>. Submit a context # diff and a properly formatted ChangeLog entry. # @@ -70,7 +72,7 @@ version="\ GNU config.sub ($timestamp) -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO @@ -83,11 +85,11 @@ while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) - echo "$timestamp" ; exit 0 ;; + echo "$timestamp" ; exit ;; --version | -v ) - echo "$version" ; exit 0 ;; + echo "$version" ; exit ;; --help | --h* | -h ) - echo "$usage"; exit 0 ;; + echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. @@ -99,7 +101,7 @@ *local*) # First pass through any local machine types. echo $1 - exit 0;; + exit ;; * ) break ;; @@ -118,7 +120,9 @@ # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in - nto-qnx* | linux-gnu* | freebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) + nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ + uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ + storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; @@ -144,7 +148,7 @@ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple | -axis) + -apple | -axis | -knuth | -cray) os= basic_machine=$1 ;; @@ -169,6 +173,10 @@ -hiux*) os=-hiuxwe2 ;; + -sco6) + os=-sco5v6 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` @@ -185,6 +193,10 @@ # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; + -sco5v6*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` @@ -228,14 +240,17 @@ | a29k \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ - | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ - | clipper \ - | d10v | d30v | dlx | dsp16xx \ - | fr30 | frv \ + | am33_2.0 \ + | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ + | bfin \ + | c4x | clipper \ + | d10v | d30v | dlx | dsp16xx | dvp \ + | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ - | ip2k \ - | m32r | m68000 | m68k | m88k | mcore \ + | ip2k | iq2000 \ + | m32c | m32r | m32rle | m68000 | m68k | m88k \ + | maxq | mb | microblaze | mcore | mep \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ @@ -244,27 +259,33 @@ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ + | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa64 | mipsisa64el \ + | mipsisa64r2 | mipsisa64r2el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ + | mt \ | msp430 \ + | nios | nios2 \ | ns16k | ns32k \ - | openrisc | or32 \ + | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ - | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ + | score \ + | sh | sh[1234] | sh[24]a | sh[24]a*eb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ - | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \ - | strongarm \ - | tahoe | thumb | tic80 | tron \ + | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ + | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ + | spu | strongarm \ + | tahoe | thumb | tic4x | tic80 | tron \ | v850 | v850e \ | we32k \ - | x86 | xscale | xstormy16 | xtensa \ + | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ | z8k) basic_machine=$basic_machine-unknown ;; @@ -275,6 +296,9 @@ ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; + ms1) + basic_machine=mt-unknown + ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and @@ -294,20 +318,20 @@ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ - | avr-* \ - | bs2000-* \ + | avr-* | avr32-* \ + | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ - | clipper-* | cydra-* \ + | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ - | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ + | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ - | ip2k-* \ - | m32r-* \ + | ip2k-* | iq2000-* \ + | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | mcore-* \ + | m88110-* | m88k-* | maxq-* | mcore-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ @@ -316,30 +340,36 @@ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ + | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa64-* | mipsisa64el-* \ + | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ + | mmix-* \ + | mt-* \ | msp430-* \ - | none-* | np1-* | nv1-* | ns16k-* | ns32k-* \ + | nios-* | nios2-* \ + | none-* | np1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ | romp-* | rs6000-* \ - | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \ + | sh-* | sh[1234]-* | sh[24]a-* | sh[24]a*eb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ - | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \ - | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ + | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ + | sparclite-* \ + | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tron-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ - | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \ - | xtensa-* \ + | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ + | xstormy16-* | xtensa-* \ | ymp-* \ | z8k-*) ;; @@ -359,6 +389,9 @@ basic_machine=a29k-amd os=-udi ;; + abacus) + basic_machine=abacus-unknown + ;; adobe68k) basic_machine=m68010-adobe os=-scout @@ -376,6 +409,9 @@ amd64) basic_machine=x86_64-pc ;; + amd64-*) + basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; amdahl) basic_machine=580-amdahl os=-sysv @@ -435,12 +471,27 @@ basic_machine=j90-cray os=-unicos ;; + craynv) + basic_machine=craynv-cray + os=-unicosmp + ;; + cr16) + basic_machine=cr16-unknown + os=-elf + ;; crds | unos) basic_machine=m68k-crds ;; + crisv32 | crisv32-* | etraxfs*) + basic_machine=crisv32-axis + ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; + crx) + basic_machine=crx-unknown + os=-elf + ;; da30 | da30-*) basic_machine=m68k-da30 ;; @@ -463,6 +514,10 @@ basic_machine=m88k-motorola os=-sysv3 ;; + djgpp) + basic_machine=i586-pc + os=-msdosdjgpp + ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx @@ -628,6 +683,10 @@ basic_machine=i386-pc os=-mingw32 ;; + mingw32ce) + basic_machine=arm-unknown + os=-mingw32ce + ;; miniframe) basic_machine=m68000-convergent ;; @@ -635,16 +694,30 @@ basic_machine=m68k-atari os=-mint ;; + mipsEE* | ee | ps2) + basic_machine=mips64r5900el-scei + case $os in + -linux*) + ;; + *) + os=-elf + ;; + esac + ;; + iop) + basic_machine=mipsel-scei + os=-irx + ;; + dvp) + basic_machine=dvp-scei + os=-elf + ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; - mmix*) - basic_machine=mmix-knuth - os=-mmixware - ;; monitor) basic_machine=m68k-rom68k os=-coff @@ -657,6 +730,9 @@ basic_machine=i386-pc os=-msdos ;; + ms1-*) + basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` + ;; mvs) basic_machine=i370-ibm os=-mvs @@ -725,10 +801,6 @@ np1) basic_machine=np1-gould ;; - nv1) - basic_machine=nv1-cray - os=-unicosmp - ;; nsr-tandem) basic_machine=nsr-tandem ;; @@ -736,9 +808,12 @@ basic_machine=hppa1.1-oki os=-proelf ;; - or32 | or32-*) + openrisc | openrisc-*) basic_machine=or32-unknown - os=-coff + ;; + os400) + basic_machine=powerpc-ibm + os=-os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson @@ -765,24 +840,36 @@ pc532 | pc532-*) basic_machine=ns32k-pc532 ;; + pc98) + basic_machine=i386-pc + ;; + pc98-*) + basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; - pentiumii | pentium2) + pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; + pentium4) + basic_machine=i786-pc + ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; - pentiumii-* | pentium2-*) + pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; + pentium4-*) + basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; pn) basic_machine=pn-gould ;; @@ -815,6 +902,10 @@ basic_machine=i586-unknown os=-pw32 ;; + rdos) + basic_machine=i386-pc + os=-rdos + ;; rom68k) basic_machine=m68k-rom68k os=-coff @@ -841,6 +932,14 @@ sb1el) basic_machine=mipsisa64sb1el-unknown ;; + sde) + basic_machine=mipsisa32-sde + os=-elf + ;; + sei) + basic_machine=mips-sei + os=-seiux + ;; sequent) basic_machine=i386-sequent ;; @@ -848,6 +947,12 @@ basic_machine=sh-hitachi os=-hms ;; + sh5el) + basic_machine=sh5le-unknown + ;; + sh64) + basic_machine=sh64-unknown + ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks @@ -922,10 +1027,6 @@ basic_machine=t90-cray os=-unicos ;; - tic4x | c4x*) - basic_machine=tic4x-unknown - os=-coff - ;; tic54x | c54x*) basic_machine=tic54x-unknown os=-coff @@ -951,6 +1052,10 @@ tower | tower-32) basic_machine=m68k-ncr ;; + tpf) + basic_machine=s390x-ibm + os=-tpf + ;; udi29k) basic_machine=a29k-amd os=-udi @@ -994,6 +1099,10 @@ basic_machine=hppa1.1-winbond os=-proelf ;; + xbox) + basic_machine=i686-pc + os=-mingw32 + ;; xps | xps100) basic_machine=xps100-honeywell ;; @@ -1024,6 +1133,9 @@ romp) basic_machine=romp-ibm ;; + mmix) + basic_machine=mmix-knuth + ;; rs6000) basic_machine=rs6000-ibm ;; @@ -1040,13 +1152,10 @@ we32k) basic_machine=we32k-att ;; - sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele) + sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; - sh64) - basic_machine=sh64-unknown - ;; - sparc | sparcv9 | sparcv9b) + sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) basic_machine=sparc-sun ;; cydra) @@ -1119,19 +1228,23 @@ | -aos* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \ - | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ + | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ + | -openbsd* | -solidbsd* \ + | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ + | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \ + | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ + | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ - | -powermax* | -dnix*) + | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ + | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -irx*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) @@ -1149,12 +1262,15 @@ os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ - | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ + | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | -macos* | -mpw* | ... [truncated message content] |
From: Matthias C. <ul...@us...> - 2009-01-14 13:14:20
|
Committer : Matthias Crauwels <ul...@us...> CVSROOT : /cvsroot/mod-uworld Module : mod.uworld Commit time: 2009-01-14 13:14:08 UTC Modified files: uwAGL.cc uwAGL.h uwGline.cc uwGline.h uwLog.cc uwLog.h uwUser.h uworld.cc uworld.h Log message: Author: Matthias Crauwels <ult...@no...> Log message: * 2009-01-14 - to guarantee database independance we don't include those here... ---------------------- diff included ---------------------- Index: mod.uworld/uwAGL.cc diff -u mod.uworld/uwAGL.cc:1.4 mod.uworld/uwAGL.cc:1.5 --- mod.uworld/uwAGL.cc:1.4 Wed Jan 14 12:20:23 2009 +++ mod.uworld/uwAGL.cc Wed Jan 14 13:13:58 2009 @@ -3,7 +3,7 @@ * * AGL class * - * $Id: uwAGL.cc,v 1.4 2009/01/14 12:20:23 ultike Exp $ + * $Id: uwAGL.cc,v 1.5 2009/01/14 13:13:58 ultike Exp $ */ #include <sstream> @@ -13,14 +13,13 @@ #include <cstring> #include <cstdlib> -#include "libpq-fe.h" #include "ELog.h" #include "misc.h" #include "uwAGL.h" #include "uworld.h" const char uwAGL_h_rcsId[] = __uwAGL_H ; -const char uwAGL_uw_rcsId[] = "$Id: uwAGL.cc,v 1.4 2009/01/14 12:20:23 ultike Exp $" ; +const char uwAGL_uw_rcsId[] = "$Id: uwAGL.cc,v 1.5 2009/01/14 13:13:58 ultike Exp $" ; namespace gnuworld { Index: mod.uworld/uwAGL.h diff -u mod.uworld/uwAGL.h:1.4 mod.uworld/uwAGL.h:1.5 --- mod.uworld/uwAGL.h:1.4 Wed Jan 14 12:20:23 2009 +++ mod.uworld/uwAGL.h Wed Jan 14 13:13:58 2009 @@ -4,17 +4,16 @@ ** Author: Matthias Crauwels ** 19/01/2003 ** -** $Id: uwAGL.h,v 1.4 2009/01/14 12:20:23 ultike Exp $ +** $Id: uwAGL.h,v 1.5 2009/01/14 13:13:58 ultike Exp $ */ #ifndef __uwAGL_H -#define __uwAGL_H "$Id: uwAGL.h,v 1.4 2009/01/14 12:20:23 ultike Exp $" +#define __uwAGL_H "$Id: uwAGL.h,v 1.5 2009/01/14 13:13:58 ultike Exp $" #include <string> #include <list> #include <ctime> -#include "libpq-fe.h" #include "dbHandle.h" namespace gnuworld Index: mod.uworld/uwGline.cc diff -u mod.uworld/uwGline.cc:1.4 mod.uworld/uwGline.cc:1.5 --- mod.uworld/uwGline.cc:1.4 Wed Jan 14 12:20:23 2009 +++ mod.uworld/uwGline.cc Wed Jan 14 13:13:58 2009 @@ -3,7 +3,7 @@ * * Gline class * - * $Id: uwGline.cc,v 1.4 2009/01/14 12:20:23 ultike Exp $ + * $Id: uwGline.cc,v 1.5 2009/01/14 13:13:58 ultike Exp $ */ #include <sstream> @@ -13,14 +13,13 @@ #include <cstring> #include <cstdlib> -#include "libpq-fe.h" #include "ELog.h" #include "misc.h" #include "uwGline.h" #include "uworld.h" const char uwGline_h_rcsId[] = __UWGLINE_H ; -const char uwGline_uw_rcsId[] = "$Id: uwGline.cc,v 1.4 2009/01/14 12:20:23 ultike Exp $" ; +const char uwGline_uw_rcsId[] = "$Id: uwGline.cc,v 1.5 2009/01/14 13:13:58 ultike Exp $" ; namespace gnuworld { Index: mod.uworld/uwGline.h diff -u mod.uworld/uwGline.h:1.4 mod.uworld/uwGline.h:1.5 --- mod.uworld/uwGline.h:1.4 Wed Jan 14 12:20:23 2009 +++ mod.uworld/uwGline.h Wed Jan 14 13:13:58 2009 @@ -1,14 +1,13 @@ /* uwGline.h */ #ifndef __UWGLINE_H -#define __UWGLINE_H "$Id: uwGline.h,v 1.4 2009/01/14 12:20:23 ultike Exp $" +#define __UWGLINE_H "$Id: uwGline.h,v 1.5 2009/01/14 13:13:58 ultike Exp $" #include <string> #include <list> #include <ctime> -#include "libpq-fe.h" #include "dbHandle.h" namespace gnuworld Index: mod.uworld/uwLog.cc diff -u mod.uworld/uwLog.cc:1.4 mod.uworld/uwLog.cc:1.5 --- mod.uworld/uwLog.cc:1.4 Wed Jan 14 12:20:23 2009 +++ mod.uworld/uwLog.cc Wed Jan 14 13:13:58 2009 @@ -3,7 +3,7 @@ * * log class * - * $Id: uwLog.cc,v 1.4 2009/01/14 12:20:23 ultike Exp $ + * $Id: uwLog.cc,v 1.5 2009/01/14 13:13:58 ultike Exp $ */ #include <sstream> @@ -13,14 +13,13 @@ #include <cstring> #include <cstdlib> -#include "libpq-fe.h" #include "ELog.h" #include "misc.h" #include "uwLog.h" #include "uworld.h" const char uwLog_h_rcsId[] = __uwLog_H ; -const char uwLog_uw_rcsId[] = "$Id: uwLog.cc,v 1.4 2009/01/14 12:20:23 ultike Exp $" ; +const char uwLog_uw_rcsId[] = "$Id: uwLog.cc,v 1.5 2009/01/14 13:13:58 ultike Exp $" ; namespace gnuworld { Index: mod.uworld/uwLog.h diff -u mod.uworld/uwLog.h:1.4 mod.uworld/uwLog.h:1.5 --- mod.uworld/uwLog.h:1.4 Wed Jan 14 12:20:23 2009 +++ mod.uworld/uwLog.h Wed Jan 14 13:13:58 2009 @@ -1,14 +1,13 @@ /* uwLog.h */ #ifndef __uwLog_H -#define __uwLog_H "$Id: uwLog.h,v 1.4 2009/01/14 12:20:23 ultike Exp $" +#define __uwLog_H "$Id: uwLog.h,v 1.5 2009/01/14 13:13:58 ultike Exp $" #include <string> #include <list> #include <ctime> -#include "libpq-fe.h" #include "dbHandle.h" namespace gnuworld Index: mod.uworld/uwUser.h diff -u mod.uworld/uwUser.h:1.6 mod.uworld/uwUser.h:1.7 --- mod.uworld/uwUser.h:1.6 Wed Jan 14 12:20:23 2009 +++ mod.uworld/uwUser.h Wed Jan 14 13:13:58 2009 @@ -3,7 +3,6 @@ #include <string> #include <sys/time.h> -#include "libpq-fe.h" #include "dbHandle.h" #include "iClient.h" Index: mod.uworld/uworld.cc diff -u mod.uworld/uworld.cc:1.11 mod.uworld/uworld.cc:1.12 --- mod.uworld/uworld.cc:1.11 Wed Jan 14 12:20:23 2009 +++ mod.uworld/uworld.cc Wed Jan 14 13:13:58 2009 @@ -21,7 +21,6 @@ #include "server.h" #include "StringTokenizer.h" #include "EConfig.h" -#include "libpq-fe.h" #include "uworldCommands.h" #include "uwUser.h" #include "Network.h" Index: mod.uworld/uworld.h diff -u mod.uworld/uworld.h:1.7 mod.uworld/uworld.h:1.8 --- mod.uworld/uworld.h:1.7 Wed Jan 14 12:20:23 2009 +++ mod.uworld/uworld.h Wed Jan 14 13:13:58 2009 @@ -2,7 +2,7 @@ */ #ifndef __uworld_H -#define __uworld_H "$Id: uworld.h,v 1.7 2009/01/14 12:20:23 ultike Exp $" +#define __uworld_H "$Id: uworld.h,v 1.8 2009/01/14 13:13:58 ultike Exp $" #include <string> #include <vector> @@ -15,7 +15,6 @@ #include "client.h" -#include "libpq-fe.h" #include "dbHandle.h" #include "uworldCommands.h" #include "uwUser.h" ----------------------- End of diff ----------------------- |
From: Matthias C. <ul...@us...> - 2009-01-14 13:10:25
|
Committer : Matthias Crauwels <ul...@us...> CVSROOT : /cvsroot/mod-uworld Module : mod.uworld Commit time: 2009-01-14 12:20:34 UTC Modified files: HELPCommand.cc Makefile.am Makefile.in REMUSERCommand.cc aclocal.m4 configure configure.ac uwAGL.cc uwAGL.h uwGline.cc uwGline.h uwLog.cc uwLog.h uwUser.cc uwUser.h uworld.cc uworld.h autom4te.cache/output.0 autom4te.cache/requests autom4te.cache/traces.0 doc/uworld.example.conf.in Removed files: defs.h.in Log message: Author: Matthias Crauwels <ult...@no...> Log message: * 2009-01-14 - Updates to make it compile on the latest/greatest gnuworld - Updated the configure-scripts and Makefiles - Should work now on any pgsql that gnuworld works on... ---------------------- diff included ---------------------- Index: mod.uworld/HELPCommand.cc diff -u mod.uworld/HELPCommand.cc:1.4 mod.uworld/HELPCommand.cc:1.5 --- mod.uworld/HELPCommand.cc:1.4 Thu Jan 8 01:24:25 2004 +++ mod.uworld/HELPCommand.cc Wed Jan 14 12:20:23 2009 @@ -11,7 +11,7 @@ #include "uworldCommands.h" #include "constants.h" -const char HELPCommand_cc_rcsId[] = "$Id: HELPCommand.cc,v 1.4 2004/01/08 01:24:25 ultike Exp $"; +const char HELPCommand_cc_rcsId[] = "$Id: HELPCommand.cc,v 1.5 2009/01/14 12:20:23 ultike Exp $"; namespace gnuworld { @@ -50,9 +50,9 @@ elog << "HELP> " << theQuery.str(); -ExecStatusType status = bot->SQLDb->Exec( theQuery.str().c_str() ) ; +bool status = bot->SQLDb->Exec( theQuery.str().c_str() ) ; -if( PGRES_TUPLES_OK != status ) +if( !status ) { elog << "HELP> SQL Error: " << bot->SQLDb->ErrorMessage() @@ -62,7 +62,7 @@ // SQL Query succeeded -for (int i = 0 ; i < bot->SQLDb->Tuples(); i++) +for (unsigned int i = 0 ; i < bot->SQLDb->Tuples(); i++) { if( i > 0 ) i--; int level = atoi(bot->SQLDb->GetValue(i, 1)); @@ -70,8 +70,8 @@ while( (i < bot->SQLDb->Tuples()) && (level == atoi(bot->SQLDb->GetValue(i, 1))) ) { bot->SendTo(theClient, PrivMsg, "%s : %s", - bot->SQLDb->GetValue(i, 0), - bot->SQLDb->GetValue(i, 2) ); + bot->SQLDb->GetValue(i, 0).c_str(), + bot->SQLDb->GetValue(i, 2).c_str() ); i++; } bot->SendTo(theClient, PrivMsg, "-"); Index: mod.uworld/Makefile.am diff -u mod.uworld/Makefile.am:1.4 mod.uworld/Makefile.am:1.5 --- mod.uworld/Makefile.am:1.4 Thu Jan 8 12:21:39 2004 +++ mod.uworld/Makefile.am Wed Jan 14 12:20:23 2009 @@ -1,5 +1,5 @@ ## Process this file with automake to produce Makefile.in -# "$Id: Makefile.am,v 1.4 2004/01/08 12:21:39 ultike Exp $" +# "$Id: Makefile.am,v 1.5 2009/01/14 12:20:23 ultike Exp $" lib_LTLIBRARIES = libuworld.la libuworld_la_SOURCES = uworld.cc \ @@ -52,4 +52,5 @@ UNSUSPENDCommand.cc \ WALLOPSCommand.cc \ WHOISCommand.cc -libuworld_la_LDFLAGS = -module -export-dynamic -L@PGSQL_LIB@ -lpq++ +libuworld_la_LDFLAGS = -module -export-dynamic -L$(top_builddir)/../db \ + -lgnuworldDB Index: mod.uworld/Makefile.in diff -u mod.uworld/Makefile.in:1.4 mod.uworld/Makefile.in:1.5 --- mod.uworld/Makefile.in:1.4 Thu Jan 8 12:21:39 2004 +++ mod.uworld/Makefile.in Wed Jan 14 12:20:23 2009 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.7 from Makefile.am. +# Makefile.in generated by automake 1.7.9 from Makefile.am. # @configure_input@ -# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 +# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 # Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -14,7 +14,7 @@ @SET_MAKE@ -# "$Id: Makefile.in,v 1.4 2004/01/08 12:21:39 ultike Exp $" +# "$Id: Makefile.in,v 1.5 2009/01/14 12:20:23 ultike Exp $" srcdir = @srcdir@ top_srcdir = @top_srcdir@ @@ -22,7 +22,7 @@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = .. +top_builddir = . am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ @@ -42,6 +42,7 @@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ +AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -49,30 +50,6 @@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ -COND_DBDIR_FALSE = @COND_DBDIR_FALSE@ -COND_DBDIR_TRUE = @COND_DBDIR_TRUE@ -COND_MODCCONTROL_FALSE = @COND_MODCCONTROL_FALSE@ -COND_MODCCONTROL_TRUE = @COND_MODCCONTROL_TRUE@ -COND_MODCLIENTEXAMPLE_FALSE = @COND_MODCLIENTEXAMPLE_FALSE@ -COND_MODCLIENTEXAMPLE_TRUE = @COND_MODCLIENTEXAMPLE_TRUE@ -COND_MODCLONER_FALSE = @COND_MODCLONER_FALSE@ -COND_MODCLONER_TRUE = @COND_MODCLONER_TRUE@ -COND_MODCSERVICE_FALSE = @COND_MODCSERVICE_FALSE@ -COND_MODCSERVICE_TRUE = @COND_MODCSERVICE_TRUE@ -COND_MODDRONESCAN_FALSE = @COND_MODDRONESCAN_FALSE@ -COND_MODDRONESCAN_TRUE = @COND_MODDRONESCAN_TRUE@ -COND_MODGNUTEST_FALSE = @COND_MODGNUTEST_FALSE@ -COND_MODGNUTEST_TRUE = @COND_MODGNUTEST_TRUE@ -COND_MODNICKSERV_FALSE = @COND_MODNICKSERV_FALSE@ -COND_MODNICKSERV_TRUE = @COND_MODNICKSERV_TRUE@ -COND_MODSCANNER_FALSE = @COND_MODSCANNER_FALSE@ -COND_MODSCANNER_TRUE = @COND_MODSCANNER_TRUE@ -COND_MODSNOOP_FALSE = @COND_MODSNOOP_FALSE@ -COND_MODSNOOP_TRUE = @COND_MODSNOOP_TRUE@ -COND_MODSTATS_FALSE = @COND_MODSTATS_FALSE@ -COND_MODSTATS_TRUE = @COND_MODSTATS_TRUE@ -COND_TESTDIR_FALSE = @COND_TESTDIR_FALSE@ -COND_TESTDIR_TRUE = @COND_TESTDIR_TRUE@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ @@ -80,7 +57,6 @@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ -DB = @DB@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO = @ECHO@ @@ -89,14 +65,17 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +GREP = @GREP@ INCLTDL = @INCLTDL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ -LIBGNUWORLD = @LIBGNUWORLD@ LIBLTDL = @LIBLTDL@ +LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ @@ -106,7 +85,6 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ -NEW_MODS = @NEW_MODS@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ @@ -118,19 +96,20 @@ PGSQL_INCLUDE = @PGSQL_INCLUDE@ PGSQL_LIB = @PGSQL_LIB@ RANLIB = @RANLIB@ +SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ -ac_ct_RANLIB = @ac_ct_RANLIB@ -ac_ct_STRIP = @ac_ct_STRIP@ +ac_ct_F77 = @ac_ct_F77@ 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@ bindir = @bindir@ build = @build@ @@ -139,28 +118,34 @@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ exec_prefix = @exec_prefix@ +glibdir = @glibdir@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ +htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ +localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ +psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ -subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ -threadLib = @threadLib@ lib_LTLIBRARIES = libuworld.la libuworld_la_SOURCES = uworld.cc \ @@ -214,10 +199,12 @@ WALLOPSCommand.cc \ WHOISCommand.cc -libuworld_la_LDFLAGS = -module -export-dynamic -L@PGSQL_LIB@ -lpq++ -subdir = mod.uworld +libuworld_la_LDFLAGS = -module -export-dynamic -L$(top_builddir)/../db \ + -lgnuworldDB + +subdir = . +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/include/defs.h CONFIG_CLEAN_FILES = LTLIBRARIES = $(lib_LTLIBRARIES) @@ -240,7 +227,7 @@ WALLOPSCommand.lo WHOISCommand.lo libuworld_la_OBJECTS = $(am_libuworld_la_OBJECTS) -DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/include +DEFAULT_INCLUDES = -I. -I$(srcdir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles @AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/ACCESSCommand.Plo \ @@ -299,20 +286,32 @@ CXXLINK = $(LIBTOOL) --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ DIST_SOURCES = $(libuworld_la_SOURCES) -DIST_COMMON = README AUTHORS COPYING ChangeLog INSTALL Makefile.am \ - Makefile.in NEWS config.guess config.sub configure configure.ac \ - depcomp install-sh ltmain.sh missing mkinstalldirs +DIST_COMMON = README $(srcdir)/Makefile.in $(srcdir)/configure AUTHORS \ + COPYING ChangeLog INSTALL Makefile.am NEWS aclocal.m4 \ + config.guess config.sub configure configure.ac depcomp \ + install-sh ltmain.sh missing mkinstalldirs SOURCES = $(libuworld_la_SOURCES) all: all-am .SUFFIXES: .SUFFIXES: .cc .lo .o .obj + +am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ + configure.lineno $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4) cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu mod.uworld/Makefile + $(AUTOMAKE) --gnu Makefile Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in $(top_builddir)/config.status - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe) + cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe) + +$(top_builddir)/config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + $(SHELL) ./config.status --recheck +$(srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(srcdir)/configure.ac $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES) + cd $(srcdir) && $(AUTOCONF) + +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.ac + cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) libLTLIBRARIES_INSTALL = $(INSTALL) install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) @@ -401,13 +400,10 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/uworld.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/uworldCommands.Plo@am__quote@ -distclean-depend: - -rm -rf ./$(DEPDIR) - .cc.o: @am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ @am__fastdepCXX_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \ -@am__fastdepCXX_TRUE@ then mv "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \ +@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \ @am__fastdepCXX_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ @am__fastdepCXX_TRUE@ fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @@ -417,19 +413,19 @@ .cc.obj: @am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ -@am__fastdepCXX_TRUE@ -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'`; \ -@am__fastdepCXX_TRUE@ then mv "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \ +@am__fastdepCXX_TRUE@ -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`; \ +@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \ @am__fastdepCXX_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ @am__fastdepCXX_TRUE@ fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'` +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi` .cc.lo: @am__fastdepCXX_TRUE@ if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ @am__fastdepCXX_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \ -@am__fastdepCXX_TRUE@ then mv "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; \ +@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; \ @am__fastdepCXX_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ @am__fastdepCXX_TRUE@ fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @@ -502,14 +498,27 @@ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -top_distdir = .. -distdir = $(top_distdir)/$(PACKAGE)-$(VERSION) +top_distdir = . +distdir = $(PACKAGE)-$(VERSION) + +am__remove_distdir = \ + { test ! -d $(distdir) \ + || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ + && rm -fr $(distdir); }; } + +GZIP_ENV = --best +distuninstallcheck_listfiles = find . -type f -print +distcleancheck_listfiles = find . -type f -print distdir: $(DISTFILES) + $(am__remove_distdir) + mkdir $(distdir) @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,/[^/]*$$,,'`; \ @@ -530,13 +539,81 @@ || exit 1; \ fi; \ done + -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ + ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \ + || chmod -R a+r $(distdir) +dist-gzip: distdir + $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + $(am__remove_distdir) + +dist dist-all: distdir + $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + $(am__remove_distdir) + +# This target untars the dist file and tries a VPATH configuration. Then +# it guarantees that the distribution is self-contained by making another +# tarfile. +distcheck: dist + $(am__remove_distdir) + GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf - + chmod -R a-w $(distdir); chmod a+w $(distdir) + mkdir $(distdir)/_build + mkdir $(distdir)/_inst + chmod a-w $(distdir) + dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ + && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ + && cd $(distdir)/_build \ + && ../configure --srcdir=.. --prefix="$$dc_install_base" \ + $(DISTCHECK_CONFIGURE_FLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) dvi \ + && $(MAKE) $(AM_MAKEFLAGS) check \ + && $(MAKE) $(AM_MAKEFLAGS) install \ + && $(MAKE) $(AM_MAKEFLAGS) installcheck \ + && $(MAKE) $(AM_MAKEFLAGS) uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ + distuninstallcheck \ + && chmod -R a-w "$$dc_install_base" \ + && ({ \ + (cd ../.. && $(mkinstalldirs) "$$dc_destdir") \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ + distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ + } || { rm -rf "$$dc_destdir"; exit 1; }) \ + && rm -rf "$$dc_destdir" \ + && $(MAKE) $(AM_MAKEFLAGS) dist-gzip \ + && rm -f $(distdir).tar.gz \ + && $(MAKE) $(AM_MAKEFLAGS) distcleancheck + $(am__remove_distdir) + @echo "$(distdir).tar.gz is ready for distribution" | \ + sed 'h;s/./=/g;p;x;p;x' +distuninstallcheck: + @cd $(distuninstallcheck_dir) \ + && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ + || { echo "ERROR: files left after uninstall:" ; \ + if test -n "$(DESTDIR)"; then \ + echo " (check DESTDIR support)"; \ + fi ; \ + $(distuninstallcheck_listfiles) ; \ + exit 1; } >&2 +distcleancheck: distclean + @if test '$(srcdir)' = . ; then \ + echo "ERROR: distcleancheck can only run from a VPATH build" ; \ + exit 1 ; \ + fi + @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ + || { echo "ERROR: files left in build directory after distclean:" ; \ + $(distcleancheck_listfiles) ; \ + exit 1; } >&2 check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: $(mkinstalldirs) $(DESTDIR)$(libdir) - install: install-am install-exec: install-exec-am install-data: install-data-am @@ -548,7 +625,7 @@ installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - INSTALL_STRIP_FLAG=-s \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: @@ -556,7 +633,7 @@ clean-generic: distclean-generic: - -rm -f Makefile $(CONFIG_CLEAN_FILES) + -rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -567,9 +644,11 @@ mostlyclean-am distclean: distclean-am - -distclean-am: clean-am distclean-compile distclean-depend \ - distclean-generic distclean-libtool distclean-tags + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-libtool distclean-tags dvi: dvi-am @@ -590,7 +669,10 @@ installcheck-am: maintainer-clean: maintainer-clean-am - + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -rf $(top_srcdir)/autom4te.cache + -rm -rf ./$(DEPDIR) + -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am @@ -609,9 +691,10 @@ uninstall-am: uninstall-info-am uninstall-libLTLIBRARIES .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libLTLIBRARIES clean-libtool ctags distclean \ - distclean-compile distclean-depend distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am info \ + clean-libLTLIBRARIES clean-libtool ctags dist dist-all \ + dist-gzip distcheck distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags \ + distcleancheck distdir distuninstallcheck 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-libLTLIBRARIES install-man install-strip installcheck \ Index: mod.uworld/REMUSERCommand.cc diff -u mod.uworld/REMUSERCommand.cc:1.4 mod.uworld/REMUSERCommand.cc:1.5 --- mod.uworld/REMUSERCommand.cc:1.4 Thu Jan 8 01:24:25 2004 +++ mod.uworld/REMUSERCommand.cc Wed Jan 14 12:20:23 2009 @@ -17,7 +17,7 @@ #include "levels.h" #include "uworld.h" -const char REMUSERCommand_cc_rcsId[] = "$Id: REMUSERCommand.cc,v 1.4 2004/01/08 01:24:25 ultike Exp $"; +const char REMUSERCommand_cc_rcsId[] = "$Id: REMUSERCommand.cc,v 1.5 2009/01/14 12:20:23 ultike Exp $"; namespace gnuworld { @@ -88,9 +88,9 @@ << theQuery.str() << endl; -ExecStatusType status = bot->SQLDb->Exec( theQuery.str().c_str() ) ; +bool status = bot->SQLDb->Exec( theQuery.str().c_str() ) ; -if( PGRES_COMMAND_OK == status ) +if( status ) { bot->SendTo(theClient, PrivMsg, "Remove user %s", bot->removeSqlChars(st[1]).c_str()); } Index: mod.uworld/aclocal.m4 diff -u mod.uworld/aclocal.m4:1.3 mod.uworld/aclocal.m4:1.4 --- mod.uworld/aclocal.m4:1.3 Thu Jul 10 14:22:18 2003 +++ mod.uworld/aclocal.m4 Wed Jan 14 12:20:23 2009 @@ -1,4 +1,4 @@ -# generated automatically by aclocal 1.7.5 -*- Autoconf -*- +# generated automatically by aclocal 1.7.9 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002 # Free Software Foundation, Inc. @@ -163,7 +163,7 @@ # Call AM_AUTOMAKE_VERSION so it can be traced. # This function is AC_REQUIREd by AC_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], - [AM_AUTOMAKE_VERSION([1.7.5])]) + [AM_AUTOMAKE_VERSION([1.7.9])]) # Helper functions for option handling. -*- Autoconf -*- @@ -545,18 +545,32 @@ # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. - echo '#include "conftest.h"' > conftest.c - echo 'int i;' > conftest.h - echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + : > sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) @@ -574,11 +588,12 @@ # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ - source=conftest.c object=conftest.o \ - depfile=conftest.Po tmpdepfile=conftest.TPo \ - $SHELL ./depcomp $depcc -c -o conftest.o conftest.c \ + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && - grep conftest.h conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # (even with -Werror). So we grep stderr for any message @@ -818,32 +833,6 @@ Usually this means the macro was only invoked conditionally.]) fi])]) -# Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*- - -# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc. - -# 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, 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. - -AC_PREREQ([2.52]) - -# serial 6 - -# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. -AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) - # Add --enable-maintainer-mode option to configure. # From Jim Meyering @@ -883,36 +872,9 @@ AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) -# isc-posix.m4 serial 2 (gettext-0.11.2) -dnl Copyright (C) 1995-2002 Free Software Foundation, Inc. -dnl This file is free software, distributed under the terms of the GNU -dnl General Public License. As a special exception to the GNU General -dnl Public License, this file may be distributed as part of a program -dnl that contains a configuration script generated by Autoconf, under -dnl the same distribution terms as the rest of that program. - -# This file is not needed with autoconf-2.53 and newer. Remove it in 2005. - -# This test replaces the one in autoconf. -# Currently this macro should have the same name as the autoconf macro -# because gettext's gettext.m4 (distributed in the automake package) -# still uses it. Otherwise, the use in gettext.m4 makes autoheader -# give these diagnostics: -# configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX -# configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX - -undefine([AC_ISC_POSIX]) - -AC_DEFUN([AC_ISC_POSIX], - [ - dnl This test replaces the obsolescent AC_ISC_POSIX kludge. - AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"]) - ] -) - # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- -# serial 47 AC_PROG_LIBTOOL +# serial 51 AC_PROG_LIBTOOL # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) @@ -1022,7 +984,7 @@ # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. -Xsed='sed -e s/^X//' +Xsed='sed -e 1s/^X//' [sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'] # Same as above, but do not quote variable references. @@ -1042,7 +1004,7 @@ default_ofile=libtool can_build_shared=yes -# All known linkers require a `.a' archive for static linking (except M$VC, +# All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a ltmain="$ac_aux_dir/ltmain.sh" @@ -1062,6 +1024,7 @@ test -z "$AS" && AS=as test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC +test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$DLLTOOL" && DLLTOOL=dlltool test -z "$LD" && LD=ld test -z "$LN_S" && LN_S="ln -s" @@ -1074,22 +1037,24 @@ test -z "$ac_objext" && ac_objext=o # Determine commands to create old-style static archives. -old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' +old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) - old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds" + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" ;; *) - old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds" + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi +_LT_CC_BASENAME([$compiler]) + # Only perform the check for file, if the check method requires it case $deplibs_check_method in file_magic*) @@ -1115,6 +1080,14 @@ [pic_mode=default]) test -z "$pic_mode" && pic_mode=default +# Check if we have a version mismatch between libtool.m4 and ltmain.sh. +# +# Note: This should be in AC_LIBTOOL_SETUP, _after_ $ltmain have been defined. +# We also should do it _before_ AC_LIBTOOL_LANG_C_CONFIG that actually +# calls AC_LIBTOOL_CONFIG and creates libtool. +# +_LT_VERSION_CHECK + # Use C for the default configuration in the libtool script tagname= AC_LIBTOOL_LANG_C_CONFIG @@ -1122,6 +1095,41 @@ ])# AC_LIBTOOL_SETUP +# _LT_VERSION_CHECK +# ----------------- +AC_DEFUN([_LT_VERSION_CHECK], +[AC_MSG_CHECKING([for correct ltmain.sh version]) +if test "x$ltmain" = "x" ; then + AC_MSG_RESULT(no) + AC_MSG_ERROR([ + +*** @<:@Gentoo@:>@ sanity check failed! *** +*** \$ltmain is not defined, please check the patch for consistency! *** +]) +fi +gentoo_lt_version="1.5.24" +gentoo_ltmain_version=`sed -n '/^[[ ]]*VERSION=/{s/^[[ ]]*VERSION=//;p;q;}' "$ltmain"` +if test "x$gentoo_lt_version" != "x$gentoo_ltmain_version" ; then + AC_MSG_RESULT(no) + AC_MSG_ERROR([ + +*** @<:@Gentoo@:>@ sanity check failed! *** +*** libtool.m4 and ltmain.sh have a version mismatch! *** +*** (libtool.m4 = $gentoo_lt_version, ltmain.sh = $gentoo_ltmain_version) *** + +Please run: + + libtoolize --copy --force + +if appropriate, please contact the maintainer of this +package (or your distribution) for help. +]) +else + AC_MSG_RESULT(yes) +fi +])# _LT_VERSION_CHECK + + # _LT_AC_SYS_COMPILER # ------------------- AC_DEFUN([_LT_AC_SYS_COMPILER], @@ -1130,11 +1138,58 @@ # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + # Allow CC to be a program name with arguments. compiler=$CC ])# _LT_AC_SYS_COMPILER +# _LT_CC_BASENAME(CC) +# ------------------- +# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. +AC_DEFUN([_LT_CC_BASENAME], +[for cc_temp in $1""; do + case $cc_temp in + compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; + distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` +]) + + +# _LT_COMPILER_BOILERPLATE +# ------------------------ +# Check for compiler boilerplate output or warnings with +# the simple compiler test code. +AC_DEFUN([_LT_COMPILER_BOILERPLATE], +[AC_REQUIRE([LT_AC_PROG_SED])dnl +ac_outfile=conftest.$ac_objext +echo "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$rm conftest* +])# _LT_COMPILER_BOILERPLATE + + +# _LT_LINKER_BOILERPLATE +# ---------------------- +# Check for linker boilerplate output or warnings with +# the simple link test code. +AC_DEFUN([_LT_LINKER_BOILERPLATE], +[AC_REQUIRE([LT_AC_PROG_SED])dnl +ac_outfile=conftest.$ac_objext +echo "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$rm conftest* +])# _LT_LINKER_BOILERPLATE + + # _LT_AC_SYS_LIBPATH_AIX # ---------------------- # Links a minimal program and checks the executable @@ -1144,12 +1199,20 @@ # If we don't find anything, use the default library path according # to the aix ld manual. AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], -[AC_LINK_IFELSE(AC_LANG_PROGRAM,[ -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'` +[AC_REQUIRE([LT_AC_PROG_SED])dnl +AC_LINK_IFELSE(AC_LANG_PROGRAM,[ +lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\(.*\)$/\1/ + p + } + }' +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'`; fi],[]) +if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +fi],[]) if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ])# _LT_AC_SYS_LIBPATH_AIX @@ -1207,15 +1270,15 @@ # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. -if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH if test -z "$ECHO"; then if test "X${echo_test_string+set}" != Xset; then # find a string as large as possible, as long as the shell can cope with it for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... - if (echo_test_string="`eval $cmd`") 2>/dev/null && - echo_test_string="`eval $cmd`" && + if (echo_test_string=`eval $cmd`) 2>/dev/null && + echo_test_string=`eval $cmd` && (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null then break @@ -1380,17 +1443,21 @@ rm -rf conftest* ;; -x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) +x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ +s390*-*linux*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then - case "`/usr/bin/file conftest.o`" in + case `/usr/bin/file conftest.o` in *32-bit*) case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_i386_fbsd" + ;; x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; - ppc64-*linux*) + ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) @@ -1403,6 +1470,9 @@ ;; *64-bit*) case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_x86_64_fbsd" + ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; @@ -1435,6 +1505,22 @@ CFLAGS="$SAVE_CFLAGS" fi ;; +sparc*-*solaris*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case `/usr/bin/file conftest.o` in + *64-bit*) + case $lt_cv_prog_gnu_ld in + yes*) LD="${LD-ld} -m elf64_sparc" ;; + *) LD="${LD-ld} -64" ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; + AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], [*-*-cygwin* | *-*-mingw* | *-*-pw32*) AC_CHECK_TOOL(DLLTOOL, dlltool, false) @@ -1454,10 +1540,11 @@ # ---------------------------------------------------------------- # Check whether the given compiler option works AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], -[AC_CACHE_CHECK([$1], [$2], +[AC_REQUIRE([LT_AC_PROG_SED]) +AC_CACHE_CHECK([$1], [$2], [$2=no ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) - printf "$lt_simple_compile_test_code" > conftest.$ac_ext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$3" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. @@ -1465,7 +1552,7 @@ # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) @@ -1475,8 +1562,10 @@ echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - if test ! -s conftest.err; then + # So say no if there are warnings other than the usual output. + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi fi @@ -1496,17 +1585,23 @@ # ------------------------------------------------------------ # Check whether the given compiler option works AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], -[AC_CACHE_CHECK([$1], [$2], +[AC_REQUIRE([LT_AC_PROG_SED])dnl +AC_CACHE_CHECK([$1], [$2], [$2=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $3" - printf "$lt_simple_link_test_code" > conftest.$ac_ext + echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The compiler can only warn and ignore the option if not recognized + # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&AS_MESSAGE_LOG_FD + $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + $2=yes + fi else $2=yes fi @@ -1530,7 +1625,7 @@ AC_MSG_CHECKING([the maximum length of command line arguments]) AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl i=0 - testring="ABCD" + teststring="ABCD" case $build_os in msdosdjgpp*) @@ -1559,24 +1654,77 @@ lt_cv_sys_max_cmd_len=8192; ;; - *) - # If test is not a shell built-in, we'll probably end up computing a - # maximum length that is only half of the actual maximum length, but - # we can't tell. - while (test "X"`$CONFIG_SHELL [$]0 --fallback-echo "X$testring" 2>/dev/null` \ - = "XX$testring") >/dev/null 2>&1 && - new_result=`expr "X$testring" : ".*" 2>&1` && - lt_cv_sys_max_cmd_len=$new_result && - test $i != 17 # 1/2 MB should be enough - do - i=`expr $i + 1` - testring=$testring$testring - done - testring= - # Add a significant safety factor because C++ compilers can tack on massive - # amounts of additional arguments before passing them to the linker. - # It appears as though 1/2 is a usable value. - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` + amigaos*) + # On AmigaOS with pdksh, this test takes hours, literally. + # So we just punt and use a minimum line length of 8192. + lt_cv_sys_max_cmd_len=8192; + ;; + + netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) + # This has been around since 386BSD, at least. Likely further. + if test -x /sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` + elif test -x /usr/sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` + else + lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs + fi + # And add a safety zone + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + ;; + + interix*) + # We know the value 262144 and hardcode it with a safety zone (like BSD) + lt_cv_sys_max_cmd_len=196608 + ;; + + osf*) + # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure + # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not + # nice to cause kernel panics so lets avoid the loop below. + # First set a reasonable default. + lt_cv_sys_max_cmd_len=16384 + # + if test -x /sbin/sysconfig; then + case `/sbin/sysconfig -q proc exec_disable_arg_limit` in + *1*) lt_cv_sys_max_cmd_len=-1 ;; + esac + fi + ;; + sco3.2v5*) + lt_cv_sys_max_cmd_len=102400 + ;; + sysv5* | sco5v6* | sysv4.2uw2*) + kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` + if test -n "$kargmax"; then + lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` + else + lt_cv_sys_max_cmd_len=32768 + fi + ;; + *) + lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` + if test -n "$lt_cv_sys_max_cmd_len"; then + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + else + SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} + while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \ + = "XX$teststring") >/dev/null 2>&1 && + new_result=`expr "X$teststring" : ".*" 2>&1` && + lt_cv_sys_max_cmd_len=$new_result && + test $i != 17 # 1/2 MB should be enough + do + i=`expr $i + 1` + teststring=$teststring$teststring + done + teststring= + # Add a significant safety factor because C++ compilers can tack on massive + # amounts of additional arguments before passing them to the linker. + # It appears as though 1/2 is a usable value. + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` + fi ;; esac ]) @@ -1589,7 +1737,7 @@ # _LT_AC_CHECK_DLFCN -# -------------------- +# ------------------ AC_DEFUN([_LT_AC_CHECK_DLFCN], [AC_CHECK_HEADERS(dlfcn.h)dnl ])# _LT_AC_CHECK_DLFCN @@ -1597,7 +1745,7 @@ # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) -# ------------------------------------------------------------------ +# --------------------------------------------------------------------- AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl if test "$cross_compiling" = yes; then : @@ -1663,17 +1811,19 @@ else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } + else + puts (dlerror ()); exit (status); }] EOF if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) 2>/dev/null + (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) $1 ;; x$lt_dlneed_uscore) $2 ;; - x$lt_unknown|x*) $3 ;; + x$lt_dlunknown|x*) $3 ;; esac else : # compilation failed @@ -1685,7 +1835,7 @@ # AC_LIBTOOL_DLOPEN_SELF -# ------------------- +# ---------------------- AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl if test "x$enable_dlopen" != xyes; then @@ -1722,7 +1872,7 @@ lt_cv_dlopen_self=yes ]) ;; - + *) AC_CHECK_FUNC([shl_load], [lt_cv_dlopen="shl_load"], @@ -1756,7 +1906,7 @@ test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" - eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" @@ -1769,7 +1919,7 @@ ]) if test "x$lt_cv_dlopen_self" = xyes; then - LDFLAGS="$LDFLAGS $link_static_flag" + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" AC_CACHE_CHECK([whether a statically linked program can dlopen itself], lt_cv_dlopen_self_static, [dnl _LT_AC_TRY_DLOPEN_SELF( @@ -1801,7 +1951,8 @@ # --------------------------------- # Check to see if options -c and -o are simultaneously supported by compiler AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], -[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl +[AC_REQUIRE([LT_AC_PROG_SED])dnl +AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no @@ -1809,14 +1960,7 @@ mkdir conftest cd conftest mkdir out - printf "$lt_simple_compile_test_code" > conftest.$ac_ext - - # According to Tom Tromey, Ian Lance Taylor reported there are C compilers - # that will create temporary files in the current directory regardless of - # the output directory. Thus, making CWD read-only will cause this test - # to fail, enabling locking or at least warning the user not to do parallel - # builds. - chmod -w . + echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or @@ -1824,7 +1968,7 @@ # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) @@ -1836,13 +1980,18 @@ then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings - if test ! -s out/conftest.err; then + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes fi fi - chmod u+w . - $rm conftest* out/* - rmdir out + chmod u+w . 2>&AS_MESSAGE_LOG_FD + $rm conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files + $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* @@ -1901,8 +2050,8 @@ [AC_MSG_CHECKING([how to hardcode library paths into programs]) _LT_AC_TAGVAR(hardcode_action, $1)= if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \ - test -n "$_LT_AC_TAGVAR(runpath_var $1)" || \ - test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)"="Xyes" ; then + test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \ + test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then # We can hardcode non-existant directories. if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no && @@ -1951,6 +2100,7 @@ darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" + old_striplib="$STRIP -S" AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) @@ -1959,7 +2109,7 @@ *) AC_MSG_RESULT([no]) ;; - esac + esac fi ])# AC_LIBTOOL_SYS_LIB_STRIP @@ -1968,11 +2118,12 @@ # ----------------------------- # PORTME Fill in your ld.so characteristics AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], -[AC_MSG_CHECKING([dynamic linker characteristics]) +[AC_REQUIRE([LT_AC_PROG_SED])dnl +AC_MSG_CHECKING([dynamic linker characteristics]) library_names_spec= libname_spec='lib$name' soname_spec= -shrext=".so" +shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= @@ -1982,20 +2133,58 @@ version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" +m4_if($1,[],[ if test "$GCC" = yes; then - sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then + case $host_os in + darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; + *) lt_awk_arg="/^libraries:/" ;; + esac + lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'` else - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi + # Ok, now we have the path, separated by spaces, we can step through it + # and add multilib dir if necessary. + lt_tmp_lt_search_path_spec= + lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` + for lt_sys_path in $lt_search_path_spec; do + if test -d "$lt_sys_path/$lt_multi_os_dir"; then + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" + else + test -d "$lt_sys_path" && \ + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" + fi + done + lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk ' +BEGIN {RS=" "; FS="/|\n";} { + lt_foo=""; + lt_count=0; + for (lt_i = NF; lt_i > 0; lt_i--) { + if ($lt_i != "" && $lt_i != ".") { + if ($lt_i == "..") { + lt_count++; + } else { + if (lt_count == 0) { + lt_foo="/" $lt_i lt_foo; + } else { + lt_count--; + } + } + } + } + if (lt_foo != "") { lt_freq[[lt_foo]]++; } + if (lt_freq[[lt_foo]] == 1) { print lt_foo; } +}'` + sys_lib_search_path_spec=`echo $lt_search_path_spec` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -fi +fi]) need_lib_prefix=unknown hardcode_into_libs=no @@ -2060,7 +2249,7 @@ amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "(cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a)"; (cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a) || exit 1; done' + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) @@ -2069,7 +2258,7 @@ shlibpath_var=LIBRARY_PATH ;; -bsdi4*) +bsdi[[45]]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' @@ -2085,7 +2274,7 @@ cygwin* | mingw* | pw32*) version_type=windows - shrext=".dll" + shrext_cmds=".dll" need_version=no need_lib_prefix=no @@ -2097,7 +2286,8 @@ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname' + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' @@ -2107,7 +2297,7 @@ cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec="/lib /lib/w32api /usr/lib /usr/local/lib" + sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix @@ -2127,7 +2317,7 @@ ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' ;; esac ;; @@ -2146,18 +2336,13 @@ version_type=darwin need_lib_prefix=no need_version=no - # FIXME: Relying on posixy $() will cause problems for - # cross-compilation, but unfortunately the echo tests do not - # yet detect zsh echo's removal of \ escapes. library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH - shrext='$(test .$module = .yes && echo .so || echo .dylib)' - # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. - if $CC -v 2>&1 | grep 'Apple' >/dev/null ; then - sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` - fi + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' + m4_if([$1], [],[ + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; @@ -2174,9 +2359,25 @@ dynamic_linker=no ;; -freebsd*) - objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` - version_type=freebsd-$objformat +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[[123]]*) objformat=aout ;; + *) objformat=elf ;; + esac + fi + # Handle Gentoo/FreeBSD as it was Linux + case $host_vendor in + gentoo) + version_type=linux ;; + *) + version_type=freebsd-$objformat ;; + esac + case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' @@ -2187,20 +2388,31 @@ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; + linux) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + need_lib_prefix=no + need_version=no + ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; - freebsd3.[01]* | freebsdelf3.[01]*) + freebsd3.[[01]]* | freebsdelf3.[[01]]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; - *) # from 3.2 on + freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ + freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; + *) # from 4.6 on, and DragonFly + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; esac ;; @@ -2220,9 +2432,9 @@ version_type=sunos need_lib_prefix=no need_version=no - case "$host_cpu" in + case $host_cpu in ia64*) - shrext='.so' + shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH @@ -2237,7 +2449,7 @@ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) - shrext='.sl' + shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH @@ -2248,7 +2460,7 @@ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) - shrext='.sl' + shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH @@ -2260,6 +2472,18 @@ postinstall_cmds='chmod 555 $lib' ;; +interix[[3-9]]*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; @@ -2303,7 +2527,7 @@ ;; # This must be Linux ELF. -linux*) +linux* | k*bsd*-gnu) version_type=linux need_lib_prefix=no need_version=no @@ -2317,6 +2541,12 @@ # before this can be enabled. hardcode_into_libs=yes + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + fi + # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, @@ -2335,7 +2565,7 @@ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} ${libname}${shared_ext}' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi @@ -2351,7 +2581,7 @@ shlibpath_overrides_runpath=yes ;; -nto-qnx) +nto-qnx*) version_type=linux need_lib_prefix=no need_version=no @@ -2363,8 +2593,13 @@ openbsd*) version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no - need_version=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH @@ -2384,7 +2619,7 @@ os2*) libname_spec='$name' - shrext=".dll" + shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' @@ -2402,11 +2637,8 @@ sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; -sco3.2v5*) - version_type=osf - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH +rdos*) + dynamic_linker=no ;; solaris*) @@ -2434,7 +2666,7 @@ need_version=yes ;; -sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) +sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' @@ -2467,6 +2699,29 @@ fi ;; +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + if test "$with_gnu_ld" = yes; then + sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' + shlibpath_overrides_runpath=no + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + shlibpath_overrides_runpath=yes + case $host_os in + sco3.2v5*) + sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" + ;; + esac + fi + sys_lib_dlsearch_path_spec='/usr/lib' + ;; + uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' @@ -2480,13 +2735,19 @@ esac AC_MSG_RESULT([$dynamic_linker]) test "$dynamic_linker" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi ])# AC_LIBTOOL_SYS_DYNAMIC_LINKER # _LT_AC_TAGCONFIG # ---------------- AC... [truncated message content] |
From: Matthias C. <ul...@us...> - 2005-04-07 21:36:49
|
Committer : Matthias Crauwels <ul...@us...> CVSROOT : /cvsroot/mod-uworld Module : mod.uworld Commit time: 2005-04-07 21:36:43 UTC Modified files: uworld.cc Log message: Author: Matthias Crauwels <ul...@us...> Log message: * it works on ircu, asuka cores :s ---------------------- diff included ---------------------- Index: mod.uworld/uworld.cc diff -u mod.uworld/uworld.cc:1.9 mod.uworld/uworld.cc:1.10 --- mod.uworld/uworld.cc:1.9 Thu Apr 7 14:23:16 2005 +++ mod.uworld/uworld.cc Thu Apr 7 14:36:33 2005 @@ -413,12 +413,12 @@ } Gline* newG = static_cast< Gline* >(Data1); - ConsoleWall("DEBUG: I'm tring to add a gline for host %s", newG->getUserHost().c_str()); + //ConsoleWall("DEBUG: I'm tring to add a gline for host %s", newG->getUserHost().c_str()); uwGline* newGline = findGline(newG->getUserHost()); if(!newGline) { - ConsoleWall("DEBUG: Gline not yet known, need to add it"); + //ConsoleWall("DEBUG: Gline not yet known, need to add it"); newGline = new (std::nothrow) uwGline(SQLDb); assert (newGline != NULL); @@ -438,15 +438,15 @@ //need to load the id newGline->loadData(newGline->getHost()); - ConsoleWall("DEBUG: Gline (id=%s, host=%s, addedby=%s level=%d", newGline->getId().c_str(), - newGline->getHost().c_str(), - newGline->getAddedBy().c_str(), - newGline->getAddedLevel()); + //ConsoleWall("DEBUG: Gline (id=%s, host=%s, addedby=%s level=%d", newGline->getId().c_str(), + // newGline->getHost().c_str(), + // newGline->getAddedBy().c_str(), + // newGline->getAddedLevel()); addGline(newGline); } else { - ConsoleWall("DEBUG: Known gline, just refreshing!"); + //ConsoleWall("DEBUG: Known gline, just refreshing!"); } break; } @@ -462,8 +462,8 @@ if(newGline) { - ConsoleWall("DEBUG: this gline level = %d", newGline->getAddedLevel()); - ConsoleWall("DEBUG: remote gline level = %d", levels::gline::remotegline); + //ConsoleWall("DEBUG: this gline level = %d", newGline->getAddedLevel()); + //ConsoleWall("DEBUG: remote gline level = %d", levels::gline::remotegline); if (newGline->getAddedLevel() <= levels::gline::remotegline) { remGline(newGline); @@ -853,13 +853,11 @@ uwGline* uworld::findGline( const string& glineHostName ) { - ConsoleWall("DEBUG: searching for %s (%d)", glineHostName.c_str(), glineList.size()); + //ConsoleWall("DEBUG: searching for %s (%d)", glineHostName.c_str(), glineList.size()); glineListType::iterator ptr = glineList.find(glineHostName); if(ptr != glineList.end()) { - //for(glineListType::iterator ptr = glineList.begin(); ptr != glineList.end(); ptr++) { - ConsoleWall("DEBUG: host %s", ptr->first.c_str()); - //if( ptr->first == glineHostName ) - return ptr->second; + //ConsoleWall("DEBUG: host %s", ptr->first.c_str()); + return ptr->second; } return NULL; } ----------------------- End of diff ----------------------- |
From: Matthias C. <ul...@us...> - 2005-04-07 21:23:36
|
Committer : Matthias Crauwels <ul...@us...> CVSROOT : /cvsroot/mod-uworld Module : mod.uworld Commit time: 2005-04-07 21:23:27 UTC Modified files: uworld.cc uworld.h Log message: Author: Matthias Crauwels <ult...@wo...> Log message: * strange things are happening with glines this patch needs some torough testing ---------------------- diff included ---------------------- Index: mod.uworld/uworld.cc diff -u mod.uworld/uworld.cc:1.8 mod.uworld/uworld.cc:1.9 --- mod.uworld/uworld.cc:1.8 Wed Jul 14 09:27:08 2004 +++ mod.uworld/uworld.cc Thu Apr 7 14:23:16 2005 @@ -368,1249 +368,1279 @@ void uworld::OnEvent( const eventType& theEvent, - void* Data1, void* Data2, void* Data3, void* Data4 ) + void* Data1, void* Data2, void* Data3, void* Data4 ) { -switch( theEvent ) - { - case EVT_QUIT: - case EVT_KILL: - { - /* - * The user disconnected, - * remove his authentication - * and login data - */ - - iClient* tmpClient = (theEvent == EVT_QUIT) ? - static_cast< iClient* >( Data1 ) : - static_cast< iClient* >( Data2 ) ; - - uwUser* tmpUser = isAuthed(tmpClient); - if(tmpUser) - { - elog << "Deauth " << tmpUser->getUserName().c_str() - << "because he quited / killed!\n"; - deAuthUser(tmpClient); - } - - break ; - } // case EVT_KILL/case EVT_QUIT - case EVT_OPER: - { - iClient* tmpUser = (theEvent == EVT_OPER) ? - static_cast< iClient* >( Data1 ) : - static_cast< iClient* >( Data2 ) ; - - iServer* tmpServer = Network->findServer( tmpUser->getIntYY() ) ; - ConsoleWall("%s \002OPR\002 on %s", tmpUser->getNickUserHost().c_str(), tmpServer->getName().c_str()); - break; - } - case EVT_GLINE: - { - if(!Data1) //TODO: find out how we get this - { - return; - } - - Gline* newG = static_cast< Gline* >(Data1); - - uwGline* newGline = findGline(newG->getUserHost()); - if(!newGline) - { - newGline = new (std::nothrow) uwGline(SQLDb); - assert (newGline != NULL); - iServer* serverAdded = Network->findServer(newG->getSetBy()); - if(serverAdded) { - newGline->setAddedBy(serverAdded->getName()); - } else { - newGline->setAddedBy("Unknown"); - } - newGline->setAddedOn(::time(0)); - //newGline->setLastUpdated(::time(0)); - newGline->setHost(newG->getUserHost()); - newGline->setAddedLevel(levels::gline::remotegline); - newGline->setReason(newG->getReason()); - newGline->setExpires(newG->getExpiration()); - newGline->Insert(); - //need to load the id - newGline->loadData(newGline->getHost()); - addGline(newGline); - } - break; - } - case EVT_REMGLINE: - { - if(!Data1) - { - return ; - } - - Gline* newG = static_cast< Gline* >(Data1); - uwGline* newGline = findGline(newG->getUserHost()); - if(newGline) - if (newGline->getAddedLevel() <= levels::gline::remotegline) - { - remGline(newGline); - newGline->Delete(); - delete newGline; - - } else { - int gLength = newGline->getExpires() - newGline->getAddedOn(); - newGline->setAddedBy(MyUplink->getName()); - newGline->setAddedOn(::time(0)); - MyUplink->setGline(MyUplink->getName(), - newGline->getHost(), - newGline->getReason(), - gLength); - } - break; - } - case EVT_BURST_CMPLT: - { - refreshGlines(); - burstGlines(); - addNet(); - numLogs = 0; - break; - } - case EVT_NETJOIN: - { - if(!Data1 || !Data2) - { - return; - } - iServer* newServer = static_cast< iServer* >(Data1); - iServer* uplinkServer = static_cast< iServer* >(Data2); + switch( theEvent ) + { + case EVT_QUIT: + case EVT_KILL: + { + /* + * The user disconnected, + * remove his authentication + * and login data + */ + + iClient* tmpClient = (theEvent == EVT_QUIT) ? + static_cast< iClient* >( Data1 ) : + static_cast< iClient* >( Data2 ) ; + + uwUser* tmpUser = isAuthed(tmpClient); + if(tmpUser) + { + elog << "Deauth " << tmpUser->getUserName().c_str() + << "because he quited / killed!\n"; + deAuthUser(tmpClient); + } + + break ; + } // case EVT_KILL/case EVT_QUIT + case EVT_OPER: + { + iClient* tmpUser = (theEvent == EVT_OPER) ? + static_cast< iClient* >( Data1 ) : + static_cast< iClient* >( Data2 ) ; + + iServer* tmpServer = Network->findServer( tmpUser->getIntYY() ) ; + ConsoleWall("%s \002OPR\002 on %s", tmpUser->getNickUserHost().c_str(), tmpServer->getName().c_str()); + break; + } + case EVT_GLINE: + { + if(!Data1) //TODO: find out how we get this + { + return; + } + + Gline* newG = static_cast< Gline* >(Data1); + ConsoleWall("DEBUG: I'm tring to add a gline for host %s", newG->getUserHost().c_str()); + + uwGline* newGline = findGline(newG->getUserHost()); + if(!newGline) + { + ConsoleWall("DEBUG: Gline not yet known, need to add it"); + + newGline = new (std::nothrow) uwGline(SQLDb); + assert (newGline != NULL); + iServer* serverAdded = Network->findServer(newG->getSetBy()); + if(serverAdded) { + newGline->setAddedBy(serverAdded->getName()); + } else { + newGline->setAddedBy("Unknown"); + } + newGline->setAddedOn(::time(0)); + //newGline->setLastUpdated(::time(0)); + newGline->setHost(newG->getUserHost()); + newGline->setAddedLevel(levels::gline::remotegline); + newGline->setReason(newG->getReason()); + newGline->setExpires(newG->getExpiration()); + newGline->Insert(); + //need to load the id + newGline->loadData(newGline->getHost()); + + ConsoleWall("DEBUG: Gline (id=%s, host=%s, addedby=%s level=%d", newGline->getId().c_str(), + newGline->getHost().c_str(), + newGline->getAddedBy().c_str(), + newGline->getAddedLevel()); + + addGline(newGline); + + } else { + ConsoleWall("DEBUG: Known gline, just refreshing!"); + } + break; + } + case EVT_REMGLINE: + { + if(!Data1) + { + return ; + } + + Gline* newG = static_cast< Gline* >(Data1); + uwGline* newGline = findGline(newG->getUserHost()); + + if(newGline) + { + ConsoleWall("DEBUG: this gline level = %d", newGline->getAddedLevel()); + ConsoleWall("DEBUG: remote gline level = %d", levels::gline::remotegline); + if (newGline->getAddedLevel() <= levels::gline::remotegline) + { + remGline(newGline); + newGline->Delete(); + delete newGline; - addServer(newServer); - NetWall("NETJOIN: newserver: %s uplink: %s", newServer->getName().c_str(), -uplinkServer->getName().c_str()); - break; - } - case EVT_NETBREAK: - { - if(!Data1) - { - return ; - } - iServer* squitServer = static_cast< iServer* >(Data1); - string reason; - if(Data3) reason = *(static_cast< string* >(Data3)); - - splitServer(squitServer, reason); - NetWall("NETBREAK: server: %s reason: %s", squitServer->getName().c_str(), reason.c_str() ); - break; - } + } else { + int gLength = newGline->getExpires() - newGline->getAddedOn(); + newGline->setAddedBy(MyUplink->getName()); + newGline->setAddedOn(::time(0)); + MyUplink->setGline(MyUplink->getName(), + newGline->getHost(), + newGline->getReason(), + gLength); + } + } + break; + } + case EVT_BURST_CMPLT: + { + refreshGlines(); + burstGlines(); + addNet(); + numLogs = 0; + break; + } + case EVT_NETJOIN: + { + if(!Data1 || !Data2) + { + return; + } + iServer* newServer = static_cast< iServer* >(Data1); + iServer* uplinkServer = static_cast< iServer* >(Data2); - case EVT_NICK: - { - if(!Data1) - { - return ; - } - iClient* newClient = static_cast< iClient*>(Data1); - matchAGL(newClient); - break; - } - } //switch() -xClient::OnEvent( theEvent, Data1, Data2, Data3, Data4 ) ; + addServer(newServer); + NetWall("NETJOIN: newserver: %s uplink: %s", newServer->getName().c_str(), + uplinkServer->getName().c_str()); + break; + } + case EVT_NETBREAK: + { + if(!Data1) + { + return ; + } + iServer* squitServer = static_cast< iServer* >(Data1); + string reason; + if(Data3) reason = *(static_cast< string* >(Data3)); + + splitServer(squitServer, reason); + NetWall("NETBREAK: server: %s reason: %s", squitServer->getName().c_str(), reason.c_str() ); + break; + } + + case EVT_NICK: + { + if(!Data1) + { + return ; + } + iClient* newClient = static_cast< iClient*>(Data1); + matchAGL(newClient); + break; + } + } //switch() + xClient::OnEvent( theEvent, Data1, Data2, Data3, Data4 ) ; } // onEvent /** * Handler for registered channel events. */ void uworld::OnChannelEvent( const channelEventType& whichEvent, - Channel* theChan, - void* data1, void* data2, void* data3, void* data4 ) + Channel* theChan, + void* data1, void* data2, void* data3, void* data4 ) { - -iClient* theClient = 0 ; - -switch( whichEvent ) - { - case EVT_JOIN: - { - /* - * We should only ever recieve events for registered channels, or those - * that are 'pending'. If we do get past the pending check, there must be - * some kind of database inconsistancy. - */ - - theClient = static_cast< iClient* >( data1 ) ; - - ChannelUser* mySelf = theChan->findUser(getInstance()); - if(theClient->isOper() && mySelf->isModeO()) - Write("%s%s M %s +o %s", getCharYY().c_str(), getCharXXX().c_str(), theChan->getName().c_str(), - theClient->getCharYYXXX().c_str()); - //TODO: find out why this doesn't work properly - //Op(theChan, theClient); - break; - } - default: - break; - } // switch() - -xClient::OnChannelEvent( whichEvent, theChan, - data1, data2, data3, data4 ); + + iClient* theClient = 0 ; + + switch( whichEvent ) + { + case EVT_JOIN: + { + /* + * We should only ever recieve events for registered channels, or those + * that are 'pending'. If we do get past the pending check, there must be + * some kind of database inconsistancy. + */ + + theClient = static_cast< iClient* >( data1 ) ; + + ChannelUser* mySelf = theChan->findUser(getInstance()); + if(theClient->isOper() && mySelf->isModeO()) + Write("%s%s M %s +o %s", getCharYY().c_str(), getCharXXX().c_str(), theChan->getName().c_str(), + theClient->getCharYYXXX().c_str()); + //TODO: find out why this doesn't work properly + //Op(theChan, theClient); + break; + } + default: + break; + } // switch() + + xClient::OnChannelEvent( whichEvent, theChan, + data1, data2, data3, data4 ); } void uworld::OnTimer(xServer::timerID timer_id, void*) { - -if (timer_id == expiredTimer) - { - refreshGlines(); -// refreshIgnores(); - refreshSuspends(); - expiredTimer = MyUplink->RegisterTimer(::time(0) + ExpiredInterval, - this,NULL); - } -else if(timer_id == dbConnectionCheck) - { - checkDbConnection(); - dbConnectionCheck = MyUplink->RegisterTimer(::time(0) + dbConnectionTimer,this,NULL); - } + + if (timer_id == expiredTimer) + { + refreshGlines(); + //refreshIgnores(); + refreshSuspends(); + expiredTimer = MyUplink->RegisterTimer(::time(0) + ExpiredInterval, + this,NULL); + } + else if(timer_id == dbConnectionCheck) + { + checkDbConnection(); + dbConnectionCheck = MyUplink->RegisterTimer(::time(0) + dbConnectionTimer,this,NULL); + } } uwUser* uworld::isAuthed(iClient* theClient) { -uwUser* tmpUser = static_cast< uwUser* >(theClient->getCustomData(this)); -if(!tmpUser) return 0; -return tmpUser; + uwUser* tmpUser = static_cast< uwUser* >(theClient->getCustomData(this)); + if(!tmpUser) return 0; + return tmpUser; } iClient* uworld::isAuthed(uwUser* theUser) { -iClient* tmpClient = theUser->getClient(); -if(!tmpClient) return 0; -return tmpClient; + iClient* tmpClient = theUser->getClient(); + if(!tmpClient) return 0; + return tmpClient; } short int uworld::getOperLevel(iClient* theClient) { -uwUser* tmpUser = isAuthed(theClient); - -if(!tmpUser) - if(theClient->isOper() ) { - return levels::basicOper ; - } else { - return 0; - } - -return tmpUser->getAccess(); + uwUser* tmpUser = isAuthed(theClient); + + if(!tmpUser) + if(theClient->isOper() ) { + return levels::basicOper ; + } else { + return 0; + } + + return tmpUser->getAccess(); } void uworld::authUser( iClient* theClient, uwUser* theUser) { -theClient->setCustomData(this, static_cast< void* >(theUser)); -theUser->setClient(theClient); + theClient->setCustomData(this, static_cast< void* >(theUser)); + theUser->setClient(theClient); } void uworld::deAuthUser( iClient* theClient) { -uwUser* tmpUser = isAuthed(theClient); - -if(!tmpUser) return; - -theClient->removeCustomData(this); -tmpUser->setClient(0); + uwUser* tmpUser = isAuthed(theClient); + + if(!tmpUser) return; + + theClient->removeCustomData(this); + tmpUser->setClient(0); } void uworld::deAuthUser( uwUser* theUser) { -iClient* tmpClient = isAuthed(theUser); - -if(!tmpClient) return; - -tmpClient->removeCustomData(this); -theUser->setClient(0); + iClient* tmpClient = isAuthed(theUser); + + if(!tmpClient) return; + + tmpClient->removeCustomData(this); + theUser->setClient(0); } uwUser* uworld::getUser( const string& name ) { -userListType::iterator ptr = userList.find(name); -if(ptr != userList.end()) return ptr->second; -return 0; + userListType::iterator ptr = userList.find(name); + if(ptr != userList.end()) return ptr->second; + return 0; } const string uworld::removeSqlChars(const string& Msg) { -string NewString; - -for(string::const_iterator ptr = Msg.begin(); ptr != Msg.end() ; ++ptr) - { - if(*ptr == ';') - { - NewString += ' '; - } - else if(*ptr == '\'') - { - NewString += "\\\047"; - } - else if(*ptr == '\\') - { - NewString += "\\\134"; - } - else - { - NewString += *ptr; - } - } -return NewString; - + string NewString; + + for(string::const_iterator ptr = Msg.begin(); ptr != Msg.end() ; ++ptr) + { + if(*ptr == ';') + { + NewString += ' '; + } + else if(*ptr == '\'') + { + NewString += "\\\047"; + } + else if(*ptr == '\\') + { + NewString += "\\\134"; + } + else + { + NewString += *ptr; + } + } + return NewString; + } string uworld::CryptPass( const string& pass ) { -StringTokenizer st( pass ) ; - -const char validChars[] = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.$*_"; - -string salt; - -for ( unsigned short int i = 0 ; i < 8 ; i++ ) - { - int randNo = 1+(int) (64.0*rand()/(RAND_MAX+1.0)); - salt += validChars[randNo]; - } - -/* Work out a MD5 hash of our salt + password */ - -md5 hash; // MD5 hash algorithm object. -md5Digest digest; // MD5Digest algorithm object. - -stringstream output; -string newPass; -newPass = salt + st.assemble(0); - -hash.update( (const unsigned char *)newPass.c_str(), newPass.size() ); -hash.report( digest ); - -/* Convert to Hex */ -int data[ MD5_DIGEST_LENGTH ] = { 0 } ; -for( size_t ii = 0; ii < MD5_DIGEST_LENGTH; ii++ ) - { - data[ii] = digest[ii]; - } - -output << std::hex; -output.fill('0'); -for( size_t ii = 0; ii < MD5_DIGEST_LENGTH; ii++ ) - { - output << std::setw(2) << data[ii]; - } -output << ends; - -return string( salt + output.str() ); + StringTokenizer st( pass ) ; + + const char validChars[] = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.$*_"; + + string salt; + + for ( unsigned short int i = 0 ; i < 8 ; i++ ) + { + int randNo = 1+(int) (64.0*rand()/(RAND_MAX+1.0)); + salt += validChars[randNo]; + } + + /* Work out a MD5 hash of our salt + password */ + + md5 hash; // MD5 hash algorithm object. + md5Digest digest; // MD5Digest algorithm object. + + stringstream output; + string newPass; + newPass = salt + st.assemble(0); + + hash.update( (const unsigned char *)newPass.c_str(), newPass.size() ); + hash.report( digest ); + + /* Convert to Hex */ + int data[ MD5_DIGEST_LENGTH ] = { 0 } ; + for( size_t ii = 0; ii < MD5_DIGEST_LENGTH; ii++ ) + { + data[ii] = digest[ii]; + } + + output << std::hex; + output.fill('0'); + for( size_t ii = 0; ii < MD5_DIGEST_LENGTH; ii++ ) + { + output << std::setw(2) << data[ii]; + } + output << ends; + + return string( salt + output.str() ); } bool uworld::InvMe( iClient* theClient ) { -//Invite(theClient, channel); -char buf[ 512 ] = { 0 } ; - -// Invite buffer -sprintf( buf, "%s I %s :%s", - getCharYYXXX().c_str(), - theClient->getNickName().c_str(), - msgChannel.c_str() ) ; -QuoteAsServer( buf ) ; - -return true; + //Invite(theClient, channel); + char buf[ 512 ] = { 0 } ; + + // Invite buffer + sprintf( buf, "%s I %s :%s", + getCharYYXXX().c_str(), + theClient->getNickName().c_str(), + msgChannel.c_str() ) ; + QuoteAsServer( buf ) ; + + return true; } void uworld::MsgChanLog(const char *Msg, ... ) { -if(!Network->findChannel(msgChannel)) - { - return; - } - -char buffer[ 1024 ] = { 0 } ; -va_list list; - -va_start( list, Msg ) ; -vsprintf( buffer, Msg, list ) ; -va_end( list ) ; - -xClient::Notice((Network->findChannel(msgChannel))->getName(),"%s", buffer); -ConsoleWall(buffer); + if(!Network->findChannel(msgChannel)) + { + return; + } + + char buffer[ 1024 ] = { 0 } ; + va_list list; + + va_start( list, Msg ) ; + vsprintf( buffer, Msg, list ) ; + va_end( list ) ; + + xClient::Notice((Network->findChannel(msgChannel))->getName(),"%s", buffer); + ConsoleWall(buffer); } void uworld::ConsoleWall(const char *Msg, ...) { - -char buffer[ 1024 ] = { 0 } ; -va_list list; - -va_start( list, Msg ) ; -vsprintf( buffer, Msg, list ) ; -va_end( list ) ; - -iClient* thisClient; -for( userListType::const_iterator ptr = userList.begin(); ptr != userList.end(); ++ptr ) - { - thisClient = isAuthed(ptr->second); - if( thisClient && ptr->second->getFlag(uwUser::CONSOLE) ) - { - //Write("%s%s O %s :%s\n", getCharYY().c_str(), getCharXXX().c_str(), ->getNumeric().c_str(), buffer); - Notice(thisClient, "%s", buffer); - } - } + + char buffer[ 1024 ] = { 0 } ; + va_list list; + + va_start( list, Msg ) ; + vsprintf( buffer, Msg, list ) ; + va_end( list ) ; + + iClient* thisClient; + for( userListType::const_iterator ptr = userList.begin(); ptr != userList.end(); ++ptr ) + { + thisClient = isAuthed(ptr->second); + if( thisClient && ptr->second->getFlag(uwUser::CONSOLE) ) + { + //Write("%s%s O %s :%s\n", getCharYY().c_str(), getCharXXX().c_str(), ->getNumeric().c_str(), buffer); + Notice(thisClient, "%s", buffer); + } + } } void uworld::NetWall(const char *Msg, ...) { -// TODO: implement + // TODO: implement } void uworld::SendTo(iClient* theClient, bool PrivMsg, const string& theMessage) { - -if( PrivMsg ) { - Message(theClient, theMessage); -} else { - Notice(theClient, theMessage); -} - + + if( PrivMsg ) { + Message(theClient, theMessage); + } else { + Notice(theClient, theMessage); + } + } void uworld::SendTo(iClient* theClient, bool PrivMsg, const char *Msg, ...) { - -char buffer[ 1024 ] = { 0 } ; -va_list list; - -va_start( list, Msg ) ; -vsprintf( buffer, Msg, list ) ; -va_end( list ) ; - -if( PrivMsg ) { - Write("%s%s P %s :%s", getCharYY().c_str(), getCharXXX().c_str(), theClient->getCharYYXXX().c_str(), buffer); -} else { - Write("%s%s O %s :%s", getCharYY().c_str(), getCharXXX().c_str(), theClient->getCharYYXXX().c_str(), buffer); -} - + + char buffer[ 1024 ] = { 0 } ; + va_list list; + + va_start( list, Msg ) ; + vsprintf( buffer, Msg, list ) ; + va_end( list ) ; + + if( PrivMsg ) { + Write("%s%s P %s :%s", getCharYY().c_str(), getCharXXX().c_str(), theClient->getCharYYXXX().c_str(), buffer); + } else { + Write("%s%s O %s :%s", getCharYY().c_str(), getCharXXX().c_str(), theClient->getCharYYXXX().c_str(), buffer); + } + } bool uworld::SendPrivmsg(iClient* theClient) { -uwUser* theUser = isAuthed(theClient); - -if( !theUser ) - return false; - -if(!theUser->getFlag(uwUser::PRIVMSG) ) - return false; - -return true; + uwUser* theUser = isAuthed(theClient); + + if( !theUser ) + return false; + + if(!theUser->getFlag(uwUser::PRIVMSG) ) + return false; + + return true; } void uworld::addGline( uwGline* tmpGline) { -bool addedAlready = false; - -glineListType::iterator ptr = glineList.find(tmpGline->getHost()); -if(ptr != glineList.end()) { - if(ptr->second != tmpGline) { - glineList.erase(tmpGline->getHost()); - delete ptr->second; - } else { addedAlready = true; } -} - -if(!addedAlready) //if we found the gline we need to add, no need to add it - glineList.insert(glineListType::value_type(tmpGline->getHost(), tmpGline) ); + bool addedAlready = false; + + glineListType::iterator ptr = glineList.find(tmpGline->getHost()); + if(ptr != glineList.end()) { + if(ptr->second != tmpGline) { + glineList.erase(tmpGline->getHost()); + delete ptr->second; + } else { addedAlready = true; } + } + + if(!addedAlready) //if we found the gline we need to add, no need to add it + { + ConsoleWall("Adding gline for %s", tmpGline->getHost().c_str()); + glineList.insert(glineListType::value_type(tmpGline->getHost(), tmpGline) ); + } } void uworld::remGline( uwGline* tmpGline) { -glineListType::iterator ptr = glineList.find(tmpGline->getHost()); -if(ptr != glineList.end()) { - glineList.erase(tmpGline->getHost()); -} + glineListType::iterator ptr = glineList.find(tmpGline->getHost()); + if(ptr != glineList.end()) { + glineList.erase(tmpGline->getHost()); + } } -uwGline* uworld::findGline( const string& hostName ) +uwGline* uworld::findGline( const string& glineHostName ) { -glineListType::iterator ptr = glineList.find(hostName); -return ptr->second; + ConsoleWall("DEBUG: searching for %s (%d)", glineHostName.c_str(), glineList.size()); + glineListType::iterator ptr = glineList.find(glineHostName); + if(ptr != glineList.end()) { + //for(glineListType::iterator ptr = glineList.begin(); ptr != glineList.end(); ptr++) { + ConsoleWall("DEBUG: host %s", ptr->first.c_str()); + //if( ptr->first == glineHostName ) + return ptr->second; + } + return NULL; } + void uworld::checkDbConnection() { - -if(SQLDb->Status() == CONNECTION_BAD) //Check if the connection had died - { - unsigned int connectCount = 0; - connectRetry = 5; - - delete(SQLDb); - updateSqldb(NULL); - MsgChanLog("PANIC! - The Connection With The Db Was Lost"); - MsgChanLog("Attempting to reconnect, Attempt %d out of %d" - ,connectCount+1,connectRetry+1); - string Query = "host=" + sqlHost + " dbname=" + sqlDb + " port=" + sqlPort; - if (strcasecmp(sqlUser,"''")) - { - Query += (" user=" + sqlUser); - } - - if (strcasecmp(sqlPass,"''")) - { - Query += (" password=" + sqlPass); - } - SQLDb = new (std::nothrow) cmDatabase(Query.c_str()); - assert(SQLDb != NULL); - - if(SQLDb->ConnectionBad()) - { - ++connectCount; - if(connectCount > connectRetry) - { - MsgChanLog("Cant connect to the database, quiting"); - ::exit(1); - } - else - { - MsgChanLog("Attempt was failed"); - } - } - else - { - MsgChanLog("The PANIC is over, db connection restored"); - updateSqldb(SQLDb); - connectCount = 0; - } - } - - + + if(SQLDb->Status() == CONNECTION_BAD) //Check if the connection had died + { + unsigned int connectCount = 0; + connectRetry = 5; + + delete(SQLDb); + updateSqldb(NULL); + MsgChanLog("PANIC! - The Connection With The Db Was Lost"); + MsgChanLog("Attempting to reconnect, Attempt %d out of %d" + ,connectCount+1,connectRetry+1); + string Query = "host=" + sqlHost + " dbname=" + sqlDb + " port=" + sqlPort; + if (strcasecmp(sqlUser,"''")) + { + Query += (" user=" + sqlUser); + } + + if (strcasecmp(sqlPass,"''")) + { + Query += (" password=" + sqlPass); + } + SQLDb = new (std::nothrow) cmDatabase(Query.c_str()); + assert(SQLDb != NULL); + + if(SQLDb->ConnectionBad()) + { + ++connectCount; + if(connectCount > connectRetry) + { + MsgChanLog("Cant connect to the database, quiting"); + ::exit(1); + } + else + { + MsgChanLog("Attempt was failed"); + } + } + else + { + MsgChanLog("The PANIC is over, db connection restored"); + updateSqldb(SQLDb); + connectCount = 0; + } + } + + } void uworld::updateSqldb(PgDatabase* _SQLDb) { - -for(glineListType::iterator ptr = glineList.begin();ptr != glineList.end();++ptr) - { - ptr->second->setSqldb(_SQLDb); - } - -for(logListType::iterator ptr = logList.begin();ptr != logList.end();++ptr) - { - (*ptr)->setSqldb(_SQLDb); - } + + for(glineListType::iterator ptr = glineList.begin();ptr != glineList.end();++ptr) + { + ptr->second->setSqldb(_SQLDb); + } + + for(logListType::iterator ptr = logList.begin();ptr != logList.end();++ptr) + { + (*ptr)->setSqldb(_SQLDb); + } } void uworld::refreshGlines() { - -int totalFound = 0; -int badchansFound = 0; - -for(glineListType::iterator ptr = glineList.begin();ptr != glineList.end(); ptr++) - { - uwGline* tGline = ptr->second; - if( tGline->getExpires() <= ::time(0) && tGline->getExpires() != 0 ) - { - if( tGline->getHost().substr(0,1) != "#") ++totalFound; - else ++badchansFound; - - //remove the gline from the database - tGline->Delete(); - glineList.erase(tGline->getHost()); - delete tGline; - } - } // for - -if(totalFound > 0) - MsgChanLog("[Refresh Glines] - %d expired\n",totalFound); -if(badchansFound > 0) - MsgChanLog("[Refresh Badchans] - %d expired\n",badchansFound); + + int totalFound = 0; + int badchansFound = 0; + + for(glineListType::iterator ptr = glineList.begin();ptr != glineList.end(); ptr++) + { + uwGline* tGline = ptr->second; + if( tGline->getExpires() <= ::time(0) && tGline->getExpires() != 0 ) + { + if( tGline->getHost().substr(0,1) != "#") ++totalFound; + else ++badchansFound; + + //remove the gline from the database + tGline->Delete(); + glineList.erase(tGline->getHost()); + delete tGline; + } + } // for + + if(totalFound > 0) + MsgChanLog("[Refresh Glines] - %d expired\n",totalFound); + if(badchansFound > 0) + MsgChanLog("[Refresh Badchans] - %d expired\n",badchansFound); } void uworld::loadGlines() { - -static const char *Main = "SELECT Id,Host,AddedBy,AddedOn,AddedLevel,ExpiresAt,Reason FROM glines"; - -stringstream theQuery; -theQuery << Main - << ends; - -elog << "uworld::loadGlines> " - << theQuery.str().c_str() - << endl; - -ExecStatusType status = SQLDb->Exec( theQuery.str().c_str() ) ; - -if( PGRES_TUPLES_OK != status ) - { - elog << "uworld::loadGlines> SQL Failure: " - << SQLDb->ErrorMessage() - << endl ; - - return; - } - -uwGline *tempGline = NULL; - -for( int i = 0 ; i < SQLDb->Tuples() ; i++ ) - { - tempGline = new (std::nothrow) uwGline(SQLDb); - assert( tempGline != NULL ) ; - - tempGline->setId(SQLDb->GetValue(i,0)); - tempGline->setHost(SQLDb->GetValue(i,1)); - tempGline->setAddedBy(SQLDb->GetValue(i,2)) ; - tempGline->setAddedOn(static_cast< time_t >( atoi( SQLDb->GetValue(i,3) ) )) ; - tempGline->setAddedLevel(atoi( SQLDb->GetValue(i,4) ) ); - tempGline->setExpires(static_cast< time_t >( atoi( SQLDb->GetValue(i,5) ) )) ; - tempGline->setReason(SQLDb->GetValue(i,6)); - addGline(tempGline); - } + + static const char *Main = "SELECT Id,Host,AddedBy,AddedOn,AddedLevel,ExpiresAt,Reason FROM glines"; + + stringstream theQuery; + theQuery << Main + << ends; + + elog << "uworld::loadGlines> " + << theQuery.str().c_str() + << endl; + + ExecStatusType status = SQLDb->Exec( theQuery.str().c_str() ) ; + + if( PGRES_TUPLES_OK != status ) + { + elog << "uworld::loadGlines> SQL Failure: " + << SQLDb->ErrorMessage() + << endl ; + + return; + } + + uwGline *tempGline = NULL; + + for( int i = 0 ; i < SQLDb->Tuples() ; i++ ) + { + tempGline = new (std::nothrow) uwGline(SQLDb); + assert( tempGline != NULL ) ; + + tempGline->setId(SQLDb->GetValue(i,0)); + tempGline->setHost(SQLDb->GetValue(i,1)); + tempGline->setAddedBy(SQLDb->GetValue(i,2)) ; + tempGline->setAddedOn(static_cast< time_t >( atoi( SQLDb->GetValue(i,3) ) )) ; + tempGline->setAddedLevel(atoi( SQLDb->GetValue(i,4) ) ); + tempGline->setExpires(static_cast< time_t >( atoi( SQLDb->GetValue(i,5) ) )) ; + tempGline->setReason(SQLDb->GetValue(i,6)); + addGline(tempGline); + } } int uworld::CountDots(const string& host) { -int dots = 0; - -for(unsigned int i = 0; i < strlen(host.c_str()); i++) - { - if( host[i] == '.' ) - dots++; - } -return dots; + int dots = 0; + + for(unsigned int i = 0; i < strlen(host.c_str()); i++) + { + if( host[i] == '.' ) + dots++; + } + return dots; } bool uworld::isIP(const string& host) { - -if(CountDots(host) > 3) - { - return false; - } - -if(strlen(host.c_str()) > 15) + + if(CountDots(host) > 3) + { + return false; + } + + if(strlen(host.c_str()) > 15) + { + return false; + } + + for(unsigned int i = 0; i < strlen(host.c_str()); i++) + { + if( !isdigit(host[i]) && !(host[i] == '.') && !(host[i] == '*') ) { - return false; + return false; } - -for(unsigned int i = 0; i < strlen(host.c_str()); i++) - { - if( !isdigit(host[i]) && !(host[i] == '.') && !(host[i] == '*') ) - { - return false; - } - } - -return true; + } + + return true; } int uworld::parseHost( const string& hostname ) { -string host = hostname; -string::size_type atPos = host.find_first_of( '.' ) ; -if( string::npos == atPos ) - { - return gc::ERR_IllegalHost; - } -else - { - if( isIP(host) ) + string host = hostname; + string::size_type atPos = host.find_first_of( '.' ) ; + if( string::npos == atPos ) + { + return gc::ERR_IllegalHost; + } + else + { + if( isIP(host) ) { - if( host[0] == '*' ) - return gc::ERR_IllegalHost; - - string ablock = host.substr( 0, atPos ); - if( !IsNumeric(ablock) ) - return gc::ERR_IllegalHost; - host = host.substr( atPos + 1); - if( host[0] == '*' ) - return gc::ablock; - - atPos = host.find_first_of( '.' ); - string bblock = host.substr( 0, atPos ); - if( !IsNumeric(bblock) ) - return gc::ERR_IllegalHost; - host = host.substr( atPos + 1); - if( host[0] == '*' ) - return gc::bblock; - - atPos = host.find_first_of( '.' ); - string cblock = host.substr( 0, atPos ); - if( !IsNumeric(cblock) ) - return gc::ERR_IllegalHost; - host = host.substr( atPos + 1); - if( host[0] == '*' ) - return gc::cblock; - - return gc::standard; - + if( host[0] == '*' ) + return gc::ERR_IllegalHost; + + string ablock = host.substr( 0, atPos ); + if( !IsNumeric(ablock) ) + return gc::ERR_IllegalHost; + host = host.substr( atPos + 1); + if( host[0] == '*' ) + return gc::ablock; + + atPos = host.find_first_of( '.' ); + string bblock = host.substr( 0, atPos ); + if( !IsNumeric(bblock) ) + return gc::ERR_IllegalHost; + host = host.substr( atPos + 1); + if( host[0] == '*' ) + return gc::bblock; + + atPos = host.find_first_of( '.' ); + string cblock = host.substr( 0, atPos ); + if( !IsNumeric(cblock) ) + return gc::ERR_IllegalHost; + host = host.substr( atPos + 1); + if( host[0] == '*' ) + return gc::cblock; + + return gc::standard; + } else { // a non ip - - atPos = host.find_last_of( '.' ) ; - string tld = host.substr( atPos + 1 ); - host = host.substr( 0, atPos ); - if( tld[0] == '*' ) - return gc::ERR_IllegalHost; - - atPos = host.find_last_of( '.' ) ; - string isp = host.substr( atPos + 1 ); - host = host.substr( 0, atPos ); - if(strcmp(isp.c_str(), "co") == 0) - { - tld = isp + '.' + tld; - string::size_type atPos = host.find_last_of( '.' ) ; - if( atPos == string::npos ) - isp = host; - else - { - isp = host.substr( atPos + 1 ); - host = host.substr( 0, atPos ); - } - } - if( isp[0] == '*' ) - return gc::tld; - - atPos = host.find_last_of( '.' ) ; - string id = host.substr( atPos + 1 ); - host = host.substr( 0, atPos ); - if( id[0] == '*' ) - return gc::isp; - else - return gc::standard; - + + atPos = host.find_last_of( '.' ) ; + string tld = host.substr( atPos + 1 ); + host = host.substr( 0, atPos ); + if( tld[0] == '*' ) + return gc::ERR_IllegalHost; + + atPos = host.find_last_of( '.' ) ; + string isp = host.substr( atPos + 1 ); + host = host.substr( 0, atPos ); + if(strcmp(isp.c_str(), "co") == 0) + { + tld = isp + '.' + tld; + string::size_type atPos = host.find_last_of( '.' ) ; + if( atPos == string::npos ) + isp = host; + else + { + isp = host.substr( atPos + 1 ); + host = host.substr( 0, atPos ); } + } + if( isp[0] == '*' ) + return gc::tld; + + atPos = host.find_last_of( '.' ) ; + string id = host.substr( atPos + 1 ); + host = host.substr( 0, atPos ); + if( id[0] == '*' ) + return gc::isp; + else + return gc::standard; + } -return 0; + } + return 0; } char *uworld::convertToAscTime(time_t NOW) { -time_t *tNow = &NOW; -struct tm* Now = gmtime(tNow); -char *ATime = asctime(Now); -ATime[strlen(ATime)-1] = '\0'; -return ATime; + time_t *tNow = &NOW; + struct tm* Now = gmtime(tNow); + char *ATime = asctime(Now); + ATime[strlen(ATime)-1] = '\0'; + return ATime; } void uworld::listGlines(iClient* theClient) { -uwGline *theGline; -for(glineListType::iterator ptr = glineList.begin(); ptr != glineList.end();++ptr) + uwGline *theGline; + for(glineListType::iterator ptr = glineList.begin(); ptr != glineList.end();++ptr) + { + theGline = ptr->second; + if(theGline->getHost().substr(0,1) != "#") { - theGline = ptr->second; - if(theGline->getHost().substr(0,1) != "#") - { - if(theGline->getExpires() > ::time(0)) - Message(theClient, "Host: %s until %s at level %d", - theGline->getHost().c_str(), - convertToAscTime(theGline->getExpires()), - theGline->getAddedLevel() ); - } - } + if(theGline->getExpires() > ::time(0)) + Message(theClient, "Host: %s until %s at level %d", + theGline->getHost().c_str(), + convertToAscTime(theGline->getExpires()), + theGline->getAddedLevel() ); + } + } } void uworld::listBadChans(iClient* theClient) { -uwGline *theGline; -for(glineListType::iterator ptr = glineList.begin(); ptr != glineList.end();++ptr) - { - theGline = ptr->second; - if(theGline->getHost().substr(0,1) == "#") - { - if(theGline->getExpires() > ::time(0) || theGline->getExpires() == 0) - Message(theClient, "Host: %s until %s at level %d", - theGline->getHost().c_str(), - (theGline->getExpires() == 0) ? "PERMANENT" : convertToAscTime(theGline->getExpires()), - theGline->getAddedLevel() ); - } - } + uwGline *theGline; + for(glineListType::iterator ptr = glineList.begin(); ptr != glineList.end();++ptr) + { + theGline = ptr->second; + if(theGline->getHost().substr(0,1) == "#") + { + if(theGline->getExpires() > ::time(0) || theGline->getExpires() == 0) + Message(theClient, "Host: %s until %s at level %d", + theGline->getHost().c_str(), + (theGline->getExpires() == 0) ? "PERMANENT" : convertToAscTime(theGline->getExpires()), + theGline->getAddedLevel() ); + } + } } void uworld::showUptime(iClient* theClient, bool PrivMsg) { -int uptime = ::time(0) - getUplink()->getStartTime(); -int days; -int hours; -int mins; -int secs; - -days = uptime/(24*3600); -uptime %= 24*3600; -hours = uptime / 3600; -uptime %= 3600; -mins = uptime / 60; -uptime %= 60; -secs = uptime; -SendTo(theClient, PrivMsg, "Uptime : \002%d\002 Day(s) \002%d\002 Hour(s) \002%d\002 Minute(s) \002%d\002 Second(s)", - days, hours, mins, secs); + int uptime = ::time(0) - getUplink()->getStartTime(); + int days; + int hours; + int mins; + int secs; + + days = uptime/(24*3600); + uptime %= 24*3600; + hours = uptime / 3600; + uptime %= 3600; + mins = uptime / 60; + uptime %= 60; + secs = uptime; + SendTo(theClient, PrivMsg, "Uptime : \002%d\002 Day(s) \002%d\002 Hour(s) \002%d\002 Minute(s) \002%d\002 Second(s)", + days, hours, mins, secs); } void uworld::loadUsers() { -int users = 0; - -stringstream theQuery; -theQuery << "SELECT " - << sql::user_fields - << " FROM users ORDER BY access DESC" - << ends; - -elog << "uworld::loadUsers> " - << theQuery.str().c_str() - << endl; - -ExecStatusType status = SQLDb->Exec( theQuery.str().c_str() ) ; - -if( PGRES_TUPLES_OK != status ) - { - elog << "uworld::loadUsers> SQL Failure: " - << SQLDb->ErrorMessage() - << endl ; - - return; - } - -uwUser *tempUser = NULL; - -for( int i = 0 ; i < SQLDb->Tuples() ; i++ ) - { - tempUser = new (std::nothrow) uwUser(SQLDb); - assert( tempUser != NULL ) ; - - tempUser->setAllMembers(i); - userList.insert(userListType::value_type(tempUser->getUserName(), tempUser)); - users++; - } - -elog << "uworld::loadUsers> loaded " << users << " users!" << endl; + int users = 0; + + stringstream theQuery; + theQuery << "SELECT " + << sql::user_fields + << " FROM users ORDER BY access DESC" + << ends; + + elog << "uworld::loadUsers> " + << theQuery.str().c_str() + << endl; + + ExecStatusType status = SQLDb->Exec( theQuery.str().c_str() ) ; + + if( PGRES_TUPLES_OK != status ) + { + elog << "uworld::loadUsers> SQL Failure: " + << SQLDb->ErrorMessage() + << endl ; + + return; + } + + uwUser *tempUser = NULL; + + for( int i = 0 ; i < SQLDb->Tuples() ; i++ ) + { + tempUser = new (std::nothrow) uwUser(SQLDb); + assert( tempUser != NULL ) ; + + tempUser->setAllMembers(i); + userList.insert(userListType::value_type(tempUser->getUserName(), tempUser)); + users++; + } + + elog << "uworld::loadUsers> loaded " << users << " users!" << endl; } void uworld::refreshSuspends() { - -int totalFound = 0; - -for(userListType::iterator ptr = userList.begin();ptr != userList.end(); ptr++) - { - uwUser* theUser = ptr->second; - if(theUser->getFlag(uwUser::SUSPEND) && theUser->getSuspendExpire() <= ::time(0) && - theUser->getSuspendLevel() > 0) - { - //remove the suspend - theUser->removeFlag(uwUser::SUSPEND); - theUser->setSuspendExpire(0); - theUser->setSuspendLevel(0); - theUser->commit(); - - ++totalFound; - } - } - -if(totalFound > 0) - MsgChanLog("[Refresh Suspends] - %d expired\n",totalFound); - -} - -void uworld::burstGlines() -{ -elog << "bursting glines ..." << endl; - -uwGline *theGline = 0 ; -unsigned int Expires = 0; -for(glineListType::iterator ptr = glineList.begin(); ptr != glineList.end(); ++ptr) - { - theGline = ptr->second; - Expires = theGline->getExpires() - ::time(0); - // TAG - if(/*Expires < 0 && */ theGline->getHost().substr(0,1) == "#") - Expires = 3600*24*500; - MyUplink->setGline(MyUplink->getName(), theGline->getHost(), theGline->getReason(), Expires); - theGline->clearBurst(); - } + + int totalFound = 0; + + for(userListType::iterator ptr = userList.begin();ptr != userList.end(); ptr++) + { + uwUser* theUser = ptr->second; + if(theUser->getFlag(uwUser::SUSPEND) && theUser->getSuspendExpire() <= ::time(0) && + theUser->getSuspendLevel() > 0) + { + //remove the suspend + theUser->removeFlag(uwUser::SUSPEND); + theUser->setSuspendExpire(0); + theUser->setSuspendLevel(0); + theUser->commit(); + + ++totalFound; + } + } + + if(totalFound > 0) + MsgChanLog("[Refresh Suspends] - %d expired\n",totalFound); + +} + +bool uworld::burstGlines() +{ + elog << "bursting glines ..." << endl; + + uwGline *theGline = 0 ; + unsigned int Expires = 0; + for(glineListType::iterator ptr = glineList.begin(); ptr != glineList.end(); ++ptr) + { + theGline = ptr->second; + Expires = theGline->getExpires() - ::time(0); + // TAG + if(/*Expires < 0 && */ theGline->getHost().substr(0,1) == "#") + Expires = 3600*24*500; + MyUplink->setGline(MyUplink->getName(), theGline->getHost(), theGline->getReason(), Expires); + theGline->clearBurst(); + } + + return xClient::BurstGlines(); } void uworld::listUsers(iClient* theClient, bool PrivMsg) { -uwUser* curUser; -SendTo(theClient, PrivMsg,"| USER | ACCESS | AUTHED AS |"); -SendTo(theClient, PrivMsg,"-----------------------------------------------------"); -for(userListType::iterator ptr = userList.begin(); ptr != userList.end(); ptr++) - { - curUser = ptr->second; - SendTo(theClient, PrivMsg, "| %-20s | %7d%s | %-15s |", - curUser->getUserName().c_str(), curUser->getAccess(), - curUser->getFlag(uwUser::NONEEDOP) ? "*" : " ", - isAuthed(curUser) ? curUser->getClient()->getNickName().c_str() : "" ); - } - -SendTo(theClient, PrivMsg,"----------------= End Of Access List =---------------"); + uwUser* curUser; + SendTo(theClient, PrivMsg,"| USER | ACCESS | AUTHED AS |"); + SendTo(theClient, PrivMsg,"-----------------------------------------------------"); + for(userListType::iterator ptr = userList.begin(); ptr != userList.end(); ptr++) + { + curUser = ptr->second; + SendTo(theClient, PrivMsg, "| %-20s | %7d%s | %-15s |", + curUser->getUserName().c_str(), curUser->getAccess(), + curUser->getFlag(uwUser::NONEEDOP) ? "*" : " ", + isAuthed(curUser) ? curUser->getClient()->getNickName().c_str() : "" ); + } + + SendTo(theClient, PrivMsg,"----------------= End Of Access List =---------------"); } void uworld::addUser (uwUser* theUser) { -userList.insert(userListType::value_type(theUser->getUserName(), theUser )); + userList.insert(userListType::value_type(theUser->getUserName(), theUser )); } void uworld::remUser (uwUser* theUser) { -userList.erase(theUser->getUserName()); -return; + userList.erase(theUser->getUserName()); + return; } void uworld::modUser (uwUser* theUser) { -remUser(theUser); -addUser(theUser); + remUser(theUser); + addUser(theUser); } void uworld::addServer (iServer* newServer) { -uwServer* tmpServer = findServer(newServer); -if(tmpServer && tmpServer->getServer()) return; -bool update = false; -if(tmpServer) update = true; - -if(!update) tmpServer = new (std::nothrow) uwServer; - -tmpServer->setName(newServer->getName()); -tmpServer->setLinkTS(::time(0)); -tmpServer->setdeLinkTS(0); -tmpServer->setServer(newServer); - -if(!update) serverList.insert(serverListType::value_type(tmpServer->getName(), tmpServer)); + uwServer* tmpServer = findServer(newServer); + if(tmpServer && tmpServer->getServer()) return; + bool update = false; + if(tmpServer) update = true; + + if(!update) tmpServer = new (std::nothrow) uwServer; + + tmpServer->setName(newServer->getName()); + tmpServer->setLinkTS(::time(0)); + tmpServer->setdeLinkTS(0); + tmpServer->setServer(newServer); + + if(!update) serverList.insert(serverListType::value_type(tmpServer->getName(), tmpServer)); } void uworld::remServer (uwServer* removeServer) { -serverList.erase(removeServer->getName() ); + serverList.erase(removeServer->getName() ); } bool uworld::splitServer (iServer* splitServer, const string& reason) { -uwServer* tmpServer = findServer( splitServer ); -if(!tmpServer) return false; - -tmpServer->setdeLinkTS(::time(0)); -tmpServer->setSplitReason(reason); -tmpServer->setServer(NULL); -return true; + uwServer* tmpServer = findServer( splitServer ); + if(!tmpServer) return false; + + tmpServer->setdeLinkTS(::time(0)); + tmpServer->setSplitReason(reason); + tmpServer->setServer(NULL); + return true; } uwServer* uworld::findServer ( iServer* theServer ) { -return findServer( theServer->getName() ); + return findServer( theServer->getName() ); } uwServer* uworld::findServer ( const string& serverName ) { -serverListType::iterator ptr = serverList.find( serverName ); -if(ptr != serverList.end()) return ptr->second; -return 0; + serverListType::iterator ptr = serverList.find( serverName ); + if(ptr != serverList.end()) return ptr->second; + return 0; } bool uworld::listMissingServers(iClient* theClient, bool PrivMsg) { -uwServer* curServer; -int missing = 0; -for(serverListType::iterator ptr = serverList.begin(); ptr != serverList.end(); ptr++) - { - curServer = ptr->second; - if( !curServer->getServer() ) - { - SendTo(theClient, PrivMsg, "Missing Server: \002%s\002 - Last linked at %s", curServer->getName().c_str(), - convertToAscTime(curServer->getLinkTS()) ); - SendTo(theClient, PrivMsg, "Splitted at %s stating: %s", convertToAscTime(curServer->getdeLinkTS()), - curServer->getSplitReason().c_str() ); - missing++; - } - } - -SendTo(theClient, PrivMsg, "There are \002%d\002 missing servers", missing); -return true; + uwServer* curServer; + int missing = 0; + for(serverListType::iterator ptr = serverList.begin(); ptr != serverList.end(); ptr++) + { + curServer = ptr->second; + if( !curServer->getServer() ) + { + SendTo(theClient, PrivMsg, "Missing Server: \002%s\002 - Last linked at %s", curServer->getName().c_str(), + convertToAscTime(curServer->getLinkTS()) ); + SendTo(theClient, PrivMsg, "Splitted at %s stating: %s", convertToAscTime(curServer->getdeLinkTS()), + curServer->getSplitReason().c_str() ); + missing++; + } + } + + SendTo(theClient, PrivMsg, "There are \002%d\002 missing servers", missing); + return true; } void uworld::addNet() { -xNetwork::serverIterator ptr = Network->servers_begin(); -xNetwork::serverIterator end = Network->servers_end(); -iServer* curServer; - -for( ; ptr != end ; ptr++ ) - { - curServer = ptr->second; - addServer(curServer); - } + xNetwork::serverIterator ptr = Network->servers_begin(); + xNetwork::serverIterator end = Network->servers_end(); + iServer* curServer; + + for( ; ptr != end ; ptr++ ) + { + curServer = ptr->second; + addServer(curServer); + } } int uworld::delNet() { -int deleted = serverList.size(); -serverList.clear(); -return deleted; + int deleted = serverList.size(); + serverList.clear(); + return deleted; } void uworld::addLog(iClient* theClient, const char *log, ...) { - -char buffer[ 1024 ] = { 0 } ; -va_list list; - -va_start( list, log ) ; -vsprintf( buffer, log, list ) ; -va_end( list ) ; - -uwLog* newLog = new(std::nothrow) uwLog(SQLDb); -if(!newLog) return; - -uwUser* theUser = isAuthed(theClient); -if(!theUser) - newLog->setUserName( "notLoggedIn" ); -else - newLog->setUserName( removeSqlChars(theUser->getUserName()) ); - -newLog->setNickUserHost( removeSqlChars(theClient->getNickUserHost()) ); -newLog->setLog( removeSqlChars(buffer) ); -newLog->setTS(::time(0)); -newLog->Insert(); - -if(numLogs > maxLogs) logList.begin() = logList.erase(logList.begin()); -else incLog(); - -logList.push_back(newLog); - + + char buffer[ 1024 ] = { 0 } ; + va_list list; + + va_start( list, log ) ; + vsprintf( buffer, log, list ) ; + va_end( list ) ; + + uwLog* newLog = new(std::nothrow) uwLog(SQLDb); + if(!newLog) return; + + uwUser* theUser = isAuthed(theClient); + if(!theUser) + newLog->setUserName( "notLoggedIn" ); + else + newLog->setUserName( removeSqlChars(theUser->getUserName()) ); + + newLog->setNickUserHost( removeSqlChars(theClient->getNickUserHost()) ); + newLog->setLog( removeSqlChars(buffer) ); + newLog->setTS(::time(0)); + newLog->Insert(); + + if(numLogs > maxLogs) logList.begin() = logList.erase(logList.begin()); + else incLog(); + + logList.push_back(newLog); + } void uworld::lastLog(iClient* theClient, bool PrivMsg, int aant) { -if(aant > maxLogs) aant = maxLogs; -int i = 0; -logListType::iterator ptr = logList.end(); -uwLog* curLog; - -while((i < aant) && (ptr != logList.begin()) ) - { - ptr--; - curLog = *ptr; - SendTo(theClient, PrivMsg, "[%s] %s ( %s ) - %s", convertToAscTime(curLog->getTS()), - curLog->getUserName().c_str(), curLog->getNickUserHost().c_str(), curLog->getLog().c_str() ); - i++; - } + if(aant > maxLogs) aant = maxLogs; + int i = 0; + logListType::iterator ptr = logList.end(); + uwLog* curLog; + + while((i < aant) && (ptr != logList.begin()) ) + { + ptr--; + curLog = *ptr; + SendTo(theClient, PrivMsg, "[%s] %s ( %s ) - %s", convertToAscTime(curLog->getTS()), + curLog->getUserName().c_str(), curLog->getNickUserHost().c_str(), curLog->getLog().c_str() ); + i++; + } } void uworld::incLog() { -numLogs++; + numLogs++; } void uworld::loadAGL() { - -static const char *Main = "SELECT AGL_Host,Connections,AddedBy,AddedOn FROM AGL"; - -stringstream theQuery; -theQuery << Main - << ends; - -elog << "uworld::loadAGL> " - << theQuery.str().c_str() - << endl; - -ExecStatusType status = SQLDb->Exec( theQuery.str().c_str() ) ; - -if( PGRES_TUPLES_OK != status ) - { - elog << "uworld::loadAGL> SQL Failure: " - << SQLDb->ErrorMessage() - << endl ; - - return; - } - -uwAGL *tempAGL = NULL; - -for( int i = 0 ; i < SQLDb->Tuples() ; i++ ) - { - tempAGL = new (std::nothrow) uwAGL(SQLDb); - assert( tempAGL != NULL ) ; - - tempAGL->setAGLHost(SQLDb->GetValue(i,0)); - tempAGL->setNumberConn(atoi( SQLDb->GetValue(i,1) ) ); - tempAGL->setAddedBy(SQLDb->GetValue(i,2)) ; - tempAGL->setAddedOn(static_cast< time_t >( atoi( SQLDb->GetValue(i,3) ) )) ; - addAGL(tempAGL); - } - -return; + + static const char *Main = "SELECT AGL_Host,Connections,AddedBy,AddedOn FROM AGL"; + + stringstream theQuery; + theQuery << Main + << ends; + + elog << "uworld::loadAGL> " + << theQuery.str().c_str() + << endl; + + ExecStatusType status = SQLDb->Exec( theQuery.str().c_str() ) ; + + if( PGRES_TUPLES_OK != status ) + { + elog << "uworld::loadAGL> SQL Failure: " + << SQLDb->ErrorMessage() + << endl ; + + return; + } + + uwAGL *tempAGL = NULL; + + for( int i = 0 ; i < SQLDb->Tuples() ; i++ ) + { + tempAGL = new (std::nothrow) uwAGL(SQLDb); + assert( tempAGL != NULL ) ; + + tempAGL->setAGLHost(SQLDb->GetValue(i,0)); + tempAGL->setNumberConn(atoi( SQLDb->GetValue(i,1) ) ); + tempAGL->setAddedBy(SQLDb->GetValue(i,2)) ; + tempAGL->setAddedOn(static_cast< time_t >( atoi( SQLDb->GetValue(i,3) ) )) ; + addAGL(tempAGL); + } + + return; } void uworld::addAGL( uwAGL* tmpAGL) { -bool addedAlready = false; - -aglListType::iterator ptr = aglList.find(tmpAGL->getAGLHost()); -if(ptr != aglList.end()) { - if(ptr->second != tmpAGL) { - aglList.erase(tmpAGL->getAGLHost()); - delete ptr->second; - } else { addedAlready = true; } -} - -if(!addedAlready) //if we found the gline we need to add, no need to add it + bool addedAlready = false; + + aglListType::iterator ptr = aglList.find(tmpAGL->getAGLHost()); + if(ptr != aglList.end()) { + if(ptr->second != tmpAGL) { + aglList.erase(tmpAGL->getAGLHost()); + delete ptr->second; + } else { addedAlready = true; } + } + + if(!addedAlready) //if we found the gline we need to add, no need to add it aglList.insert(aglListType::value_type(tmpAGL->getAGLHost(), tmpAGL) ); } void uworld::remAGL( uwAGL* tmpAGL) { -aglList.erase(tmpAGL->getAGLHost()); + aglList.erase(tmpAGL->getAGLHost()); } uwAGL* uworld::findAGL( const string& hostName ) { -aglListType::iterator ptr = aglList.find(hostName); -if(ptr != aglList.end()) { - return ptr->second; -} -return NULL ; + aglListType::iterator ptr = aglList.find(hostName); + if(ptr != aglList.end()) { + return ptr->second; + } + return NULL ; } void uworld::updateAGL( uwAGL* theAGL ) { -uwAGL* curAGL = findAGL(theAGL->getAGLHost()); -if(!curAGL) return; - -curAGL->setNumberConn(theAGL->getNumberConn()); -curAGL->setAddedBy(theAGL->getAddedBy()); -curAGL->setAddedOn(theAGL->getAddedOn()); + uwAGL* curAGL = findAGL(theAGL->getAGLHost()); + if(!curAGL) return; + + curAGL->setNumberConn(theAGL->getNumberConn()); + curAGL->setAddedBy(theAGL->getAddedBy()); + curAGL->setAddedOn(theAGL->getAddedOn()); } void uworld::listAGL(iClient* theClient, bool PrivMsg ) { -uwAGL *curAGL; -int nrOfAGL = 0; - -SendTo(theClient, PrivMsg, "Listing AutoGline entries..."); -for(aglListType::iterator ptr = aglList.begin(); ptr != aglList.end();++ptr) - { - curAGL = ptr->second; - SendTo(theClient, PrivMsg, "Host: \002%s\002 - Connections: %d", - curAGL->getAGLHost().c_str(), curAGL->getNumberConn()); - SendTo(theClient, PrivMsg, "Added by: %s on %s", curAGL->getAddedBy().c_str(), - convertToAscTime(curAGL->getAddedOn())); - SendTo(theClient, PrivMsg, "-"); - nrOfAGL++; - } -SendTo(theClient, PrivMsg, "Total of \002%d\002 entries", nrOfAGL); + uwAGL *curAGL; + int nrOfAGL = 0; + + SendTo(theClient, PrivMsg, "Listing AutoGline entries..."); + for(aglListType::iterator ptr = aglList.begin(); ptr != aglList.end();++ptr) + { + curAGL = ptr->second; + SendTo(theClient, PrivMsg, "Host: \002%s\002 - Connections: %d", + curAGL->getAGLHost().c_str(), curAGL->getNumberConn()); + SendTo(theClient, PrivMsg, "Added by: %s on %s", curAGL->getAddedBy().c_str(), + convertToAscTime(curAGL->getAddedOn())); + SendTo(theClient, PrivMsg, "-"); + nrOfAGL++; + } + SendTo(theClient, PrivMsg, "Total of \002%d\002 entries", nrOfAGL); } bool uworld::matchAGL(iClient* newClient) { -uwAGL* theAGL = findAGL(newClient->getRealInsecureHost().c_str()); -if(theAGL) // we got a perfectly matching hostname! couldn't get any better! + uwAGL* theAGL = findAGL(newClient->getRealInsecureHost().c_str()); + if(theAGL) // we got a perfectly matching hostname! couldn't get any better! + { + } + else // we got to look for the most matching hostname + { + uwAGL* curAGL = NULL; + int prevMatch = 0; + for(aglListType::iterator ptr = aglList.begin(); ptr != aglList.end();++ptr) { - } -else // we got to look for the most matching hostname - { - uwAGL* curAGL = NULL; - int prevMatch = 0; - for(aglListType::iterator ptr = aglList.begin(); ptr != aglList.end();++ptr) + curAGL = ptr->second; + if( !match(curAGL->getAGLHost(), newClient->getRealInsecureHost()) ) //matching host? + { + if(parseHost(curAGL->getAGLHost()) >= prevMatch && match(curAGL->getAGLHost(), "*") ) { - curAGL = ptr->second; - if( !match(curAGL->getAGLHost(), newClient->getRealInsecureHost()) ) //matching host? - { - if(parseHost(curAGL->getAGLHost()) >= prevMatch && match(curAGL->getAGLHost(), "*") ) - { - prevMatch = parseHost(curAGL->getAGLHost()); - theAGL = curAGL; - } - else if(!match(curAGL->getAGLHost(), "*") && prevMatch == 0) - { - theAGL = curAGL; - } - } - else if( !match(curAGL->getAGLHost(), xIP(newClient->getIP()).GetNumericIP()) ) //maybe a matching ip? - { - if( parseHost(curAGL->getAGLHost()) >= prevMatch && match(curAGL->getAGLHost(), "*") ) - { - prevMatch = parseHost(curAGL->getAGLHost()); - theAGL = curAGL; - } - else if(!match(curAGL->getAGLHost(), "*") && prevMatch == 0) - { - theAGL = curAGL; - } - } - } // for - } //else - -if(!theAGL) return false; // we didn't find one so why bother :) - -if(Network->countMatchingHost(newClient->getRealInsecureHost()) > theAGL->getNumberConn() ) + prevMatch = parseHost(curAGL->getAGLHost()); + theAGL = curAGL; + } + else if(!match(curAGL->getAGLHost(), "*") && prevMatch == 0) + { + theAGL = curAGL; + } + } + else if( !match(curAGL->getAGLHost(), xIP(newClient->getIP()).GetNumericIP()) ) //maybe a matching ip? + { + if( parseHost(curAGL->getAGLHost()) >= prevMatch && match(curAGL->getAGLHost(), "*") ) + { + prevMatch = parseHost(curAGL->getAGLHost()); + theAGL = curAGL; + } + else if(!match(curAGL->getAGLHost(), "*") && prevMatch == 0) + { + theAGL = curAGL; + } + } + } // for + } //else + + if(!theAGL) return false; // we didn't find one so why bother :) + + if(Network->countMatchingHost(newClient->getRealInsecureHost()) > theAGL->getNumberConn() ) + { + list<const iClient*> clientList = Network->matchHost(newClient->getRealInsecureHost()); + for(list< const iClient* >::const_iterator ptr = clientList.begin(); ptr != clientList.end(); ++ptr) { - list<const iClient*> clientList = Network->matchHost(newClient->getRealInsecureHost()); - for(list< const iClient* >::const_iterator ptr = clientList.begin(); ptr != clientList.e... [truncated message content] |
From: Matthias C. <ul...@us...> - 2005-04-05 22:44:44
|
Committer : Matthias Crauwels <ul...@us...> CVSROOT : /cvsroot/mod-uworld Module : mod.uworld Commit time: 2005-04-05 22:44:35 UTC Modified files: CLEARCHANCommand.cc MODECommand.cc OPCHANCommand.cc RELOADCommand.cc Log message: Author: Matthias Crauwels <ult...@wo...> Log message: * Implemented recent core-changes! ---------------------- diff included ---------------------- Index: mod.uworld/CLEARCHANCommand.cc diff -u mod.uworld/CLEARCHANCommand.cc:1.4 mod.uworld/CLEARCHANCommand.cc:1.5 --- mod.uworld/CLEARCHANCommand.cc:1.4 Wed Jan 7 17:24:25 2004 +++ mod.uworld/CLEARCHANCommand.cc Tue Apr 5 15:44:22 2005 @@ -14,7 +14,7 @@ #include "StringTokenizer.h" #include "levels.h" -const char CLEARCHANCommand_cc_rcsId[] = "$Id: CLEARCHANCommand.cc,v 1.4 2004/01/08 01:24:25 ultike Exp $"; +const char CLEARCHANCommand_cc_rcsId[] = "$Id: CLEARCHANCommand.cc,v 1.5 2005/04/05 22:44:22 ultike Exp $"; namespace gnuworld { @@ -108,7 +108,12 @@ bot->Part(theChan->getName()); return true; } - + + +bot->ClearMode( theChan, doModes, true ) ; +return true ; + +/* for( string::size_type modePos = 0 ; modePos < doModes.size() ; ++modePos ) { switch( doModes[ modePos ] ) @@ -147,7 +152,7 @@ { if( ptr->second->getMode(ChannelUser::MODE_O)) { - /* Don't deop +k things */ + // Don't deop +k things if ( !ptr->second->getClient()->getMode(iClient::MODE_SERVICES) ) { modes+= 'o'; @@ -232,6 +237,7 @@ return true; +*/ } } Index: mod.uworld/MODECommand.cc diff -u mod.uworld/MODECommand.cc:1.4 mod.uworld/MODECommand.cc:1.5 --- mod.uworld/MODECommand.cc:1.4 Wed Jan 7 17:24:25 2004 +++ mod.uworld/MODECommand.cc Tue Apr 5 15:44:23 2005 @@ -15,7 +15,7 @@ #include "levels.h" -const char MODECommand_cc_rcsId[] = "$Id: MODECommand.cc,v 1.4 2004/01/08 01:24:25 ultike Exp $"; +const char MODECommand_cc_rcsId[] = "$Id: MODECommand.cc,v 1.5 2005/04/05 22:44:23 ultike Exp $"; namespace gnuworld { @@ -62,6 +62,14 @@ theClient->getNickUserHost().c_str(), st.assemble(1).c_str()); +// This has been changed to use xServer::Mode(), which will from now +// on perform the bulk of the heavy lifting with setting modes. +// Note that this will have the negative effect of not telling +// the requesting client of this command why something did not succeed. + bot->Mode( theChan, st.assemble( 2 ), string(), true ) ; + return true ; + +/* // Define mode to be any mode, such as +abc-def // Define argument to to be any argument to a particular mode: -o nickArgument @@ -351,6 +359,8 @@ bot->ModeAsServer( theChan, modeString + ' ' + argString ) ; +*/ + // Update internal tables. // This is a cheat, but it makes things so much easier :) // TODO @@ -358,6 +368,7 @@ //) ; return true ; + } } Index: mod.uworld/OPCHANCommand.cc diff -u mod.uworld/OPCHANCommand.cc:1.4 mod.uworld/OPCHANCommand.cc:1.5 --- mod.uworld/OPCHANCommand.cc:1.4 Wed Jan 7 17:24:25 2004 +++ mod.uworld/OPCHANCommand.cc Tue Apr 5 15:44:23 2005 @@ -1,6 +1,6 @@ /* * OPCHANCommand.cc - * $Id: OPCHANCommand.cc,v 1.4 2004/01/08 01:24:25 ultike Exp $ + * $Id: OPCHANCommand.cc,v 1.5 2005/04/05 22:44:23 ultike Exp $ * */ @@ -86,7 +86,7 @@ string modeString = "+o "; -bot->ModeAsServer(netChan, modeString + netUser->getCharYYXXX().c_str()); +bot->Mode(netChan, modeString, netUser->getCharYYXXX().c_str(), true); bot->SendTo(theClient, PrivMsg, "I opped %s on %s", netUser->getNickName().c_str(), netChan->getName().c_str()); return true; } Index: mod.uworld/RELOADCommand.cc diff -u mod.uworld/RELOADCommand.cc:1.1 mod.uworld/RELOADCommand.cc:1.2 --- mod.uworld/RELOADCommand.cc:1.1 Thu Jan 8 04:21:39 2004 +++ mod.uworld/RELOADCommand.cc Tue Apr 5 15:44:23 2005 @@ -21,18 +21,18 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, * USA. * - * $Id: RELOADCommand.cc,v 1.1 2004/01/08 12:21:39 ultike Exp $ + * $Id: RELOADCommand.cc,v 1.2 2005/04/05 22:44:23 ultike Exp $ */ #include <string> -#include "config.h" +//#include "config.h" #include "StringTokenizer.h" #include "uworld.h" #include "levels.h" -RCSTAG("$Id: RELOADCommand.cc,v 1.1 2004/01/08 12:21:39 ultike Exp $"); +RCSTAG("$Id: RELOADCommand.cc,v 1.2 2005/04/05 22:44:23 ultike Exp $"); namespace gnuworld { ----------------------- End of diff ----------------------- |
From: Jochen <den...@us...> - 2004-07-14 16:27:24
|
Committer : Jochen Meesters <den...@us...> CVSROOT : /cvsroot/mod-uworld Module : mod.uworld Commit time: 2004-07-14 16:27:18 UTC Modified files: uworld.cc uworld.h Log message: Author: Spike Log message: Changed return type of BurstChannels from bool to void. ---------------------- diff included ---------------------- Index: mod.uworld/uworld.cc diff -u mod.uworld/uworld.cc:1.7 mod.uworld/uworld.cc:1.8 --- mod.uworld/uworld.cc:1.7 Thu Jan 8 04:21:39 2004 +++ mod.uworld/uworld.cc Wed Jul 14 09:27:08 2004 @@ -220,14 +220,12 @@ // Burst any channels. -bool uworld::BurstChannels() +void uworld::BurstChannels() { Join( msgChannel, "+isnt", 0, true ) ; Join( operChannel, "+snt", 0, true ) ; MyUplink->RegisterChannelEvent( msgChannel, this ) ; MyUplink->RegisterChannelEvent( operChannel, this ) ; - -return xClient::BurstChannels() ; } // I don't really like doing this. Index: mod.uworld/uworld.h diff -u mod.uworld/uworld.h:1.4 mod.uworld/uworld.h:1.5 --- mod.uworld/uworld.h:1.4 Wed Jan 7 17:24:25 2004 +++ mod.uworld/uworld.h Wed Jul 14 09:27:08 2004 @@ -2,7 +2,7 @@ */ #ifndef __uworld_H -#define __uworld_H "$Id: uworld.h,v 1.4 2004/01/08 01:24:25 ultike Exp $" +#define __uworld_H "$Id: uworld.h,v 1.5 2004/07/14 16:27:08 denspike Exp $" #include <string> #include <vector> @@ -114,7 +114,7 @@ * is established. The purpose of this method is to inform * the xServer of the channels this client wishes to burst. */ - virtual bool BurstChannels() ; + virtual void BurstChannels() ; /** * This method is called when a network client sends ----------------------- End of diff ----------------------- |
From: Matthias C. <ul...@us...> - 2004-01-08 12:21:51
|
Committer : Matthias Crauwels <ul...@us...> CVSROOT : /cvsroot/mod-uworld Module : mod.uworld Commit time: 2004-01-08 12:21:50 UTC Modified files: LOGINCommand.cc Makefile.am Makefile.in levels.h uwUser.h uworld.cc uworldCommands.h doc/commands.sql Added files: RELOADCommand.cc Log message: Author: Matthias Crauwels Log message: * Added RELOADCommand (from reed) * Changed ACCESS-listing * Removed an unused field in uwUser ---------------------- diff included ---------------------- Index: mod.uworld/LOGINCommand.cc diff -u mod.uworld/LOGINCommand.cc:1.4 mod.uworld/LOGINCommand.cc:1.5 --- mod.uworld/LOGINCommand.cc:1.4 Wed Jan 7 17:24:25 2004 +++ mod.uworld/LOGINCommand.cc Thu Jan 8 04:21:39 2004 @@ -12,7 +12,7 @@ #include "uwUser.h" #include "levels.h" -const char LOGINCommand_cc_rcsId[] = "$Id: LOGINCommand.cc,v 1.4 2004/01/08 01:24:25 ultike Exp $" ; +const char LOGINCommand_cc_rcsId[] = "$Id: LOGINCommand.cc,v 1.5 2004/01/08 12:21:39 ultike Exp $" ; namespace gnuworld { @@ -141,7 +141,6 @@ bot->deAuthUser(tmpClient); } -theUser->setNumeric(theClient->getCharYYXXX()); bot->authUser(theClient, theUser); bot->SendTo(theClient, PrivMsg, "Welcome to Uworld, %s!", theUser->getUserName().c_str()); Index: mod.uworld/Makefile.am diff -u mod.uworld/Makefile.am:1.3 mod.uworld/Makefile.am:1.4 --- mod.uworld/Makefile.am:1.3 Thu Jul 10 07:22:18 2003 +++ mod.uworld/Makefile.am Thu Jan 8 04:21:39 2004 @@ -1,5 +1,5 @@ ## Process this file with automake to produce Makefile.in -# "$Id: Makefile.am,v 1.3 2003/07/10 14:22:18 dan_karrels Exp $" +# "$Id: Makefile.am,v 1.4 2004/01/08 12:21:39 ultike Exp $" lib_LTLIBRARIES = libuworld.la libuworld_la_SOURCES = uworld.cc \ @@ -37,6 +37,7 @@ OPCHANCommand.cc \ PARTCommand.cc \ QUOTECommand.cc \ + RELOADCommand.cc \ REMBADCHANCommand.cc \ REMGLINECommand.cc \ REMUSERCommand.cc \ Index: mod.uworld/Makefile.in diff -u mod.uworld/Makefile.in:1.3 mod.uworld/Makefile.in:1.4 --- mod.uworld/Makefile.in:1.3 Thu Jul 10 07:22:18 2003 +++ mod.uworld/Makefile.in Thu Jan 8 04:21:39 2004 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.7.5 from Makefile.am. +# Makefile.in generated by automake 1.7 from Makefile.am. # @configure_input@ -# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 +# 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, @@ -14,7 +14,7 @@ @SET_MAKE@ -# "$Id: Makefile.in,v 1.3 2003/07/10 14:22:18 dan_karrels Exp $" +# "$Id: Makefile.in,v 1.4 2004/01/08 12:21:39 ultike Exp $" srcdir = @srcdir@ top_srcdir = @top_srcdir@ @@ -22,7 +22,7 @@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = . +top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ @@ -42,7 +42,6 @@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ -AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -50,6 +49,30 @@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +COND_DBDIR_FALSE = @COND_DBDIR_FALSE@ +COND_DBDIR_TRUE = @COND_DBDIR_TRUE@ +COND_MODCCONTROL_FALSE = @COND_MODCCONTROL_FALSE@ +COND_MODCCONTROL_TRUE = @COND_MODCCONTROL_TRUE@ +COND_MODCLIENTEXAMPLE_FALSE = @COND_MODCLIENTEXAMPLE_FALSE@ +COND_MODCLIENTEXAMPLE_TRUE = @COND_MODCLIENTEXAMPLE_TRUE@ +COND_MODCLONER_FALSE = @COND_MODCLONER_FALSE@ +COND_MODCLONER_TRUE = @COND_MODCLONER_TRUE@ +COND_MODCSERVICE_FALSE = @COND_MODCSERVICE_FALSE@ +COND_MODCSERVICE_TRUE = @COND_MODCSERVICE_TRUE@ +COND_MODDRONESCAN_FALSE = @COND_MODDRONESCAN_FALSE@ +COND_MODDRONESCAN_TRUE = @COND_MODDRONESCAN_TRUE@ +COND_MODGNUTEST_FALSE = @COND_MODGNUTEST_FALSE@ +COND_MODGNUTEST_TRUE = @COND_MODGNUTEST_TRUE@ +COND_MODNICKSERV_FALSE = @COND_MODNICKSERV_FALSE@ +COND_MODNICKSERV_TRUE = @COND_MODNICKSERV_TRUE@ +COND_MODSCANNER_FALSE = @COND_MODSCANNER_FALSE@ +COND_MODSCANNER_TRUE = @COND_MODSCANNER_TRUE@ +COND_MODSNOOP_FALSE = @COND_MODSNOOP_FALSE@ +COND_MODSNOOP_TRUE = @COND_MODSNOOP_TRUE@ +COND_MODSTATS_FALSE = @COND_MODSTATS_FALSE@ +COND_MODSTATS_TRUE = @COND_MODSTATS_TRUE@ +COND_TESTDIR_FALSE = @COND_TESTDIR_FALSE@ +COND_TESTDIR_TRUE = @COND_TESTDIR_TRUE@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ @@ -57,6 +80,7 @@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ +DB = @DB@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO = @ECHO@ @@ -65,16 +89,14 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ INCLTDL = @INCLTDL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ +LIBGNUWORLD = @LIBGNUWORLD@ LIBLTDL = @LIBLTDL@ -LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ @@ -84,6 +106,7 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ +NEW_MODS = @NEW_MODS@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ @@ -99,10 +122,8 @@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ -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@ @@ -110,7 +131,6 @@ 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@ bindir = @bindir@ build = @build@ @@ -120,7 +140,6 @@ build_vendor = @build_vendor@ datadir = @datadir@ exec_prefix = @exec_prefix@ -glibdir = @glibdir@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ @@ -138,8 +157,10 @@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ +subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ +threadLib = @threadLib@ lib_LTLIBRARIES = libuworld.la libuworld_la_SOURCES = uworld.cc \ @@ -177,6 +198,7 @@ OPCHANCommand.cc \ PARTCommand.cc \ QUOTECommand.cc \ + RELOADCommand.cc \ REMBADCHANCommand.cc \ REMGLINECommand.cc \ REMUSERCommand.cc \ @@ -193,10 +215,9 @@ WHOISCommand.cc libuworld_la_LDFLAGS = -module -export-dynamic -L@PGSQL_LIB@ -lpq++ -subdir = . -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +subdir = mod.uworld mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs -CONFIG_HEADER = defs.h +CONFIG_HEADER = $(top_builddir)/include/defs.h CONFIG_CLEAN_FILES = LTLIBRARIES = $(lib_LTLIBRARIES) @@ -211,15 +232,15 @@ LASTCOMMCommand.lo LEARNNETCommand.lo LISTCommand.lo \ LOGINCommand.lo MODECommand.lo MODUSERCommand.lo \ NEWPASSCommand.lo OMSGCommand.lo OPCHANCommand.lo \ - PARTCommand.lo QUOTECommand.lo REMBADCHANCommand.lo \ - REMGLINECommand.lo REMUSERCommand.lo SAYCommand.lo \ - SCANCommand.lo SERVLISTCommand.lo SHUTDOWNCommand.lo \ - STATUSCommand.lo SUSPENDCommand.lo TRANSLATECommand.lo \ - UPTIMECommand.lo UNSUSPENDCommand.lo WALLOPSCommand.lo \ - WHOISCommand.lo + PARTCommand.lo QUOTECommand.lo RELOADCommand.lo \ + REMBADCHANCommand.lo REMGLINECommand.lo REMUSERCommand.lo \ + SAYCommand.lo SCANCommand.lo SERVLISTCommand.lo \ + SHUTDOWNCommand.lo STATUSCommand.lo SUSPENDCommand.lo \ + TRANSLATECommand.lo UPTIMECommand.lo UNSUSPENDCommand.lo \ + WALLOPSCommand.lo WHOISCommand.lo libuworld_la_OBJECTS = $(am_libuworld_la_OBJECTS) -DEFAULT_INCLUDES = -I. -I$(srcdir) -I. +DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles @AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/ACCESSCommand.Plo \ @@ -250,6 +271,7 @@ @AMDEP_TRUE@ ./$(DEPDIR)/OPCHANCommand.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/PARTCommand.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/QUOTECommand.Plo \ +@AMDEP_TRUE@ ./$(DEPDIR)/RELOADCommand.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/REMBADCHANCommand.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/REMGLINECommand.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/REMUSERCommand.Plo \ @@ -278,49 +300,19 @@ $(AM_LDFLAGS) $(LDFLAGS) -o $@ DIST_SOURCES = $(libuworld_la_SOURCES) DIST_COMMON = README AUTHORS COPYING ChangeLog INSTALL Makefile.am \ - Makefile.in NEWS aclocal.m4 config.guess config.sub configure \ - configure.ac defs.h.in depcomp install-sh ltmain.sh missing \ - mkinstalldirs + Makefile.in NEWS config.guess config.sub configure configure.ac \ + depcomp install-sh ltmain.sh missing mkinstalldirs SOURCES = $(libuworld_la_SOURCES) -all: defs.h - $(MAKE) $(AM_MAKEFLAGS) all-am +all: all-am .SUFFIXES: .SUFFIXES: .cc .lo .o .obj - -am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ - configure.lineno $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4) cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu Makefile + $(AUTOMAKE) --gnu mod.uworld/Makefile Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in $(top_builddir)/config.status - cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe) - -$(top_builddir)/config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - $(SHELL) ./config.status --recheck -$(srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(srcdir)/configure.ac $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES) - cd $(srcdir) && $(AUTOCONF) - -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.ac - cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) - -defs.h: stamp-h1 - @if test ! -f $@; then \ - rm -f stamp-h1; \ - $(MAKE) stamp-h1; \ - else :; fi - -stamp-h1: $(srcdir)/defs.h.in $(top_builddir)/config.status - @rm -f stamp-h1 - cd $(top_builddir) && $(SHELL) ./config.status defs.h - -$(srcdir)/defs.h.in: @MAINTAINER_MODE_TRUE@ $(top_srcdir)/configure.ac $(ACLOCAL_M4) - cd $(top_srcdir) && $(AUTOHEADER) - touch $(srcdir)/defs.h.in - -distclean-hdr: - -rm -f defs.h stamp-h1 + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe) libLTLIBRARIES_INSTALL = $(INSTALL) install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) @@ -386,6 +378,7 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/OPCHANCommand.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/PARTCommand.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/QUOTECommand.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/RELOADCommand.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/REMBADCHANCommand.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/REMGLINECommand.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/REMUSERCommand.Plo@am__quote@ @@ -414,7 +407,7 @@ .cc.o: @am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ @am__fastdepCXX_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \ +@am__fastdepCXX_TRUE@ then mv "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \ @am__fastdepCXX_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ @am__fastdepCXX_TRUE@ fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @@ -424,19 +417,19 @@ .cc.obj: @am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ -@am__fastdepCXX_TRUE@ -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \ +@am__fastdepCXX_TRUE@ -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'`; \ +@am__fastdepCXX_TRUE@ then mv "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \ @am__fastdepCXX_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ @am__fastdepCXX_TRUE@ fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi` +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'` .cc.lo: @am__fastdepCXX_TRUE@ if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ @am__fastdepCXX_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; \ +@am__fastdepCXX_TRUE@ then mv "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; \ @am__fastdepCXX_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ @am__fastdepCXX_TRUE@ fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @@ -471,11 +464,11 @@ END { for (i in files) print i; }'`; \ mkid -fID $$unique -TAGS: $(HEADERS) $(SOURCES) defs.h.in $(TAGS_DEPENDENCIES) \ +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ - list='$(SOURCES) $(HEADERS) defs.h.in $(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 | \ @@ -486,11 +479,11 @@ $$tags $$unique ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) defs.h.in $(TAGS_DEPENDENCIES) \ +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ - list='$(SOURCES) $(HEADERS) defs.h.in $(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 | \ @@ -509,27 +502,14 @@ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -top_distdir = . -distdir = $(PACKAGE)-$(VERSION) - -am__remove_distdir = \ - { test ! -d $(distdir) \ - || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ - && rm -fr $(distdir); }; } - -GZIP_ENV = --best -distuninstallcheck_listfiles = find . -type f -print -distcleancheck_listfiles = find . -type f -print +top_distdir = .. +distdir = $(top_distdir)/$(PACKAGE)-$(VERSION) distdir: $(DISTFILES) - $(am__remove_distdir) - mkdir $(distdir) @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,/[^/]*$$,,'`; \ @@ -550,81 +530,13 @@ || exit 1; \ fi; \ done - -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ - ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ - ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ - ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \ - || chmod -R a+r $(distdir) -dist-gzip: distdir - $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - $(am__remove_distdir) - -dist dist-all: distdir - $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - $(am__remove_distdir) - -# This target untars the dist file and tries a VPATH configuration. Then -# it guarantees that the distribution is self-contained by making another -# tarfile. -distcheck: dist - $(am__remove_distdir) - GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf - - chmod -R a-w $(distdir); chmod a+w $(distdir) - mkdir $(distdir)/_build - mkdir $(distdir)/_inst - chmod a-w $(distdir) - dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ - && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ - && cd $(distdir)/_build \ - && ../configure --srcdir=.. --prefix="$$dc_install_base" \ - $(DISTCHECK_CONFIGURE_FLAGS) \ - && $(MAKE) $(AM_MAKEFLAGS) \ - && $(MAKE) $(AM_MAKEFLAGS) dvi \ - && $(MAKE) $(AM_MAKEFLAGS) check \ - && $(MAKE) $(AM_MAKEFLAGS) install \ - && $(MAKE) $(AM_MAKEFLAGS) installcheck \ - && $(MAKE) $(AM_MAKEFLAGS) uninstall \ - && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ - distuninstallcheck \ - && chmod -R a-w "$$dc_install_base" \ - && ({ \ - (cd ../.. && $(mkinstalldirs) "$$dc_destdir") \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ - distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ - } || { rm -rf "$$dc_destdir"; exit 1; }) \ - && rm -rf "$$dc_destdir" \ - && $(MAKE) $(AM_MAKEFLAGS) dist-gzip \ - && rm -f $(distdir).tar.gz \ - && $(MAKE) $(AM_MAKEFLAGS) distcleancheck - $(am__remove_distdir) - @echo "$(distdir).tar.gz is ready for distribution" | \ - sed 'h;s/./=/g;p;x;p;x' -distuninstallcheck: - @cd $(distuninstallcheck_dir) \ - && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ - || { echo "ERROR: files left after uninstall:" ; \ - if test -n "$(DESTDIR)"; then \ - echo " (check DESTDIR support)"; \ - fi ; \ - $(distuninstallcheck_listfiles) ; \ - exit 1; } >&2 -distcleancheck: distclean - @if test '$(srcdir)' = . ; then \ - echo "ERROR: distcleancheck can only run from a VPATH build" ; \ - exit 1 ; \ - fi - @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ - || { echo "ERROR: files left in build directory after distclean:" ; \ - $(distcleancheck_listfiles) ; \ - exit 1; } >&2 check-am: all-am check: check-am -all-am: Makefile $(LTLIBRARIES) defs.h +all-am: Makefile $(LTLIBRARIES) installdirs: $(mkinstalldirs) $(DESTDIR)$(libdir) + install: install-am install-exec: install-exec-am install-data: install-data-am @@ -655,10 +567,9 @@ mostlyclean-am distclean: distclean-am - -rm -f $(am__CONFIG_DISTCLEAN_FILES) + distclean-am: clean-am distclean-compile distclean-depend \ - distclean-generic distclean-hdr distclean-libtool \ - distclean-tags + distclean-generic distclean-libtool distclean-tags dvi: dvi-am @@ -679,8 +590,7 @@ installcheck-am: maintainer-clean: maintainer-clean-am - -rm -f $(am__CONFIG_DISTCLEAN_FILES) - -rm -rf autom4te.cache + maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am @@ -699,17 +609,16 @@ uninstall-am: uninstall-info-am uninstall-libLTLIBRARIES .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libLTLIBRARIES clean-libtool ctags dist dist-all \ - dist-gzip distcheck distclean distclean-compile \ - distclean-depend distclean-generic distclean-hdr \ - distclean-libtool distclean-tags distcleancheck distdir \ - distuninstallcheck 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-libLTLIBRARIES install-man \ - 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 \ + clean-libLTLIBRARIES clean-libtool ctags distclean \ + distclean-compile distclean-depend distclean-generic \ + distclean-libtool distclean-tags 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-libLTLIBRARIES install-man 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-libLTLIBRARIES # Tell versions [3.59,3.63) of GNU make to not export all variables. Index: mod.uworld/RELOADCommand.cc diff -u /dev/null mod.uworld/RELOADCommand.cc:1.1 --- /dev/null Thu Jan 8 04:21:50 2004 +++ mod.uworld/RELOADCommand.cc Thu Jan 8 04:21:39 2004 @@ -0,0 +1,80 @@ +/** + * RELOADCommand.cc + * + * 18/12/2003 - Reed Loden <re...@re...> + * Initial Version + * + * Unloads the bot's module and reloads it + * + * 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. + * + * $Id: RELOADCommand.cc,v 1.1 2004/01/08 12:21:39 ultike Exp $ + */ + +#include <string> + +#include "config.h" +#include "StringTokenizer.h" + +#include "uworld.h" +#include "levels.h" + +RCSTAG("$Id: RELOADCommand.cc,v 1.1 2004/01/08 12:21:39 ultike Exp $"); + +namespace gnuworld +{ + +using std::string; + +namespace uwrld +{ + +bool RELOADCommand::Exec(iClient* theClient, const string& Message) +{ + +StringTokenizer st(Message); +bool PrivMsg = bot->SendPrivmsg(theClient); + +short int operLevel = bot->getOperLevel(theClient); +if(operLevel < levels::shutdown) + { + bot->SendTo(theClient, PrivMsg, "This command requires access level %d!", levels::shutdown); + return false; + } + + +uwUser* theUser = bot->isAuthed(theClient); +if(!theUser) return false; +bot->addLog(theClient, "RELOAD %s", st.assemble(1).c_str()); +bot->MsgChanLog("%s ( %s ) asked me to reload!", + theUser->getUserName().c_str(), theClient->getNickUserHost().c_str()); + + +bot->Notice(theClient, "Reloading client...see you on the flip side"); + +if (st.size() < 2) { + server->UnloadClient(bot, "Reloading..."); +} else { + server->UnloadClient(bot, st.assemble(1)); +} + +server->LoadClient("libuworld", bot->getConfigFileName()); + +return true; +} + +} // namespace uwrld +} // namespace gnuworld Index: mod.uworld/doc/commands.sql diff -u mod.uworld/doc/commands.sql:1.1 mod.uworld/doc/commands.sql:1.2 --- mod.uworld/doc/commands.sql:1.1 Thu Nov 13 14:21:02 2003 +++ mod.uworld/doc/commands.sql Thu Jan 8 04:21:39 2004 @@ -125,3 +125,7 @@ INSERT INTO commands (command,shortdesc,level,longdesc) VALUES('AGL', 'modifies the AGL-table', 700, ''); + +INSERT INTO commands (command,shortdesc,level,longdesc) +VALUES('RELOAD', 'reloads the bot', 900, ''); + Index: mod.uworld/levels.h diff -u mod.uworld/levels.h:1.3 mod.uworld/levels.h:1.4 --- mod.uworld/levels.h:1.3 Thu Jul 10 07:22:18 2003 +++ mod.uworld/levels.h Thu Jan 8 04:21:39 2004 @@ -49,6 +49,7 @@ const int invme = 900; const int shutdown = 900; + const int reload = 900; const int learnnet = 900; const int quote = 950; Index: mod.uworld/uwUser.h diff -u mod.uworld/uwUser.h:1.4 mod.uworld/uwUser.h:1.5 --- mod.uworld/uwUser.h:1.4 Wed Jan 7 17:24:25 2004 +++ mod.uworld/uwUser.h Thu Jan 8 04:21:39 2004 @@ -41,9 +41,6 @@ inline const unsigned int& getAccess() const { return access ; } - inline const string& getNumeric() const - { return Numeric ; } - inline bool getFlag( const FlagType& whichFlag ) const { return (whichFlag == (flags & whichFlag)) ; } @@ -74,9 +71,6 @@ inline void setAccess( const unsigned int& _access ) { access = _access; } - inline void setNumeric( const string& _numeric ) - { Numeric = _numeric; } - inline void setPassword( const string& _password ) { password = _password; } @@ -111,7 +105,6 @@ string user_name ; string password ; unsigned int access ; - string Numeric; FlagType flags ; time_t suspend_expire ; unsigned int suspend_level ; Index: mod.uworld/uworld.cc diff -u mod.uworld/uworld.cc:1.6 mod.uworld/uworld.cc:1.7 --- mod.uworld/uworld.cc:1.6 Wed Jan 7 17:24:25 2004 +++ mod.uworld/uworld.cc Thu Jan 8 04:21:39 2004 @@ -167,6 +167,7 @@ RegisterCommand( new CHANINFOCommand( this, "CHANINFO", "<channel> : shows some info on the channel")); RegisterCommand( new AGLCommand( this, "AGL", "<add|del|list|update> <host> <connections>: modifies the AGL-table")); RegisterCommand( new STATUSCommand( this, "STATUS", ": show the bot's internal status")); +RegisterCommand( new RELOADCommand( this, "RELOAD", ": reload the bot")); } uworld::~uworld() @@ -1236,16 +1237,18 @@ void uworld::listUsers(iClient* theClient, bool PrivMsg) { uwUser* curUser; -SendTo(theClient, PrivMsg,"| USER | ACCESS |"); -SendTo(theClient, PrivMsg,"-----------------------------------------------"); +SendTo(theClient, PrivMsg,"| USER | ACCESS | AUTHED AS |"); +SendTo(theClient, PrivMsg,"-----------------------------------------------------"); for(userListType::iterator ptr = userList.begin(); ptr != userList.end(); ptr++) { curUser = ptr->second; - SendTo(theClient, PrivMsg, "| \002%-28s\002 | %12d\002 |", - curUser->getUserName().c_str(), curUser->getAccess() ); + SendTo(theClient, PrivMsg, "| %-20s | %7d%s | %-15s |", + curUser->getUserName().c_str(), curUser->getAccess(), + curUser->getFlag(uwUser::NONEEDOP) ? "*" : " ", + isAuthed(curUser) ? curUser->getClient()->getNickName().c_str() : "" ); } -SendTo(theClient, PrivMsg,"-------------= End Of Access List =------------"); +SendTo(theClient, PrivMsg,"----------------= End Of Access List =---------------"); } void uworld::addUser (uwUser* theUser) Index: mod.uworld/uworldCommands.h diff -u mod.uworld/uworldCommands.h:1.3 mod.uworld/uworldCommands.h:1.4 --- mod.uworld/uworldCommands.h:1.3 Thu Jul 10 07:22:18 2003 +++ mod.uworld/uworldCommands.h Thu Jan 8 04:21:39 2004 @@ -1,5 +1,5 @@ #ifndef __uworldCOMMANDS_H -#define __uworldCOMMANDS_H "$Id: uworldCommands.h,v 1.3 2003/07/10 14:22:18 dan_karrels Exp $" +#define __uworldCOMMANDS_H "$Id: uworldCommands.h,v 1.4 2004/01/08 12:21:39 ultike Exp $" #include <string> #include "iClient.h" @@ -108,6 +108,7 @@ DECLARE_COMMAND( CHANINFO ); DECLARE_COMMAND( AGL ); DECLARE_COMMAND( STATUS ); +DECLARE_COMMAND( RELOAD ); } // namespace gnuworld ----------------------- End of diff ----------------------- |
From: Matthias C. <ul...@us...> - 2004-01-08 01:24:38
|
Committer : Matthias Crauwels <ul...@us...> CVSROOT : /cvsroot/mod-uworld Module : mod.uworld Commit time: 2004-01-08 01:24:35 UTC Modified files: ACCESSCommand.cc ADDUSERCommand.cc AGLCommand.cc BADCHANCommand.cc CHANINFOCommand.cc CHECKNETCommand.cc CLEARCHANCommand.cc DEAUTHCommand.cc DELSERVERCommand.cc FDEAUTHCommand.cc GLINECommand.cc GLOBALNOTCommand.cc HELPCommand.cc INVITECommand.cc INVMECommand.cc JOINCommand.cc JUPECommand.cc LASTCOMMCommand.cc LEARNNETCommand.cc LISTCommand.cc LOGINCommand.cc MODECommand.cc MODUSERCommand.cc NEWPASSCommand.cc OMSGCommand.cc OPCHANCommand.cc PARTCommand.cc REMBADCHANCommand.cc REMGLINECommand.cc REMUSERCommand.cc SAYCommand.cc SCANCommand.cc SERVLISTCommand.cc SHUTDOWNCommand.cc STATUSCommand.cc SUSPENDCommand.cc TRANSLATECommand.cc UNSUSPENDCommand.cc UPTIMECommand.cc WALLOPSCommand.cc WHOISCommand.cc constants.h uwServer.h uwUser.h uworld.cc uworld.h Log message: Author: Matthias Crauwels Log message: Updated the internal stuctures to be more efficient! General bugfixes Updates to sync with undernet rep ---------------------- diff included ---------------------- Index: mod.uworld/ACCESSCommand.cc diff -u mod.uworld/ACCESSCommand.cc:1.3 mod.uworld/ACCESSCommand.cc:1.4 --- mod.uworld/ACCESSCommand.cc:1.3 Thu Jul 10 07:22:18 2003 +++ mod.uworld/ACCESSCommand.cc Wed Jan 7 17:24:25 2004 @@ -13,7 +13,7 @@ #include "uworldCommands.h" #include "constants.h" -const char ACCESSCommand_cc_rcsId[] = "$Id: ACCESSCommand.cc,v 1.3 2003/07/10 14:22:18 dan_karrels Exp $"; +const char ACCESSCommand_cc_rcsId[] = "$Id: ACCESSCommand.cc,v 1.4 2004/01/08 01:24:25 ultike Exp $"; namespace gnuworld { @@ -37,25 +37,38 @@ string Uname; if(st.size() > 1) { - if(st[1].size() > 64) + uwUser* curUser = bot->getUser(bot->removeSqlChars(st[1])); + if(!curUser) { - bot->SendTo(theClient, PrivMsg,"User name can't be more than 64 chars"); + bot->SendTo(theClient, PrivMsg, "No such user"); return false; } - Uname = string_lower(st[1]); + + bot->SendTo(theClient, PrivMsg, "USER: \002%12s \002 ACCESS: \002 %4d\002", + curUser->getUserName().c_str(), curUser->getAccess() ); + bot->SendTo(theClient, PrivMsg, "NeedOp: \002%s\002 Console: \002%s\002 Privmsg: \002%s\002" , + curUser->getFlag(uwUser::NONEEDOP) ? "NO" : "YES", + curUser->getFlag(uwUser::CONSOLE) ? "YES" : "NO", + curUser->getFlag(uwUser::PRIVMSG) ? "YES" : "NO"); + if (curUser->getFlag(uwUser::SUSPEND)) + { + bot->SendTo(theClient, PrivMsg, "\002User is suspended until %s (level %d)\002", + bot->convertToAscTime(curUser->getSuspendExpire() ), + curUser->getSuspendLevel() ); + } + iClient* curClient = bot->isAuthed(curUser); + if(curClient) + { + bot->SendTo(theClient, PrivMsg, "Currently logged in as: %s", + curClient->getRealNickUserHost().c_str()); + } + else + bot->SendTo(theClient, PrivMsg, "Currently not logged in."); } else - { - Uname = ""; - } - -bot->listUsers(theClient, PrivMsg, Uname); - + bot->listUsers(theClient, PrivMsg); -string username = "notLoggedIn"; -uwUser* theUser = bot->IsAuth(theClient); -if(theUser) username = theUser->getUserName(); -bot->addLog(username, theClient, "ACCESS %s", st.assemble(1).c_str()); +bot->addLog(theClient, "ACCESS %s", st.assemble(1).c_str()); // no msgchanlog here! Index: mod.uworld/ADDUSERCommand.cc diff -u mod.uworld/ADDUSERCommand.cc:1.3 mod.uworld/ADDUSERCommand.cc:1.4 --- mod.uworld/ADDUSERCommand.cc:1.3 Thu Jul 10 07:22:18 2003 +++ mod.uworld/ADDUSERCommand.cc Wed Jan 7 17:24:25 2004 @@ -17,7 +17,7 @@ #include "levels.h" #include "uworld.h" -const char ADDUSERCommand_cc_rcsId[] = "$Id: ADDUSERCommand.cc,v 1.3 2003/07/10 14:22:18 dan_karrels Exp $"; +const char ADDUSERCommand_cc_rcsId[] = "$Id: ADDUSERCommand.cc,v 1.4 2004/01/08 01:24:25 ultike Exp $"; namespace gnuworld { @@ -57,7 +57,7 @@ return false; } -uwUser* tmpUser = bot->GetUser(bot->removeSqlChars(st[1])); +uwUser* tmpUser = bot->getUser(bot->removeSqlChars(st[1])); if( tmpUser ) { bot->SendTo(theClient, PrivMsg, "This user allready exists!!"); @@ -91,9 +91,7 @@ bot->SendTo(theClient, PrivMsg, "Added %s with level %d", bot->removeSqlChars(st[1]).c_str(), level); -uwUser* theUser = bot->IsAuth(theClient); -if(!theUser) return false; -bot->addLog(theUser, theClient, "ADDUSER %s %s", st[1].c_str(), st[2].c_str()); +bot->addLog(theClient, "ADDUSER %s %s", st[1].c_str(), st[2].c_str()); bot->MsgChanLog("%s ( %s ) added user %s with access %d", theClient->getNickName().c_str(), theClient->getNickUserHost().c_str(), newUser->getUserName().c_str(), newUser->getAccess()); Index: mod.uworld/AGLCommand.cc diff -u mod.uworld/AGLCommand.cc:1.4 mod.uworld/AGLCommand.cc:1.5 --- mod.uworld/AGLCommand.cc:1.4 Mon Nov 17 10:27:59 2003 +++ mod.uworld/AGLCommand.cc Wed Jan 7 17:24:25 2004 @@ -3,7 +3,7 @@ * * AUTO-GLINE handler * - * $Id: AGLCommand.cc,v 1.4 2003/11/17 18:27:59 ultike Exp $ + * $Id: AGLCommand.cc,v 1.5 2004/01/08 01:24:25 ultike Exp $ */ #include <string> @@ -40,12 +40,16 @@ string command = string_upper(st[1]); -uwUser* theUser = bot->IsAuth(theClient); -if(!theUser) return false; -bot->addLog(theUser, theClient, "AGL %s", st.assemble(1).c_str()); +uwUser* theUser = bot->isAuthed(theClient); +if(!theUser) + return false; + +bot->addLog(theClient, "AGL %s", st.assemble(1).c_str()); bot->MsgChanLog("%s ( %s ) - AGL %s", theUser->getUserName().c_str(), theClient->getNickUserHost().c_str(), st.assemble(1).c_str()); + + if(command == "LIST") { if(operLevel < levels::agl::list) @@ -177,8 +181,6 @@ delete theAGL; return true; } - - Usage( theClient ); return true; Index: mod.uworld/BADCHANCommand.cc diff -u mod.uworld/BADCHANCommand.cc:1.3 mod.uworld/BADCHANCommand.cc:1.4 --- mod.uworld/BADCHANCommand.cc:1.3 Thu Jul 10 07:22:18 2003 +++ mod.uworld/BADCHANCommand.cc Wed Jan 7 17:24:25 2004 @@ -1,6 +1,6 @@ /* * BADCHANCommand.cc - * $Id: BADCHANCommand.cc,v 1.3 2003/07/10 14:22:18 dan_karrels Exp $ + * $Id: BADCHANCommand.cc,v 1.4 2004/01/08 01:24:25 ultike Exp $ * */ @@ -116,10 +116,11 @@ newGline->loadData(newGline->getHost()); bot->addGline(newGline); bot->SendTo(theClient, PrivMsg, "Badchan for %s added.", newGline->getHost().c_str()); - uwUser* theUser = bot->IsAuth(theClient); + + uwUser* theUser = bot->isAuthed(theClient); if(!theUser) return false; - bot->addLog(theUser, theClient, "BADCHAN %s", st.assemble(1).c_str()); + bot->addLog(theClient, "BADCHAN %s", st.assemble(1).c_str()); bot->MsgChanLog("%s ( %s ) badchanned %s untill %s", theUser->getUserName().c_str(), theClient->getNickUserHost().c_str(), newGline->getHost().c_str(), (newGline->getExpires() == 0) ? "PERMANENT" : bot->convertToAscTime(newGline->getExpires()) ); Index: mod.uworld/CHANINFOCommand.cc diff -u mod.uworld/CHANINFOCommand.cc:1.3 mod.uworld/CHANINFOCommand.cc:1.4 --- mod.uworld/CHANINFOCommand.cc:1.3 Thu Jul 10 07:22:18 2003 +++ mod.uworld/CHANINFOCommand.cc Wed Jan 7 17:24:25 2004 @@ -3,7 +3,7 @@ * * Shows information about a channel * - * $Id: CHANINFOCommand.cc,v 1.3 2003/07/10 14:22:18 dan_karrels Exp $ + * $Id: CHANINFOCommand.cc,v 1.4 2004/01/08 01:24:25 ultike Exp $ * */ #include <string> @@ -57,11 +57,9 @@ bot->SendTo(theClient, PrivMsg, "Topic: %s", theChan->getTopic().c_str()); #endif -string username = "notLoggedIn"; -uwUser* theUser = bot->IsAuth(theClient); -if(theUser) username = theUser->getUserName(); -bot->addLog(username, theClient, "CHANINFO %s", st[1].c_str()); -bot->MsgChanLog("%s ( %s ) - CHANINFO %s", username.c_str(), +uwUser* theUser = bot->isAuthed(theClient); +bot->addLog(theClient, "CHANINFO %s", st[1].c_str()); +bot->MsgChanLog("%s ( %s ) - CHANINFO %s", theUser ? theUser->getUserName().c_str() : "notLoggedIn", theClient->getNickUserHost().c_str(), st[1].c_str()); Index: mod.uworld/CHECKNETCommand.cc diff -u mod.uworld/CHECKNETCommand.cc:1.3 mod.uworld/CHECKNETCommand.cc:1.4 --- mod.uworld/CHECKNETCommand.cc:1.3 Thu Jul 10 07:22:18 2003 +++ mod.uworld/CHECKNETCommand.cc Wed Jan 7 17:24:25 2004 @@ -1,6 +1,6 @@ /* * CHECKNETCommand.cc - * $Id: CHECKNETCommand.cc,v 1.3 2003/07/10 14:22:18 dan_karrels Exp $ + * $Id: CHECKNETCommand.cc,v 1.4 2004/01/08 01:24:25 ultike Exp $ * */ @@ -39,9 +39,9 @@ bot->SendTo(theClient, PrivMsg, "Listing missing servers..."); bot->listMissingServers(theClient, PrivMsg); -uwUser* theUser = bot->IsAuth(theClient); +uwUser* theUser = bot->isAuthed(theClient); if(!theUser) return false; -bot->addLog(theUser, theClient, "CHECKNET"); +bot->addLog(theClient, "CHECKNET"); bot->MsgChanLog("%s ( %s ) - CHECKNET", theUser->getUserName().c_str(), theClient->getNickUserHost().c_str() ); return true; Index: mod.uworld/CLEARCHANCommand.cc diff -u mod.uworld/CLEARCHANCommand.cc:1.3 mod.uworld/CLEARCHANCommand.cc:1.4 --- mod.uworld/CLEARCHANCommand.cc:1.3 Thu Jul 10 07:22:18 2003 +++ mod.uworld/CLEARCHANCommand.cc Wed Jan 7 17:24:25 2004 @@ -14,7 +14,7 @@ #include "StringTokenizer.h" #include "levels.h" -const char CLEARCHANCommand_cc_rcsId[] = "$Id: CLEARCHANCommand.cc,v 1.3 2003/07/10 14:22:18 dan_karrels Exp $"; +const char CLEARCHANCommand_cc_rcsId[] = "$Id: CLEARCHANCommand.cc,v 1.4 2004/01/08 01:24:25 ultike Exp $"; namespace gnuworld { @@ -58,9 +58,9 @@ string remModes = ""; //Holds the modes that we are removing string args = ""; //Holds the arguments for the remModes -uwUser* theUser = bot->IsAuth(theClient); +uwUser* theUser = bot->isAuthed(theClient); if(!theUser) return false; -bot->addLog(theUser, theClient, "CLEARCHAN %s", theChan->getName().c_str()); +bot->addLog(theClient, "CLEARCHAN %s", theChan->getName().c_str()); bot->MsgChanLog("%s ( %s ) - CLEARCHAN %s", theUser->getUserName().c_str(), theClient->getNickUserHost().c_str(), st.assemble(1).c_str()); Index: mod.uworld/DEAUTHCommand.cc diff -u mod.uworld/DEAUTHCommand.cc:1.3 mod.uworld/DEAUTHCommand.cc:1.4 --- mod.uworld/DEAUTHCommand.cc:1.3 Thu Jul 10 07:22:18 2003 +++ mod.uworld/DEAUTHCommand.cc Wed Jan 7 17:24:25 2004 @@ -27,18 +27,18 @@ return true; } -uwUser* theUser = bot->IsAuth(theClient); +uwUser* theUser = bot->isAuthed(theClient); if(!theUser) { bot->SendTo(theClient, PrivMsg, "You have to be logged in before you can DEAUTH"); return false; } -bot->addLog(theUser, theClient, "DEAUTH"); +bot->addLog(theClient, "DEAUTH"); bot->MsgChanLog("%s ( %s ) - DEAUTH %s", theUser->getUserName().c_str(), theClient->getNickUserHost().c_str(), st.assemble(1).c_str()); -bot->deAuthUser(theClient->getCharYYXXX()); +bot->deAuthUser(theClient); bot->SendTo(theClient, PrivMsg, "You have successfully been deauthed! Cya!"); return true; } Index: mod.uworld/DELSERVERCommand.cc diff -u mod.uworld/DELSERVERCommand.cc:1.3 mod.uworld/DELSERVERCommand.cc:1.4 --- mod.uworld/DELSERVERCommand.cc:1.3 Thu Jul 10 07:22:18 2003 +++ mod.uworld/DELSERVERCommand.cc Wed Jan 7 17:24:25 2004 @@ -1,6 +1,6 @@ /* * DELSERVERCommand.cc - * $Id: DELSERVERCommand.cc,v 1.3 2003/07/10 14:22:18 dan_karrels Exp $ + * $Id: DELSERVERCommand.cc,v 1.4 2004/01/08 01:24:25 ultike Exp $ * */ @@ -54,9 +54,9 @@ bot->remServer(remServer); bot->SendTo(theClient, PrivMsg, "Removed %s from my memory!", st[1].c_str()); -uwUser* theUser = bot->IsAuth(theClient); +uwUser* theUser = bot->isAuthed(theClient); if(!theUser) return false; -bot->addLog(theUser, theClient, "DELSERVER %s", st[1].c_str()); +bot->addLog(theClient, "DELSERVER %s", st[1].c_str()); bot->MsgChanLog("%s ( %s ) - DELSERVER %s", theUser->getUserName().c_str(), theClient->getNickUserHost().c_str(), st[1].c_str()); Index: mod.uworld/FDEAUTHCommand.cc diff -u mod.uworld/FDEAUTHCommand.cc:1.3 mod.uworld/FDEAUTHCommand.cc:1.4 --- mod.uworld/FDEAUTHCommand.cc:1.3 Thu Jul 10 07:22:18 2003 +++ mod.uworld/FDEAUTHCommand.cc Wed Jan 7 17:24:25 2004 @@ -49,20 +49,20 @@ return false; } -const uwUser* authUser = bot->IsAuth(targetClient); +const uwUser* authUser = bot->isAuthed(targetClient); if(!authUser) { bot->SendTo(theClient, PrivMsg, "User %s is not authed", st[1].c_str()); return false; } -uwUser* theUser = bot->IsAuth(theClient); +uwUser* theUser = bot->isAuthed(theClient); if(!theUser) return false; -bot->addLog(theUser, theClient, "FDEAUTH %s", st[1].c_str()); +bot->addLog(theClient, "FDEAUTH %s", st[1].c_str()); bot->MsgChanLog("%s ( %s ) - FDEAUTH %s", theUser->getUserName().c_str(), theClient->getNickUserHost().c_str(), st.assemble(1).c_str()); -bot->deAuthUser(targetClient->getCharYYXXX()); +bot->deAuthUser(targetClient); return true; } Index: mod.uworld/GLINECommand.cc diff -u mod.uworld/GLINECommand.cc:1.3 mod.uworld/GLINECommand.cc:1.4 --- mod.uworld/GLINECommand.cc:1.3 Thu Jul 10 07:22:18 2003 +++ mod.uworld/GLINECommand.cc Wed Jan 7 17:24:25 2004 @@ -1,6 +1,6 @@ /* * GLINECommand.cc - * $Id: GLINECommand.cc,v 1.3 2003/07/10 14:22:18 dan_karrels Exp $ + * $Id: GLINECommand.cc,v 1.4 2004/01/08 01:24:25 ultike Exp $ * */ @@ -181,9 +181,9 @@ newGline->loadData(newGline->getHost()); bot->addGline(newGline); bot->SendTo(theClient, PrivMsg, "Gline %s added.", newGline->getHost().c_str()); - uwUser* theUser = bot->IsAuth(theClient); + uwUser* theUser = bot->isAuthed(theClient); if(!theUser) return false; - bot->addLog(theUser, theClient, "GLINE %s", st.assemble(1).c_str()); + bot->addLog(theClient, "GLINE %s", st.assemble(1).c_str()); bot->MsgChanLog("%s ( %s ) added gline %s untill %s", theUser->getUserName().c_str(), theClient->getNickUserHost().c_str(), newGline->getHost().c_str(), bot->convertToAscTime(newGline->getExpires())); @@ -257,7 +257,7 @@ for( Channel::const_userIterator ptr = theChan->userList_begin() ; ptr != theChan->userList_end() ; ++ptr ) { tmpClient = ptr->second->getClient(); - if( !tmpClient->isOper() && !tmpClient->getMode(iClient::MODE_SERVICES) && !bot->IsAuth(tmpClient) ) + if( !tmpClient->isOper() && !tmpClient->getMode(iClient::MODE_SERVICES) && !bot->isAuthed(tmpClient) ) { hostname = tmpClient->getRealInsecureHost(); username = tmpClient->getUserName(); @@ -291,9 +291,9 @@ } bot->SendTo(theClient, PrivMsg, "Gline for channel %s added. (%d users affected)", theChan->getName().c_str(), affected); -uwUser* theUser = bot->IsAuth(theClient); +uwUser* theUser = bot->isAuthed(theClient); if(!theUser) return false; -bot->addLog(theUser, theClient, "GLINE %s", st.assemble(1).c_str()); +bot->addLog(theClient, "GLINE %s", st.assemble(1).c_str()); bot->MsgChanLog("%s ( %s ) added gline for channel %s affecting %d users", theUser->getUserName().c_str(), theClient->getNickUserHost().c_str(), theChan->getName().c_str(), affected); Index: mod.uworld/GLOBALNOTCommand.cc diff -u mod.uworld/GLOBALNOTCommand.cc:1.4 mod.uworld/GLOBALNOTCommand.cc:1.5 --- mod.uworld/GLOBALNOTCommand.cc:1.4 Wed Nov 5 17:27:10 2003 +++ mod.uworld/GLOBALNOTCommand.cc Wed Jan 7 17:24:25 2004 @@ -59,9 +59,9 @@ } } -uwUser* theUser = bot->IsAuth(theClient); +uwUser* theUser = bot->isAuthed(theClient); if(!theUser) return false; -bot->addLog(theUser, theClient, "GLOBALNOTICE %s", st.assemble(1).c_str()); +bot->addLog(theClient, "GLOBALNOTICE %s", st.assemble(1).c_str()); bot->MsgChanLog("%s ( %s ) - GLOBALNOTICE %s", theUser->getUserName().c_str(), theClient->getNickUserHost().c_str(), st.assemble(1).c_str()); Index: mod.uworld/HELPCommand.cc diff -u mod.uworld/HELPCommand.cc:1.3 mod.uworld/HELPCommand.cc:1.4 --- mod.uworld/HELPCommand.cc:1.3 Thu Jul 10 07:22:18 2003 +++ mod.uworld/HELPCommand.cc Wed Jan 7 17:24:25 2004 @@ -11,7 +11,7 @@ #include "uworldCommands.h" #include "constants.h" -const char HELPCommand_cc_rcsId[] = "$Id: HELPCommand.cc,v 1.3 2003/07/10 14:22:18 dan_karrels Exp $"; +const char HELPCommand_cc_rcsId[] = "$Id: HELPCommand.cc,v 1.4 2004/01/08 01:24:25 ultike Exp $"; namespace gnuworld { @@ -84,10 +84,7 @@ bot->SendTo(theClient, PrivMsg, "For command syntax, /msg %s <command> with NO arguments.", bot->getNickName().c_str() ); -string username = "notLoggedIn"; -uwUser* theUser = bot->IsAuth(theClient); -if(theUser) username = theUser->getUserName(); -bot->addLog(username, theClient, "HELP %s", st.assemble(1).c_str()); +bot->addLog(theClient, "HELP %s", st.assemble(1).c_str()); // no msgchanlog return true ; Index: mod.uworld/INVITECommand.cc diff -u mod.uworld/INVITECommand.cc:1.3 mod.uworld/INVITECommand.cc:1.4 --- mod.uworld/INVITECommand.cc:1.3 Thu Jul 10 07:22:18 2003 +++ mod.uworld/INVITECommand.cc Wed Jan 7 17:24:25 2004 @@ -15,7 +15,7 @@ #include "Network.h" #include "levels.h" -const char INVITECommand_cc_rcsId[] = "$Id: INVITECommand.cc,v 1.3 2003/07/10 14:22:18 dan_karrels Exp $"; +const char INVITECommand_cc_rcsId[] = "$Id: INVITECommand.cc,v 1.4 2004/01/08 01:24:25 ultike Exp $"; namespace gnuworld { @@ -46,11 +46,9 @@ return false ; } -string username = "notLoggedIn"; -uwUser* theUser = bot->IsAuth(theClient); -if(theUser) username = theUser->getUserName(); -bot->addLog(username, theClient, "INVITE %s", st.assemble(1).c_str() ); -bot->MsgChanLog("%s ( %s ) - INVITE %s", username.c_str(), +uwUser* theUser = bot->isAuthed(theClient); +bot->addLog(theClient, "INVITE %s", st.assemble(1).c_str() ); +bot->MsgChanLog("%s ( %s ) - INVITE %s", theUser ? theUser->getUserName().c_str() : "notLoggedIn", theClient->getNickUserHost().c_str(), st.assemble(1).c_str()); //If the channel doesnt begin with # add it @@ -82,23 +80,7 @@ invNum.c_str(), chanName.c_str() ) ; -Channel* theChan = Network->findChannel(chanName); -if(theChan) -{ - ChannelUser* mySelf = theChan->findUser(bot->getInstance()); - if(mySelf) - { - bot->QuoteAsServer( buf ) ; - return true; - } - -} - -bot->Join( chanName, string(), 0, false ) ; bot->QuoteAsServer( buf ) ; -bot->Part( chanName ) ; - - return true ; } Index: mod.uworld/INVMECommand.cc diff -u mod.uworld/INVMECommand.cc:1.3 mod.uworld/INVMECommand.cc:1.4 --- mod.uworld/INVMECommand.cc:1.3 Thu Jul 10 07:22:18 2003 +++ mod.uworld/INVMECommand.cc Wed Jan 7 17:24:25 2004 @@ -14,7 +14,7 @@ #include "StringTokenizer.h" #include "levels.h" -const char INVMECommand_cc_rcsId[] = "$Id: INVMECommand.cc,v 1.3 2003/07/10 14:22:18 dan_karrels Exp $"; +const char INVMECommand_cc_rcsId[] = "$Id: INVMECommand.cc,v 1.4 2004/01/08 01:24:25 ultike Exp $"; namespace gnuworld { @@ -44,9 +44,9 @@ return false ; } -uwUser* theUser = bot->IsAuth(theClient); +uwUser* theUser = bot->isAuthed(theClient); if(!theUser) return false; -bot->addLog(theUser, theClient, "INVME"); +bot->addLog(theClient, "INVME"); bot->MsgChanLog("%s ( %s ) invited himself into the consolechan", theUser->getUserName().c_str(), theClient->getNickUserHost().c_str()); bot->InvMe(theClient); Index: mod.uworld/JOINCommand.cc diff -u mod.uworld/JOINCommand.cc:1.3 mod.uworld/JOINCommand.cc:1.4 --- mod.uworld/JOINCommand.cc:1.3 Thu Jul 10 07:22:18 2003 +++ mod.uworld/JOINCommand.cc Wed Jan 7 17:24:25 2004 @@ -43,9 +43,9 @@ chanName.insert( chanName.begin(), '#' ) ; } -uwUser* theUser = bot->IsAuth(theClient); +uwUser* theUser = bot->isAuthed(theClient); if(!theUser) return false; -bot->addLog(theUser, theClient, "JOIN %s", st.assemble(1).c_str() ); +bot->addLog(theClient, "JOIN %s", st.assemble(1).c_str() ); bot->MsgChanLog("%s ( %s ) made me join %s", theUser->getUserName().c_str(), theClient->getNickUserHost().c_str(), chanName.c_str()); Index: mod.uworld/JUPECommand.cc diff -u mod.uworld/JUPECommand.cc:1.5 mod.uworld/JUPECommand.cc:1.6 --- mod.uworld/JUPECommand.cc:1.5 Thu Nov 13 10:30:45 2003 +++ mod.uworld/JUPECommand.cc Wed Jan 7 17:24:25 2004 @@ -46,20 +46,20 @@ return false; } -uwUser* theUser = bot->IsAuth(theClient); +uwUser* theUser = bot->isAuthed(theClient); if(!theUser) return false; -bot->addLog(theUser, theClient, "JUPE %s", st.assemble(1).c_str() ); +bot->addLog(theClient, "JUPE %s", st.assemble(1).c_str() ); bot->MsgChanLog("%s is asking me to jupe %s because : %s", theUser->getUserName().c_str(), jupeName.c_str(), st.assemble(2).c_str()); -iServer* jupeServer = new (std::nothrow) iServer(0, "", jupeName, time( 0 ), st.assemble(2) ) ; +iServer* jupeServer = new (std::nothrow) iServer(bot->getUplinkIntYY(), "00]]]", jupeName, time( 0 ), st.assemble(2)); assert( jupeServer != 0 ) ; +//jupeServer->setJupe(); server->AttachServer( jupeServer, bot ) ; return true; } - } // namespace uwrld } // namespace gnuworld. Index: mod.uworld/LASTCOMMCommand.cc diff -u mod.uworld/LASTCOMMCommand.cc:1.3 mod.uworld/LASTCOMMCommand.cc:1.4 --- mod.uworld/LASTCOMMCommand.cc:1.3 Thu Jul 10 07:22:18 2003 +++ mod.uworld/LASTCOMMCommand.cc Wed Jan 7 17:24:25 2004 @@ -1,6 +1,6 @@ /* * LASTCOMMCommand.cc - * $Id: LASTCOMMCommand.cc,v 1.3 2003/07/10 14:22:18 dan_karrels Exp $ + * $Id: LASTCOMMCommand.cc,v 1.4 2004/01/08 01:24:25 ultike Exp $ * */ @@ -33,11 +33,9 @@ return false; } -string username = "notLoggedIn"; -uwUser* theUser = bot->IsAuth(theClient); -if(theUser) username = theUser->getUserName(); -bot->addLog(username, theClient, "LASTCOMM %s", st.assemble(1).c_str() ); -bot->MsgChanLog("%s ( %s ) - LASTCOMM %s", username.c_str(), +uwUser* theUser = bot->isAuthed(theClient); +bot->addLog(theClient, "LASTCOMM %s", st.assemble(1).c_str() ); +bot->MsgChanLog("%s ( %s ) - LASTCOMM %s", theUser ? theUser->getUserName().c_str() : "notLoggedIn", theClient->getNickUserHost().c_str(), st.assemble(1).c_str()); bot->lastLog(theClient, PrivMsg, aant); Index: mod.uworld/LEARNNETCommand.cc diff -u mod.uworld/LEARNNETCommand.cc:1.3 mod.uworld/LEARNNETCommand.cc:1.4 --- mod.uworld/LEARNNETCommand.cc:1.3 Thu Jul 10 07:22:18 2003 +++ mod.uworld/LEARNNETCommand.cc Wed Jan 7 17:24:25 2004 @@ -1,6 +1,6 @@ /* * LEARNNETCommand.cc - * $Id: LEARNNETCommand.cc,v 1.3 2003/07/10 14:22:18 dan_karrels Exp $ + * $Id: LEARNNETCommand.cc,v 1.4 2004/01/08 01:24:25 ultike Exp $ * */ @@ -36,9 +36,9 @@ return false; } -uwUser* theUser = bot->IsAuth(theClient); +uwUser* theUser = bot->isAuthed(theClient); if(!theUser) return false; -bot->addLog(theUser, theClient, "LEARNNET" ); +bot->addLog(theClient, "LEARNNET" ); bot->MsgChanLog("%s ( %s ) - LEARNNET", theUser->getUserName().c_str(), theClient->getNickUserHost().c_str()); Index: mod.uworld/LISTCommand.cc diff -u mod.uworld/LISTCommand.cc:1.3 mod.uworld/LISTCommand.cc:1.4 --- mod.uworld/LISTCommand.cc:1.3 Thu Jul 10 07:22:18 2003 +++ mod.uworld/LISTCommand.cc Wed Jan 7 17:24:25 2004 @@ -1,6 +1,6 @@ /* * LISTCommand.cc - * $Id: LISTCommand.cc,v 1.3 2003/07/10 14:22:18 dan_karrels Exp $ + * $Id: LISTCommand.cc,v 1.4 2004/01/08 01:24:25 ultike Exp $ * */ @@ -66,9 +66,9 @@ return true; } -uwUser* theUser = bot->IsAuth(theClient); +uwUser* theUser = bot->isAuthed(theClient); if(!theUser) return false; -bot->addLog(theUser, theClient, "LIST %s", st.assemble(1).c_str() ); +bot->addLog(theClient, "LIST %s", st.assemble(1).c_str() ); bot->MsgChanLog("%s ( %s ) - LIST %s", theUser->getUserName().c_str(), theClient->getNickUserHost().c_str(), st.assemble(1).c_str()); Index: mod.uworld/LOGINCommand.cc diff -u mod.uworld/LOGINCommand.cc:1.3 mod.uworld/LOGINCommand.cc:1.4 --- mod.uworld/LOGINCommand.cc:1.3 Thu Jul 10 07:22:18 2003 +++ mod.uworld/LOGINCommand.cc Wed Jan 7 17:24:25 2004 @@ -12,11 +12,12 @@ #include "uwUser.h" #include "levels.h" -const char LOGINCommand_cc_rcsId[] = "$Id: LOGINCommand.cc,v 1.3 2003/07/10 14:22:18 dan_karrels Exp $" ; +const char LOGINCommand_cc_rcsId[] = "$Id: LOGINCommand.cc,v 1.4 2004/01/08 01:24:25 ultike Exp $" ; namespace gnuworld { using std::ends ; +using std::stringstream ; namespace uwrld { @@ -46,7 +47,7 @@ * them they shouldn't be. */ -uwUser* tmpUser = bot->IsAuth(theClient->getCharYYXXX()); +uwUser* tmpUser = bot->isAuthed(theClient); if (tmpUser) { bot->SendTo(theClient, PrivMsg, "Sorry but you are already authenticated."); @@ -67,7 +68,7 @@ // TODO: Force a refresh of the user's info from the db -uwUser* theUser = bot->GetUser(st[1]); +uwUser* theUser = bot->getUser(st[1]); if( !theUser ) { bot->SendTo(theClient, PrivMsg, "No such user"); @@ -131,39 +132,27 @@ return false; } -uwUser *TempAuth = bot->IsAuth(theUser); -if(TempAuth) //there is already a user authenticated under that nick +iClient* tmpClient = bot->isAuthed(theUser); +if(tmpClient) //there is already a user authenticated under that nick { - iClient *tClient = Network->findClient(TempAuth->getNumeric()); - if(tClient) - { - bot->Notice(tClient,"You have just been deauthenticated"); - bot->MsgChanLog("Login conflict for user %s from %s and %s\n", st[1].c_str(), - theClient->getNickName().c_str(), tClient->getNickName().c_str()); - bot->deAuthUser(tClient->getCharYYXXX()); - } + bot->Notice(tmpClient, "You have just been deauthenticated"); + bot->MsgChanLog("Login conflict for user %s from %s and %s\n", st[1].c_str(), + theClient->getNickName().c_str(), tmpClient->getNickName().c_str()); + bot->deAuthUser(tmpClient); } -//theUser->setUserName(st[1]); -theUser->setNumeric(theClient->getCharYYXXX()); -theUser->setClient(theClient); - -if(bot->AuthUser(theUser)) - { - bot->SendTo(theClient, PrivMsg, "Welcome to Uworld, %s!", theUser->getUserName().c_str()); - bot->SendTo(theClient, PrivMsg, "Basic Oper Access [%d]", levels::basicOper); - bot->SendTo(theClient, PrivMsg, "Login approved! (Level %d) %s", bot->getOperLevel(theClient), - theUser->getFlag(uwUser::SUSPEND) ? "You are suspended" : ""); - bot->addLog(theUser, theClient, "LOGIN %s *******", theUser->getUserName().c_str()); - bot->MsgChanLog("%s ( %s ) Login approved! (Level %d) %s\n", theClient->getNickName().c_str(), - theClient->getNickUserHost().c_str(), bot->getOperLevel(theClient), - theUser->getFlag(uwUser::SUSPEND) ? "(suspended)" : ""); - } -else - bot->SendTo(theClient, PrivMsg, "Error in authentication ",theUser->getUserName().c_str()); - -//delete theUser; +theUser->setNumeric(theClient->getCharYYXXX()); +bot->authUser(theClient, theUser); +bot->SendTo(theClient, PrivMsg, "Welcome to Uworld, %s!", theUser->getUserName().c_str()); +bot->SendTo(theClient, PrivMsg, "Basic Oper Access [%d]", levels::basicOper); +bot->SendTo(theClient, PrivMsg, "Login approved! (Level %d) %s", bot->getOperLevel(theClient), + theUser->getFlag(uwUser::SUSPEND) ? "You are suspended" : ""); + +bot->addLog(theClient, "LOGIN %s *******", theUser->getUserName().c_str()); +bot->MsgChanLog("%s ( %s ) Login approved! (Level %d) %s\n", theClient->getNickName().c_str(), + theClient->getNickUserHost().c_str(), bot->getOperLevel(theClient), + theUser->getFlag(uwUser::SUSPEND) ? "(suspended)" : ""); return true; } Index: mod.uworld/MODECommand.cc diff -u mod.uworld/MODECommand.cc:1.3 mod.uworld/MODECommand.cc:1.4 --- mod.uworld/MODECommand.cc:1.3 Thu Jul 10 07:22:18 2003 +++ mod.uworld/MODECommand.cc Wed Jan 7 17:24:25 2004 @@ -15,7 +15,7 @@ #include "levels.h" -const char MODECommand_cc_rcsId[] = "$Id: MODECommand.cc,v 1.3 2003/07/10 14:22:18 dan_karrels Exp $"; +const char MODECommand_cc_rcsId[] = "$Id: MODECommand.cc,v 1.4 2004/01/08 01:24:25 ultike Exp $"; namespace gnuworld { @@ -55,9 +55,9 @@ return true ; } -uwUser* theUser = bot->IsAuth(theClient); +uwUser* theUser = bot->isAuthed(theClient); if(!theUser) return false; -bot->addLog(theUser, theClient, "MODE %s", st.assemble(1).c_str()); +bot->addLog(theClient, "MODE %s", st.assemble(1).c_str()); bot->MsgChanLog("%s ( %s ) - MODE %s\n", theClient->getNickName().c_str(), theClient->getNickUserHost().c_str(), st.assemble(1).c_str()); Index: mod.uworld/MODUSERCommand.cc diff -u mod.uworld/MODUSERCommand.cc:1.3 mod.uworld/MODUSERCommand.cc:1.4 --- mod.uworld/MODUSERCommand.cc:1.3 Thu Jul 10 07:22:18 2003 +++ mod.uworld/MODUSERCommand.cc Wed Jan 7 17:24:25 2004 @@ -17,7 +17,7 @@ #include "levels.h" #include "uworld.h" -const char MODUSERCommand_cc_rcsId[] = "$Id: MODUSERCommand.cc,v 1.3 2003/07/10 14:22:18 dan_karrels Exp $"; +const char MODUSERCommand_cc_rcsId[] = "$Id: MODUSERCommand.cc,v 1.4 2004/01/08 01:24:25 ultike Exp $"; namespace gnuworld { @@ -53,23 +53,23 @@ return true; } -uwUser* theUser = bot->GetUser(bot->removeSqlChars(st[1])); -if( !theUser ) +uwUser* targetUser = bot->getUser(bot->removeSqlChars(st[1])); +if( !targetUser ) { - bot->SendTo(theClient, PrivMsg, "You can't remove a non existing user!!"); + bot->SendTo(theClient, PrivMsg, "You can't modify a non existing user!!"); return false; } -uwUser* authUser = bot->IsAuth(theUser); -if( authUser ) - authNum = authUser->getNumeric(); - -if( theUser->getAccess() >= operLevel && !(authNum == theClient->getCharYYXXX()) ) +iClient* tmpClient = bot->isAuthed(targetUser); +if( targetUser->getAccess() >= operLevel && tmpClient != theClient ) { bot->SendTo(theClient, PrivMsg, "You can't modify a user with access higher or equal than your own!"); return false; } +uwUser* myUser = bot->isAuthed(theClient); +if(!myUser) return false; + string option = string_upper(st[2]); string value = string_upper(st[3]); if( option == "NEWPASS" ) value = st[3]; @@ -77,29 +77,25 @@ if( option == "CONSOLE" ) { if (value == "ON") { - theUser->setFlag(uwUser::CONSOLE); - theUser->commit(); - bot->SendTo(theClient, PrivMsg, "User %s will now get console logs", theUser->getUserName().c_str()); - bot->UpdateAuth(theUser); - uwUser* myUser = bot->IsAuth(theClient); - if(!myUser) return false; - bot->addLog(myUser, theClient, "MODUSER %s", st.assemble(1).c_str()); + targetUser->setFlag(uwUser::CONSOLE); + targetUser->commit(); + bot->SendTo(theClient, PrivMsg, "User %s will now get console logs", + targetUser->getUserName().c_str()); + bot->addLog(theClient, "MODUSER %s", st.assemble(1).c_str()); bot->MsgChanLog("%s ( %s ) updated %s's %s\n", myUser->getUserName().c_str(), - theClient->getNickUserHost().c_str(), theUser->getUserName().c_str(), option.c_str()); + theClient->getNickUserHost().c_str(), targetUser->getUserName().c_str(), option.c_str()); return true; } if (value == "OFF") { - theUser->removeFlag(uwUser::CONSOLE); - theUser->commit(); - bot->SendTo(theClient, PrivMsg, "User %s will no longer get console logs", theUser->getUserName().c_str()); - bot->UpdateAuth(theUser); - uwUser* myUser = bot->IsAuth(theClient); - if(!myUser) return false; - bot->addLog(myUser, theClient, "MODUSER %s", st.assemble(1).c_str()); + targetUser->removeFlag(uwUser::CONSOLE); + targetUser->commit(); + bot->SendTo(theClient, PrivMsg, "User %s will no longer get console logs", + targetUser->getUserName().c_str()); + bot->addLog(theClient, "MODUSER %s", st.assemble(1).c_str()); bot->MsgChanLog("%s ( %s ) updated %s's %s\n", myUser->getUserName().c_str(), - theClient->getNickUserHost().c_str(), theUser->getUserName().c_str(), option.c_str()); + theClient->getNickUserHost().c_str(), targetUser->getUserName().c_str(), option.c_str()); return true; } @@ -114,30 +110,25 @@ } if (value == "ON") { - theUser->removeFlag(uwUser::NONEEDOP); - theUser->commit(); - bot->SendTo(theClient, PrivMsg, "User %s will need to be oper'd to log in", theUser->getUserName().c_str()); - bot->UpdateAuth(theUser); - uwUser* myUser = bot->IsAuth(theClient); - if(!myUser) return false; - bot->addLog(myUser, theClient, "MODUSER %s", st.assemble(1).c_str()); + targetUser->removeFlag(uwUser::NONEEDOP); + targetUser->commit(); + bot->SendTo(theClient, PrivMsg, "User %s will need to be oper'd to log in", + targetUser->getUserName().c_str()); + bot->addLog(theClient, "MODUSER %s", st.assemble(1).c_str()); bot->MsgChanLog("%s ( %s ) updated %s's %s\n", myUser->getUserName().c_str(), - theClient->getNickUserHost().c_str(), theUser->getUserName().c_str(), option.c_str()); + theClient->getNickUserHost().c_str(), targetUser->getUserName().c_str(), option.c_str()); return true; } if (value == "OFF") { - theUser->setFlag(uwUser::NONEEDOP); - theUser->commit(); + targetUser->setFlag(uwUser::NONEEDOP); + targetUser->commit(); bot->SendTo(theClient, PrivMsg, "User %s will no longer need to be oper'd to log in", - theUser->getUserName().c_str()); - bot->UpdateAuth(theUser); - uwUser* myUser = bot->IsAuth(theClient); - if(!myUser) return false; - bot->addLog(myUser, theClient, "MODUSER %s", st.assemble(1).c_str()); + targetUser->getUserName().c_str()); + bot->addLog(theClient, "MODUSER %s", st.assemble(1).c_str()); bot->MsgChanLog("%s ( %s ) updated %s's %s\n", myUser->getUserName().c_str(), - theClient->getNickUserHost().c_str(), theUser->getUserName().c_str(), option.c_str()); + theClient->getNickUserHost().c_str(), targetUser->getUserName().c_str(), option.c_str()); return true; } @@ -147,30 +138,25 @@ } else if( option == "PRIVMSG" ) { if (value == "ON") { - theUser->setFlag(uwUser::PRIVMSG); - theUser->commit(); - bot->SendTo(theClient, PrivMsg, "User %s will receive private messages from me from now on", theUser->getUserName().c_str()); - bot->UpdateAuth(theUser); - uwUser* myUser = bot->IsAuth(theClient); - if(!myUser) return false; - bot->addLog(myUser, theClient, "MODUSER %s", st.assemble(1).c_str()); + targetUser->setFlag(uwUser::PRIVMSG); + targetUser->commit(); + bot->SendTo(theClient, PrivMsg, "User %s will receive private messages from me from now on", + targetUser->getUserName().c_str()); + bot->addLog(theClient, "MODUSER %s", st.assemble(1).c_str()); bot->MsgChanLog("%s ( %s ) updated %s's %s\n", myUser->getUserName().c_str(), - theClient->getNickUserHost().c_str(), theUser->getUserName().c_str(), option.c_str()); + theClient->getNickUserHost().c_str(), targetUser->getUserName().c_str(), option.c_str()); return true; } if (value == "OFF") { - theUser->removeFlag(uwUser::PRIVMSG); - theUser->commit(); + targetUser->removeFlag(uwUser::PRIVMSG); + targetUser->commit(); bot->SendTo(theClient, PrivMsg, "User %s will no longer receive private message from me", - theUser->getUserName().c_str()); - bot->UpdateAuth(theUser); - uwUser* myUser = bot->IsAuth(theClient); - if(!myUser) return false; - bot->addLog(myUser, theClient, "MODUSER %s", st.assemble(1).c_str()); + targetUser->getUserName().c_str()); + bot->addLog(theClient, "MODUSER %s", st.assemble(1).c_str()); bot->MsgChanLog("%s ( %s ) updated %s's %s\n", myUser->getUserName().c_str(), - theClient->getNickUserHost().c_str(), theUser->getUserName().c_str(), option.c_str()); + theClient->getNickUserHost().c_str(), targetUser->getUserName().c_str(), option.c_str()); return true; } @@ -195,36 +181,30 @@ return false; } - bot->SendTo(theClient, PrivMsg, "Changed %s's access to %d", theUser->getUserName().c_str(), atoi(value.c_str()) ); - theUser->setAccess(atoi(value.c_str())); - theUser->commit(); - bot->UpdateAuth(theUser); - uwUser* myUser = bot->IsAuth(theClient); - if(!myUser) return false; - bot->addLog(myUser, theClient, "MODUSER %s", st.assemble(1).c_str()); + bot->SendTo(theClient, PrivMsg, "Changed %s's access to %d", targetUser->getUserName().c_str(), + atoi(value.c_str()) ); + targetUser->setAccess(atoi(value.c_str())); + targetUser->commit(); + bot->addLog(theClient, "MODUSER %s", st.assemble(1).c_str()); bot->MsgChanLog("%s ( %s ) updated %s's %s\n", myUser->getUserName().c_str(), - theClient->getNickUserHost().c_str(), theUser->getUserName().c_str(), option.c_str()); + theClient->getNickUserHost().c_str(), targetUser->getUserName().c_str(), option.c_str()); return true; } else if( option == "NEWPASS" ) { string pass = bot->CryptPass(value).c_str(); - bot->SendTo(theClient, PrivMsg, "Changed %s's password to %s", theUser->getUserName().c_str(), value.c_str() ); - theUser->setPassword(pass); - theUser->commit(); - bot->UpdateAuth(theUser); - uwUser* myUser = bot->IsAuth(theClient); - if(!myUser) return false; - bot->addLog(myUser, theClient, "MODUSER %s NEWPASS *******", theUser->getUserName().c_str() ); + bot->SendTo(theClient, PrivMsg, "Changed %s's password to %s", targetUser->getUserName().c_str(), + value.c_str() ); + targetUser->setPassword(pass); + targetUser->commit(); + bot->addLog(theClient, "MODUSER %s NEWPASS *******", targetUser->getUserName().c_str() ); bot->MsgChanLog("%s ( %s ) updated %s's %s\n", myUser->getUserName().c_str(), - theClient->getNickUserHost().c_str(), theUser->getUserName().c_str(), option.c_str()); + theClient->getNickUserHost().c_str(), targetUser->getUserName().c_str(), option.c_str()); return true; } else { bot->SendTo(theClient, PrivMsg, "Unknown option"); return false; } - -bot->UpdateAuth(theUser); return true; } Index: mod.uworld/NEWPASSCommand.cc diff -u mod.uworld/NEWPASSCommand.cc:1.3 mod.uworld/NEWPASSCommand.cc:1.4 --- mod.uworld/NEWPASSCommand.cc:1.3 Thu Jul 10 07:22:18 2003 +++ mod.uworld/NEWPASSCommand.cc Wed Jan 7 17:24:25 2004 @@ -12,7 +12,7 @@ #include "StringTokenizer.h" #include "Network.h" -const char NEWPASSCommand_cc_rcsId[] = "$Id: NEWPASSCommand.cc,v 1.3 2003/07/10 14:22:18 dan_karrels Exp $"; +const char NEWPASSCommand_cc_rcsId[] = "$Id: NEWPASSCommand.cc,v 1.4 2004/01/08 01:24:25 ultike Exp $"; namespace gnuworld { @@ -34,21 +34,19 @@ } //Fetch the user authentication entry -uwUser *authUser = bot->IsAuth(theClient->getCharYYXXX()); +uwUser* theUser = bot->isAuthed(theClient); -if(!authUser) +if(!theUser) { bot->SendTo(theClient, PrivMsg,"You have to be logged in to use this command"); return false; } -uwUser *theUser = bot->GetUser(authUser->getUserName()); theUser->setPassword(bot->CryptPass(st[1]).c_str()); -bot->addLog(theUser, theClient, "NEWPASS *******"); +bot->addLog(theClient, "NEWPASS *******"); if(theUser->commit()) { - bot->UpdateAuth(theUser); bot->SendTo(theClient, PrivMsg,"Password changed!"); bot->MsgChanLog("%s ( %s ) has changed his (her) pass\n", theUser->getUserName().c_str(), theClient->getNickUserHost().c_str()); Index: mod.uworld/OMSGCommand.cc diff -u mod.uworld/OMSGCommand.cc:1.3 mod.uworld/OMSGCommand.cc:1.4 --- mod.uworld/OMSGCommand.cc:1.3 Thu Jul 10 07:22:18 2003 +++ mod.uworld/OMSGCommand.cc Wed Jan 7 17:24:25 2004 @@ -36,10 +36,7 @@ return false; } -uwUser* theUser = bot->IsAuth(theClient); -if(!theUser) return false; -bot->addLog(theUser, theClient, "OMSG %s", st.assemble(1).c_str()); - +bot->addLog(theClient, "OMSG %s", st.assemble(1).c_str()); bot->ConsoleWall("\002[%s/OMSG]\002 %s", theClient->getNickName().c_str(), st.assemble(1).c_str()); Index: mod.uworld/OPCHANCommand.cc diff -u mod.uworld/OPCHANCommand.cc:1.3 mod.uworld/OPCHANCommand.cc:1.4 --- mod.uworld/OPCHANCommand.cc:1.3 Thu Jul 10 07:22:18 2003 +++ mod.uworld/OPCHANCommand.cc Wed Jan 7 17:24:25 2004 @@ -1,6 +1,6 @@ /* * OPCHANCommand.cc - * $Id: OPCHANCommand.cc,v 1.3 2003/07/10 14:22:18 dan_karrels Exp $ + * $Id: OPCHANCommand.cc,v 1.4 2004/01/08 01:24:25 ultike Exp $ * */ @@ -79,11 +79,9 @@ return false; } -string username = "notLoggedIn"; -uwUser* theUser = bot->IsAuth(theClient); -if(theUser) username = theUser->getUserName(); -bot->addLog(username, theClient, "OPCHAN %s", st[1].c_str()); -bot->MsgChanLog("%s ( %s ) - OPCHAN %s", username.c_str(), +uwUser* theUser = bot->isAuthed(theClient); +bot->addLog(theClient, "OPCHAN %s", st[1].c_str()); +bot->MsgChanLog("%s ( %s ) - OPCHAN %s", theUser ? theUser->getUserName().c_str() : "notLoggedIn", theClient->getNickUserHost().c_str(), st.assemble(1).c_str()); Index: mod.uworld/PARTCommand.cc diff -u mod.uworld/PARTCommand.cc:1.3 mod.uworld/PARTCommand.cc:1.4 --- mod.uworld/PARTCommand.cc:1.3 Thu Jul 10 07:22:18 2003 +++ mod.uworld/PARTCommand.cc Wed Jan 7 17:24:25 2004 @@ -43,9 +43,9 @@ chanName.insert( chanName.begin(), '#' ) ; } -uwUser* theUser = bot->IsAuth(theClient); +uwUser* theUser = bot->isAuthed(theClient); if(!theUser) return false; -bot->addLog(theUser, theClient, "PART %s", st[1].c_str()); +bot->addLog(theClient, "PART %s", st[1].c_str()); bot->MsgChanLog("%s ( %s ) made me part %s\n", theUser->getUserName().c_str(), theClient->getNickUserHost().c_str(), chanName.c_str()); Index: mod.uworld/REMBADCHANCommand.cc diff -u mod.uworld/REMBADCHANCommand.cc:1.3 mod.uworld/REMBADCHANCommand.cc:1.4 --- mod.uworld/REMBADCHANCommand.cc:1.3 Thu Jul 10 07:22:18 2003 +++ mod.uworld/REMBADCHANCommand.cc Wed Jan 7 17:24:25 2004 @@ -1,6 +1,6 @@ /* * REMBADCHANCommand.cc - * $Id: REMBADCHANCommand.cc,v 1.3 2003/07/10 14:22:18 dan_karrels Exp $ + * $Id: REMBADCHANCommand.cc,v 1.4 2004/01/08 01:24:25 ultike Exp $ * */ @@ -56,9 +56,9 @@ theGline->Delete(); delete theGline; bot->SendTo(theClient, PrivMsg, "Successfully removed badchan for %s", st[1].c_str()); -uwUser* theUser = bot->IsAuth(theClient); +uwUser* theUser = bot->isAuthed(theClient); if(!theUser) return false; -bot->addLog(theUser, theClient, "REMBADCHAN %s", st.assemble(1).c_str()); +bot->addLog(theClient, "REMBADCHAN %s", st.assemble(1).c_str()); bot->MsgChanLog("%s ( %s ) removed badchan for %s", theUser->getUserName().c_str(), theClient->getNickUserHost().c_str(), st[1].c_str()); Index: mod.uworld/REMGLINECommand.cc diff -u mod.uworld/REMGLINECommand.cc:1.3 mod.uworld/REMGLINECommand.cc:1.4 --- mod.uworld/REMGLINECommand.cc:1.3 Thu Jul 10 07:22:18 2003 +++ mod.uworld/REMGLINECommand.cc Wed Jan 7 17:24:25 2004 @@ -54,9 +54,9 @@ theGline->Delete(); delete theGline; bot->SendTo(theClient, PrivMsg, "Successfully removed gline for host %s", st[1].c_str()); -uwUser* theUser = bot->IsAuth(theClient); +uwUser* theUser = bot->isAuthed(theClient); if(!theUser) return false; -bot->addLog(theUser, theClient, "REMGLINE %s", st.assemble(1).c_str()); +bot->addLog(theClient, "REMGLINE %s", st.assemble(1).c_str()); bot->MsgChanLog("%s ( %s ) removed gline %s", theUser->getUserName().c_str(), theClient->getNickUserHost().c_str(), st[1].c_str()); Index: mod.uworld/REMUSERCommand.cc diff -u mod.uworld/REMUSERCommand.cc:1.3 mod.uworld/REMUSERCommand.cc:1.4 --- mod.uworld/REMUSERCommand.cc:1.3 Thu Jul 10 07:22:18 2003 +++ mod.uworld/REMUSERCommand.cc Wed Jan 7 17:24:25 2004 @@ -17,7 +17,7 @@ #include "levels.h" #include "uworld.h" -const char REMUSERCommand_cc_rcsId[] = "$Id: REMUSERCommand.cc,v 1.3 2003/07/10 14:22:18 dan_karrels Exp $"; +const char REMUSERCommand_cc_rcsId[] = "$Id: REMUSERCommand.cc,v 1.4 2004/01/08 01:24:25 ultike Exp $"; namespace gnuworld { @@ -52,7 +52,7 @@ return true; } -uwUser* tmpUser = bot->GetUser(bot->removeSqlChars(st[1])); +uwUser* tmpUser = bot->getUser(bot->removeSqlChars(st[1])); if( !tmpUser ) { bot->SendTo(theClient, PrivMsg, "You can't remove a non existing user!!"); @@ -65,14 +65,14 @@ return false; } -uwUser* authUser = bot->IsAuth(tmpUser); -if (authUser) - bot->deAuthUser(authUser->getNumeric()); +iClient* tmpClient = bot->isAuthed(tmpUser); +if (tmpClient) + bot->deAuthUser(tmpClient); bot->remUser(tmpUser); -uwUser* theUser = bot->IsAuth(theClient); +uwUser* theUser = bot->isAuthed(theClient); if(!theUser) return false; -bot->addLog(theUser, theClient, "REMUSER %s", st[1].c_str()); +bot->addLog(theClient, "REMUSER %s", st[1].c_str()); bot->MsgChanLog("%s ( %s ) removed user %s", theUser->getUserName().c_str(), theClient->getNickUserHost().c_str(), tmpUser->getUserName().c_str()); Index: mod.uworld/SAYCommand.cc diff -u mod.uworld/SAYCommand.cc:1.3 mod.uworld/SAYCommand.cc:1.4 --- mod.uworld/SAYCommand.cc:1.3 Thu Jul 10 07:22:18 2003 +++ mod.uworld/SAYCommand.cc Wed Jan 7 17:24:25 2004 @@ -35,9 +35,9 @@ return false; } -uwUser* theUser = bot->IsAuth(theClient); +uwUser* theUser = bot->isAuthed(theClient); if(!theUser) return false; -bot->addLog(theUser, theClient, "SAY %s", st.assemble(1).c_str()); +bot->addLog(theClient, "SAY %s", st.assemble(1).c_str()); bot->MsgChanLog("%s ( %s ) - SAY %s\n", theUser->getUserName().c_str(), theClient->getNickUserHost().c_str(), st.assemble(1).c_str()); Index: mod.uworld/SCANCommand.cc diff -u mod.uworld/SCANCommand.cc:1.3 mod.uworld/SCANCommand.cc:1.4 --- mod.uworld/SCANCommand.cc:1.3 Thu Jul 10 07:22:18 2003 +++ mod.uworld/SCANCommand.cc Wed Jan 7 17:24:25 2004 @@ -18,7 +18,7 @@ #include "Network.h" #include "levels.h" -const char SCANCommand_cc_rcsId[] = "$Id: SCANCommand.cc,v 1.3 2003/07/10 14:22:18 dan_karrels Exp $"; +const char SCANCommand_cc_rcsId[] = "$Id: SCANCommand.cc,v 1.4 2004/01/08 01:24:25 ultike Exp $"; namespace gnuworld { @@ -47,9 +47,9 @@ return true; } -uwUser* theUser = bot->IsAuth(theClient); +uwUser* theUser = bot->isAuthed(theClient); if(!theUser) return false; -bot->addLog(theUser, theClient, "SCAN %s", st.assemble(1).c_str()); +bot->addLog(theClient, "SCAN %s", st.assemble(1).c_str()); bot->MsgChanLog("%s ( %s ) - SCAN %s\n", theUser->getUserName().c_str(), theClient->getNickUserHost().c_str(), st.assemble(1).c_str()); Index: mod.uworld/SERVLISTCommand.cc diff -u mod.uworld/SERVLISTCommand.cc:1.4 mod.uworld/SERVLISTCommand.cc:1.5 --- mod.uworld/SERVLISTCommand.cc:1.4 Wed Nov 5 17:27:10 2003 +++ mod.uworld/SERVLISTCommand.cc Wed Jan 7 17:24:25 2004 @@ -3,7 +3,7 @@ * * Gives an extensive /map report * - * $Id: SERVLISTCommand.cc,v 1.4 2003/11/06 01:27:10 ultike Exp $ + * $Id: SERVLISTCommand.cc,v 1.5 2004/01/08 01:24:25 ultike Exp $ */ #include <new> @@ -22,7 +22,7 @@ #include "misc.h" #include "levels.h" -const char SERVLISTCommand_cc_rcsId[] = "$Id: SERVLISTCommand.cc,v 1.4 2003/11/06 01:27:10 ultike Exp $"; +const char SERVLISTCommand_cc_rcsId[] = "$Id: SERVLISTCommand.cc,v 1.5 2004/01/08 01:24:25 ultike Exp $"; namespace gnuworld { @@ -69,11 +69,9 @@ bot->SendTo(theClient, PrivMsg, "Got a total of %d servers\n", AddedServers ) ; -string username = "notLoggedIn"; -uwUser* theUser = bot->IsAuth(theClient); -if(theUser) username = theUser->getUserName(); -bot->addLog(username, theClient, "SERVLIST"); -bot->MsgChanLog("%s ( %s ) - SERVLIST", username.c_str(), +uwUser* theUser = bot->isAuthed(theClient); +bot->addLog(theClient, "SERVLIST"); +bot->MsgChanLog("%s ( %s ) - SERVLIST", theUser ? theUser->getUserName().c_str() : "notLoggedIn", theClient->getNickUserHost().c_str()); return true; } Index: mod.uworld/SHUTDOWNCommand.cc diff -u mod.uworld/SHUTDOWNCommand.cc:1.4 mod.uworld/SHUTDOWNCommand.cc:1.5 --- mod.uworld/SHUTDOWNCommand.cc:1.4 Thu Nov 13 10:30:45 2003 +++ mod.uworld/SHUTDOWNCommand.cc Wed Jan 7 17:24:25 2004 @@ -36,20 +36,13 @@ } -uwUser* theUser = bot->IsAuth(theClient); +uwUser* theUser = bot->isAuthed(theClient); if(!theUser) return false; -bot->addLog(theUser, theClient, "SHUTDOWN %s", st.assemble(1).c_str()); +bot->addLog(theClient, "SHUTDOWN %s", st.assemble(1).c_str()); bot->MsgChanLog("%s ( %s ) issued the shutdown command! So long, and thanks for all the fish!", theUser->getUserName().c_str(), theClient->getNickUserHost().c_str()); -bot->Exit( st.assemble(1).c_str()); -char buf[ 512 ] = { 0 } ; - -sprintf( buf, "%s SQ %s :%s made me shutdown (%s)\n", bot->getCharYY().c_str(), bot->getUplinkName().c_str(), - theClient->getNickName().c_str(), st.assemble(1).c_str() ); - -bot->QuoteAsServer( buf ); -server->Shutdown(); +server->Shutdown( st.assemble(1).c_str()); return true; } Index: mod.uworld/STATUSCommand.cc diff -u mod.uworld/STATUSCommand.cc:1.3 mod.uworld/STATUSCommand.cc:1.4 --- mod.uworld/STATUSCommand.cc:1.3 Thu Jul 10 07:22:18 2003 +++ mod.uworld/STATUSCommand.cc Wed Jan 7 17:24:25 2004 @@ -18,7 +18,7 @@ #include "Network.h" #include "levels.h" -const char STATUSCommand_cc_rcsId[] = "$Id: STATUSCommand.cc,v 1.3 2003/07/10 14:22:18 dan_karrels Exp $"; +const char STATUSCommand_cc_rcsId[] = "$Id: STATUSCommand.cc,v 1.4 2004/01/08 01:24:25 ultike Exp $"; namespace gnuworld { @@ -41,15 +41,14 @@ return false; } -string username = "notLoggedIn"; -uwUser* theUser = bot->IsAuth(theClient); -if(theUser) username = theUser->getUserName(); -bot->addLog(username, theClient, "STATUS"); -bot->MsgChanLog("%s ( %s ) - STATUS", username.c_str(), theClient->getNickUserHost().c_str()); +uwUser* theUser = bot->isAuthed(theClient); +bot->addLog(theClient, "STATUS"); +bot->MsgChanLog("%s ( %s ) - STATUS", theUser ? theUser->getUserName().c_str() : "notLoggedIn", + theClient->getNickUserHost().c_str()); bot->SendTo(theClient, PrivMsg, "-= Mod.Uworld's internal status =-"); -bot->Status(theClient, PrivMsg); +bot->status(theClient, PrivMsg); bot->showUptime(theClient, PrivMsg); bot->SendTo(theClient, PrivMsg, "-= End of status =-"); Index: mod.uworld/SUSPENDCommand.cc diff -u mod.uworld/SUSPENDCommand.cc:1.3 mod.uworld/SUSPENDCommand.cc:1.4 --- mod.uworld/SUSPENDCommand.cc:1.3 Thu Jul 10 07:22:18 2003 +++ mod.uworld/SUSPENDCommand.cc Wed Jan 7 17:24:25 2004 @@ -36,7 +36,7 @@ return false; } -uwUser* targetUser = bot->GetUser(st[1]); +uwUser* targetUser = bot->getUser(st[1]); if(!targetUser) { bot->SendTo(theClient, PrivMsg, "User %s does NOT exist", st[1].c_str()); @@ -90,13 +90,13 @@ targetUser->setFlag(uwUser::SUSPEND); targetUser->commit(); -uwUser* authUser = bot->IsAuth(targetUser); -if(authUser) - bot->UpdateAuth(targetUser); +iClient* targetClient = bot->isAuthed(targetUser); +if(targetClient) + bot->deAuthUser(targetClient); -uwUser* theUser = bot->IsAuth(theClient); +uwUser* theUser = bot->isAuthed(theClient); if(!theUser) return false; -bot->addLog(theUser, theClient, "SUSPEND %s", st.assemble(1).c_str()); +bot->addLog(theClient, "SUSPEND %s", st.assemble(1).c_str()); bot->MsgChanLog("%s ( %s ) has suspended user %s until %s", theUser->getUserName().c_str(), theClient->getNickUserHost().c_str(), targetUser->getUserName().c_str(), bot->convertToAscTime(targetUser->getSuspendExpire()) ); Index: mod.uworld/TRANSLATECommand.cc diff -u mod.uworld/TRANSLATECommand.cc:1.3 mod.uworld/TRANSLATECommand.cc:1.4 --- mod.uworld/TRANSLATECommand.cc:1.3 Thu Jul 10 07:22:18 2003 +++ mod.uworld/TRANSLATECommand.cc Wed Jan 7 17:24:25 2004 @@ -14,7 +14,7 @@ #include "StringTokenizer.h" #include "levels.h" -const char TRANSLATECommand_cc_rcsId[] = "$Id: TRANSLATECommand.cc,v 1.3 2003/07/10 14:22:18 dan_karrels Exp $"; +const char TRANSLATECommand_cc_rcsId[] = "$Id: TRANSLATECommand.cc,v 1.4 2004/01/08 01:24:25 ultike Exp $"; namespace gnuworld { @@ -53,11 +53,9 @@ return true ; } -string username = "notLoggedIn"; -uwUser* theUser = bot->IsAuth(theClient); -if(theUser) username = theUser->getUserName(); -bot->addLog(username, theClient, "TRANSLATE %s", st[1].c_str()); -bot->MsgChanLog("%s ( %s ) - TRANSLATE %s\n", username.c_str(), +uwUser* theUser = bot->isAuthed(theClient); +bot->addLog(theClient, "TRANSLATE %s", st[1].c_str()); +bot->MsgChanLog("%s ( %s ) - TRANSLATE %s\n", theUser ? theUser->getUserName().c_str() : "notLoggedIn", theClient->getNickUserHost().c_str(), st.assemble(1).c_str()); iServer* theServer = Network->findServer( Target->getIntYY() ) ; Index: mod.uworld/UNSUSPENDCommand.cc diff -u mod.uworld/UNSUSPENDCommand.cc:1.3 mod.uworld/UNSUSPENDCommand.cc:1.4 --- mod.uworld/UNSUSPENDCommand.cc:1.3 Thu Jul 10 07:22:18 2003 +++ mod.uworld/UNSUSPENDCommand.cc Wed Jan 7 17:24:25 2004 @@ -36,7 +36,7 @@ return false; } -uwUser* targetUser = bot->GetUser(st[1]); +uwUser* targetUser = bot->getUser(st[1]); if(!targetUser) { bot->SendTo(theClient, PrivMsg, "User %s does NOT exist", st[1].c_str()); @@ -54,13 +54,9 @@ targetUser->removeFlag(uwUser::SUSPEND); targetUser->commit(); -uwUser* authUser = bot->IsAuth(targetUser); -if(authUser) - bot->UpdateAuth(targetUser); - -uwUser* theUser = bot->IsAuth(theClient); +uwUser* theUser = bot->isAuthed(theClient); if(!theUser) return false; -bot->addLog(theUser, theClient, "UNSUSPEND %s", st[1].c_str()); +bot->addLog(theClient, "UNSUSPEND %s", st[1].c_str()); bot->MsgChanLog("%s ( %s ) has unsuspended user %s", theUser->getUserName().c_str(), theClient->getNickUserHost().c_str(), targetUser->getUserName().c_str() ); Index: mod.uworld/UPTIMECommand.cc diff -u mod.uworld/UPTIMECommand.cc:1.3 mod.uworld/UPTIMECommand.cc:1.4 --- mod.uworld/UPTIMECommand.cc:1.3 Thu Jul 10 07:22:18 2003 +++ mod.uworld/UPTIMECommand.cc Wed Jan 7 17:24:25 2004 @@ -20,7 +20,7 @@ namespace uwrld { -bool UPTIMECommand::Exec( iClient* theClient, const string& Message) +bool UPTIMECommand::Exec( iClient* theClient, const string&) { bool PrivMsg = bot->SendPrivmsg(theClient); @@ -31,11 +31,10 @@ return false; } -string username = "notLoggedIn"; -uwUser* theUser = bot->IsAuth(theClient); -if(theUser) username = theUser->getUserName(); -bot->addLog(username, theClient, "UPTIME"); -bot->MsgChanLog("%s ( %s ) - UPTIME", username.c_str(), theClient->getNickUserHost().c_str()); +uwUser* theUser = bot->isAuthed(theClient); +bot->addLog(theClient, "UPTIME"); +bot->MsgChanLog("%s ( %s ) - UPTIME", theUser ? theUser->getUserName().c_str() : "notLoggedIn", + theClient->getNickUserHost().c_str()); bot->showUptime(theClient, PrivMsg); Index: mod.uworld/WALLOPSCommand.cc diff -u mod.uworld/WALLOPSCommand.cc:1.4 mod.uworld/WALLOPSCommand.cc:1.5 --- mod.uworld/WALLOPSCommand.cc:1.4 Wed Nov 5 17:27:10 2003 +++ mod.uworld/WALLOPSCommand.cc Wed Jan 7 17:24:25 2004 @@ -40,9 +40,9 @@ bot->Write("%s%s WU :%s", bot->getCharYY().c_str(), bot->getCharXXX().c_str(), st.assemble(1).c_str()); -uwUser* theUser = bot->IsAuth(theClient); +uwUser* theUser = bot->isAuthed(theClient); if(!theUser) return false; -bot->addLog(theUser, theClient, "WALLOPS %s", st.assemble(1).c_str()); +bot->addLog(theClient, "WALLOPS %s", st.assemble(1).c_str()); bot->MsgChanLog("%s ( %s ) - WALLOPS %s", theUser->getUserName().c_str(), theClient->getNickUserHost().c_str(), st.assemble(1).c_str()); Index: mod.uworld/WHOISCommand.cc diff -u mod.uworld/WHOISCommand.cc:1.4 mod.uworld/WHOISCommand.cc:1.5 --- mod.uworld/WHOISCommand.cc:1.4 Wed Nov 5 17:27:10 2003 +++ mod.uworld/WHOISCommand.cc Wed Jan 7 17:24:25 2004 @@ -16,7 +16,7 @@ #include "ip.h" #include "levels.h" -const char WHOISCommand_cc_rcsId[] = "$Id: WHOISCommand.cc,v 1.4 2003/11/06 01:27:10 ultike Exp $"; +const char WHOISCommand_cc_rcsId[] = "$Id: WHOISCommand.cc,v 1.5 2004/01/08 01:24:25 ultike Exp $"; namespace gnuworld { @@ -52,11 +52,9 @@ return true ; } -string username = "notLoggedIn"; -uwUser* theUser = bot->IsAuth(theClient); -if(theUser) username = theUser->getUserName(); -bot->addLog(username, theClient, "WHOIS %s", st[1].c_str()); -bot->MsgChanLog("%s ( %s ) - WHOIS %s\n", username.c_str(), +uwUser* theUser = bot->isAuthed(theClient); +bot->addLog(theClient, "WHOIS %s", st[1].c_str()); +bot->MsgChanLog("%s ( %s ) - WHOIS %s\n", theUser ? theUser->getUserName().c_str() : "notLoggedIn", theClient->getNickUserHost().c_str(), st.assemble(1).c_str()); iServer* targetServer = Network->findServer( Target->getIntYY() ) ; @@ -72,7 +70,7 @@ Target->getNickName().c_str(), Target->getUserName().c_str(), Target->getInsecureHost().c_str(), - xIP(Target->getIP() ).GetNumericIP() + xIP(Target->getIP() ).GetNumericIP().c_str() ) ; bot->SendTo(theClient, PrivMsg, "Numeric: %s, UserModes: %s, Server Numeric: %s (%s)", Index: mod.uworld/constants.h diff -u mod.uworld/constants.h:1.3 mod.uworld/constants.h:1.4 --- mod.uworld/constants.h:1.3 Thu Jul 10 07:22:18 2003 +++ mod.uworld/constants.h Wed Jan 7 17:24:25 2004 @@ -1,5 +1,5 @@ #ifndef __CONSTANTS_H -#define __CONSTANTS_H "$Id: constants.h,v 1.3 2003/07/10 14:22:18 dan_karrels Exp $" +#define __CONSTANTS_H "$Id: constants.h,v 1.4 2004/01/08 01:24:25 ultike Exp $" /* * constants.h @@ -10,6 +10,8 @@ namespace gnuworld { +using std::string; + namespace sql { /* Index: mod.uworld/uwServer.h diff -u mod.uworld/uwServer.h:1.3 mod.uworld/uwServer.h:1.4 --- mod.uworld/uwServer.h:1.3 Thu Jul 10 07:22:18 2003 +++ mod.uworld/uwServer.h Wed Jan 7 17:24:25 2004 @@ -1,5 +1,5 @@ #ifndef __uwSERVER_H_ -#define __uwSERVER_H_ "$Id: uwServer.h,v 1.3 2003/07/10 14:22:18 dan_karrels Exp $" +#define __uwSERVER_H_ "$Id: uwServer.h,v 1.4 2004/01/08 01:24:25 ultike Exp $" #include <string> #include <sys/time.h> @@ -10,6 +10,7 @@ namespace uwrld { +using std::string; class uwServer { Index: mod.uworld/uwUser.h diff -u mod.uworld/uwUser.h:1.3 mod.uworld/uwUser.h:1.4 --- mod.uworld/uwUser.h:1.3 Thu Jul 10 07:22:18 2003 +++ mod.uworld/uwUser.h Wed Jan 7 17:24:25 2004 @@ -11,6 +11,7 @@ namespace uwrld { +using std::string; class uwUser { @@ -55,9 +56,11 @@ inline const unsigned int& getSuspendLevel() const { return suspend_level; } - inline const iClient* getClient() const + inline iClient* getClient() { return Client; } + inline const bool isAuthed() const + { return Client != 0; } /* * Methods to set data atrributes. */ Index: mod.uworld/uworld.cc diff -u mod.uworld/uworld.cc:1.5 mod.uworld/uworld.cc:1.6 --- mod.uworld/uworld.cc:1.5 Thu Nov 13 10:30:45 2003 +++ mod.uworld/uworld.cc Wed Jan 7 17:24:25 2004 @@ -81,6 +81,7 @@ sqlPort = conf.Require( "sql_port" )->second; sqlUser = conf.Require( "sql_user")->second; msgChannel = conf.Require( "msg_channel")->second; +operChannel = conf.Require( "oper_channel")->second; ExpiredInterval = atoi( conf.Require( "Expired_interval" )->second.c_str() ); dbConnectionTimer = atoi(conf.Require("dbinterval")->second.c_str()); maxLo... [truncated message content] |
From: Matthias C. <ul...@us...> - 2003-11-17 18:28:55
|
Committer : Matthias Crauwels <ul...@us...> CVSROOT : /cvsroot/mod-uworld Module : mod.uworld Commit time: 2003-11-17 18:28:09 UTC Modified files: AGLCommand.cc Log message: Author: Matthias Crauwels <ult...@wo...> Log message: * Bugfix ---------------------- diff included ---------------------- Index: mod.uworld/AGLCommand.cc diff -u mod.uworld/AGLCommand.cc:1.3 mod.uworld/AGLCommand.cc:1.4 --- mod.uworld/AGLCommand.cc:1.3 Thu Jul 10 07:22:18 2003 +++ mod.uworld/AGLCommand.cc Mon Nov 17 10:27:59 2003 @@ -3,7 +3,7 @@ * * AUTO-GLINE handler * - * $Id: AGLCommand.cc,v 1.3 2003/07/10 14:22:18 dan_karrels Exp $ + * $Id: AGLCommand.cc,v 1.4 2003/11/17 18:27:59 ultike Exp $ */ #include <string> @@ -65,6 +65,12 @@ return false; } + if( st.size() < 4 ) + { + Usage( theClient ) ; + return false ; + } + uwAGL* theAGL = bot->findAGL(st[2]); if(theAGL) { @@ -115,6 +121,12 @@ bot->SendTo(theClient, PrivMsg, "This command requires access level %d!", levels::agl::del); return false; } + if( st.size() < 4 ) + { + Usage( theClient ) ; + return false ; + } + uwAGL* theAGL = bot->findAGL(st[2]); if(!theAGL) { @@ -145,6 +157,14 @@ bot->SendTo(theClient, PrivMsg, "This command requires access level %d!", levels::agl::del); return false; } + + if( st.size() < 3 ) + { + Usage( theClient ) ; + return false ; + } + + uwAGL* theAGL = bot->findAGL(st[2]); if(!theAGL) { ----------------------- End of diff ----------------------- |
From: Matthias C. <ul...@us...> - 2003-11-13 22:21:14
|
Committer : Matthias Crauwels <ul...@us...> CVSROOT : /cvsroot/mod-uworld Module : mod.uworld Commit time: 2003-11-13 22:21:12 UTC Added files: doc/commands.sql doc/uworld.addme.sql doc/uworld.example.conf.in doc/uworld.sql Log message: Author: Matthias Crauwels Log Message: * adding lost files ---------------------- diff included ---------------------- Index: mod.uworld/doc/commands.sql diff -u /dev/null mod.uworld/doc/commands.sql:1.1 --- /dev/null Thu Nov 13 14:21:13 2003 +++ mod.uworld/doc/commands.sql Thu Nov 13 14:21:02 2003 @@ -0,0 +1,127 @@ +--commands db + +-- Zap everything! +DELETE FROM commands; + +INSERT INTO commands (command,shortdesc,level,longdesc) +VALUES('ACCESS','returns the bots access list',0,'This command returns the bots access list'); + +INSERT INTO commands (command,shortdesc,level,longdesc) +VALUES ('LOGIN','Authenticates you with the bot',0,''); + +INSERT INTO commands (command,shortdesc,level,longdesc) +VALUES ('NEWPASS','sets a new password for you',0,''); + +INSERT INTO commands (command,shortdesc,level,longdesc) +VALUES('INVITE','invites you to a channel',100,'This command invites you to a channel'); + +INSERT INTO commands (command,shortdesc,level,longdesc) +VALUES('SERVLIST','returns the list of currently linked servers',100,'This returns the list of currently linked servers'); + +INSERT INTO commands (command,shortdesc,level,longdesc) +VALUES('WHOIS','gives more info on a nick',100,''); + +INSERT INTO commands (command,shortdesc,level,longdesc) +VALUES('CHANINFO','gives you info about a chan',100,''); + +INSERT INTO commands (command,shortdesc,level,longdesc) +VALUES('TRANSLATE','translates a numeric into a nickname',100,''); + +INSERT INTO commands (command,shortdesc,level,longdesc) +VALUES('MODE','set mode thru the bot',400,''); + +INSERT INTO commands (command,shortdesc,level,longdesc) +VALUES('CLEARCHAN','reset a channel modes',400,''); + +INSERT INTO commands (command,shortdesc,level,longdesc) +VALUES('SCAN','search a certain hostname on the network',400,''); + +INSERT INTO commands (command,shortdesc,level,longdesc) +VALUES('ADDUSER','adds a user to my database',700,''); + +INSERT INTO commands (command,shortdesc,level,longdesc) +VALUES('REMUSER','removes a user from my database',700,''); + +INSERT INTO commands (command,shortdesc,level,longdesc) +VALUES('MODUSER','modifies a user in my database',700,''); + +INSERT INTO commands (command,shortdesc,level,longdesc) +VALUES('SAY','make the bot talk',800,''); + +INSERT INTO commands (command,shortdesc,level,longdesc) +VALUES('JOIN','make the bot join a channel',800,''); + +INSERT INTO commands (command,shortdesc,level,longdesc) +VALUES('PART','make the bot leave a channel',800,''); + +INSERT INTO commands (command,shortdesc,level,longdesc) +VALUES('INVME','invites you to console channel',900,''); + +INSERT INTO commands (command,shortdesc,level,longdesc) +VALUES('QUOTE','a coder toy',950,''); + +INSERT INTO commands (command,shortdesc,level,longdesc) +VALUES('GODLIKE','for my special god',1000,''); + +INSERT INTO commands (command,shortdesc,level,longdesc) +VALUES('DEAUTH','deauthenticates you',0,''); + +INSERT INTO commands (command,shortdesc,level,longdesc) +VALUES('FDEAUTH','force a user to deauthenticate',600,''); + +INSERT INTO commands (command,shortdesc,level,longdesc) +VALUES('OPCHAN','ops a user in an opless channel',100,''); + +INSERT INTO commands (command,shortdesc,level,longdesc) +VALUES('WALLOPS','sends a wallusers message',700,''); + +INSERT INTO commands (command,shortdesc,level,longdesc) +VALUES('GLOBAL','sends a global notice',600,''); + +INSERT INTO commands (command,shortdesc,level,longdesc) +VALUES('SHUTDOWN','shuts bot and server down',900,''); + +INSERT INTO commands (command,shortdesc,level,longdesc) +VALUES('JUPE','adds a server jupe',600,''); + +INSERT INTO commands (command,shortdesc,level,longdesc) +VALUES('GLINE','adds a gline',400,''); + +INSERT INTO commands (command,shortdesc,level,longdesc) +VALUES('REMGLINE','removes a gline',400,''); + +INSERT INTO commands (command,shortdesc,level,longdesc) +VALUES('LIST','lists glines,badchans,agl,...',400,''); + +INSERT INTO commands (command,shortdesc,level,longdesc) +VALUES('UPTIME','gives the bots uptime',100,''); + +INSERT INTO commands (command,shortdesc,level,longdesc) +VALUES('OMSG','Uworlds Private Operator club',400,''); + +INSERT INTO commands (command,shortdesc,level,longdesc) +VALUES('SUSPEND','suspends a user',700,''); + +INSERT INTO commands (command,shortdesc,level,longdesc) +VALUES('UNSUSPEND','unsuspends a user',700,''); + +INSERT INTO commands (command,shortdesc,level,longdesc) +VALUES('BADCHAN','adds a banchan',600,''); + +INSERT INTO commands (command,shortdesc,level,longdesc) +VALUES('REMBADCHAN','removes a banchan',600,''); + +INSERT INTO commands (command,shortdesc,level,longdesc) +VALUES('DELSERVER','deletes a server from the memory',800,''); + +INSERT INTO commands (command,shortdesc,level,longdesc) +VALUES('LEARNNET','gets to know the network again',900,''); + +INSERT INTO commands (command,shortdesc,level,longdesc) +VALUES('CHECKNET','checks for missing servers',400,''); + +INSERT INTO commands (command,shortdesc,level,longdesc) +VALUES('LASTCOMM','shows the last commands i received',100,''); + +INSERT INTO commands (command,shortdesc,level,longdesc) +VALUES('AGL', 'modifies the AGL-table', 700, ''); Index: mod.uworld/doc/uworld.addme.sql diff -u /dev/null mod.uworld/doc/uworld.addme.sql:1.1 --- /dev/null Thu Nov 13 14:21:13 2003 +++ mod.uworld/doc/uworld.addme.sql Thu Nov 13 14:21:02 2003 @@ -0,0 +1,6 @@ +-- Add level 1000 admin +-- ULtimaTe_ <ult...@wo...> 02/02/2002 +-- $Id: uworld.addme.sql,v 1.1 2003/11/13 22:21:02 ultike Exp $ + +INSERT INTO users (user_name,password,access) +VALUES ('ULtimaTe_','07d976a29bdb3ff42e19c102852151b28097bbad',1000); Index: mod.uworld/doc/uworld.example.conf.in diff -u /dev/null mod.uworld/doc/uworld.example.conf.in:1.1 --- /dev/null Thu Nov 13 14:21:13 2003 +++ mod.uworld/doc/uworld.example.conf.in Thu Nov 13 14:21:02 2003 @@ -0,0 +1,42 @@ +# Uworld Configuration File. +# +# sql_host = Hostname/IP of the PostGreSQL server. + +sql_host = 127.0.0.1 +sql_port = 5432 + +# sql_db = Name of the database. + +sql_db = uworld + +# sql_user is the username to pass to PostGreSQL on connection. +# Useful if your account name is not the same as your Database +# username. + +sql_user = ultimate +sql_pass = '' + +# General 'Bot' options. + +username = DaPrincess +nickname = Uworld +hostname = KingWildys.OutNet.Org +userdescription = I'm still looking for my prince +mode = +iodk + +# output channel +msg_channel = #uworld.console + +# Expired_Interval +Expired_interval = 60 + +# dbinterval +dbinterval = 60 + +# maximum number of logs held in the memory +maxLogs = 30 + +# length of the autoglines +aglLength = 300 + + Index: mod.uworld/doc/uworld.sql diff -u /dev/null mod.uworld/doc/uworld.sql:1.1 --- /dev/null Thu Nov 13 14:21:13 2003 +++ mod.uworld/doc/uworld.sql Thu Nov 13 14:21:02 2003 @@ -0,0 +1,48 @@ +-- mod.uworld database script ;) +-- ULtimaTe_ <ult...@wo...> 02/02/2002 (all those 2's ;)) +-- $Id: uworld.sql,v 1.1 2003/11/13 22:21:02 ultike Exp $ + +CREATE TABLE users ( + + id SERIAL, + user_name TEXT NOT NULL, + password VARCHAR (40) NOT NULL, + access INT4 NOT NULL DEFAULT '0', + flags INT2 NOT NULL DEFAULT '0', + suspend_expires INT4, + suspend_level INT4 +); + +CREATE TABLE glines ( + Id SERIAL, + Host VARCHAR(128) UNIQUE NOT NULL, + AddedBy VARCHAR(128) NOT NULL, + AddedOn INT4 NOT NULL, + AddedLevel INT4 NOT NULL DEFAULT '100', + ExpiresAt INT4 NOT NULL, + Reason VARCHAR(255) + ); + +CREATE TABLE commands ( + command TEXT UNIQUE NOT NULL, + shortdesc VARCHAR (128) NOT NULL, + level INT4 NOT NULL DEFAULT '0', + longdesc VARCHAR (512) +); + +CREATE TABLE logs ( + Id SERIAL, + username TEXT NOT NULL, + nickuserhost VARCHAR(128) NOT NULL, + ts INT4 NOT NULL, + log VARCHAR(255) + ); + +CREATE TABLE AGL ( + AGL_Host VARCHAR(128) UNIQUE NOT NULL, + Connections INT4 NOT NULL, + AddedBy VARCHAR(128) NOT NULL, + AddedOn INT4 NOT NULL + ); + + ----------------------- End of diff ----------------------- |
From: Matthias C. <ul...@us...> - 2003-11-13 22:19:03
|
Committer : Matthias Crauwels <ul...@us...> CVSROOT : /cvsroot/mod-uworld Module : mod.uworld Commit time: 2003-11-13 22:19:03 UTC Log message: Directory /cvsroot/mod-uworld/mod.uworld/doc added to the repository |
From: Matthias C. <ul...@us...> - 2003-11-13 18:30:59
|
Committer : Matthias Crauwels <ul...@us...> CVSROOT : /cvsroot/mod-uworld Module : mod.uworld Commit time: 2003-11-13 18:30:55 UTC Modified files: JUPECommand.cc SHUTDOWNCommand.cc uwUser.cc uworld.cc Log message: Author: Matthias Crauwels <ult...@wo...> Log message: * Fixed JUPECommand * Fixed SHUTDOWNCommand * added various checks ---------------------- diff included ---------------------- Index: mod.uworld/JUPECommand.cc diff -u mod.uworld/JUPECommand.cc:1.4 mod.uworld/JUPECommand.cc:1.5 --- mod.uworld/JUPECommand.cc:1.4 Wed Nov 5 17:27:10 2003 +++ mod.uworld/JUPECommand.cc Thu Nov 13 10:30:45 2003 @@ -55,7 +55,7 @@ iServer* jupeServer = new (std::nothrow) iServer(0, "", jupeName, time( 0 ), st.assemble(2) ) ; assert( jupeServer != 0 ) ; -server->AttachServer( jupeServer ) ; +server->AttachServer( jupeServer, bot ) ; return true; Index: mod.uworld/SHUTDOWNCommand.cc diff -u mod.uworld/SHUTDOWNCommand.cc:1.3 mod.uworld/SHUTDOWNCommand.cc:1.4 --- mod.uworld/SHUTDOWNCommand.cc:1.3 Thu Jul 10 07:22:18 2003 +++ mod.uworld/SHUTDOWNCommand.cc Thu Nov 13 10:30:45 2003 @@ -45,10 +45,11 @@ char buf[ 512 ] = { 0 } ; -sprintf( buf, "%s SQ %s :%s made me shutdown (%s)\n", bot->getCharYY(), bot->getUplinkName().c_str(), +sprintf( buf, "%s SQ %s :%s made me shutdown (%s)\n", bot->getCharYY().c_str(), bot->getUplinkName().c_str(), theClient->getNickName().c_str(), st.assemble(1).c_str() ); bot->QuoteAsServer( buf ); +server->Shutdown(); return true; } Index: mod.uworld/uwUser.cc diff -u mod.uworld/uwUser.cc:1.3 mod.uworld/uwUser.cc:1.4 --- mod.uworld/uwUser.cc:1.3 Thu Jul 10 07:22:18 2003 +++ mod.uworld/uwUser.cc Thu Nov 13 10:30:45 2003 @@ -1,6 +1,6 @@ /* * uwUser.cc - * $Id: uwUser.cc,v 1.3 2003/07/10 14:22:18 dan_karrels Exp $ + * $Id: uwUser.cc,v 1.4 2003/11/13 18:30:45 ultike Exp $ */ #include "uwUser.h" @@ -47,6 +47,7 @@ flags( 0 ), suspend_expire( 0 ), suspend_level( 0 ), + Client ( NULL ), SQLDb( _SQLDb ) { } Index: mod.uworld/uworld.cc diff -u mod.uworld/uworld.cc:1.4 mod.uworld/uworld.cc:1.5 --- mod.uworld/uworld.cc:1.4 Wed Nov 5 17:27:10 2003 +++ mod.uworld/uworld.cc Thu Nov 13 10:30:45 2003 @@ -654,8 +654,9 @@ TempAuth->setFlag(uwUser::SUSPEND); else TempAuth->removeFlag(uwUser::SUSPEND); - TempAuth->setClient(theClient); - } + if(theClient) + TempAuth->setClient(theClient); + } } bool uworld::AuthUser( uwUser* TempUser) @@ -671,6 +672,10 @@ TempAuth->setFlag(uwUser::SUSPEND); else TempAuth->removeFlag(uwUser::SUSPEND); +iClient* theClient = Network->findClient(TempUser->getNumeric()); +if(theClient) + TempAuth->setClient(theClient); + authList.push_back( TempAuth ) ; return true; } @@ -1386,7 +1391,7 @@ convertToAscTime(curUser->getSuspendExpire() ), curUser->getSuspendLevel() ); } - if(IsAuth(curUser)) + if(IsAuth(curUser) && curUser->getClient()) { SendTo(theClient, PrivMsg, "Currently logged in as: %s" ,curUser->getClient()->getRealNickUserHost().c_str()); ----------------------- End of diff ----------------------- |
From: Matthias C. <ul...@us...> - 2003-11-06 01:27:24
|
Committer : Matthias Crauwels <ul...@us...> CVSROOT : /cvsroot/mod-uworld Module : mod.uworld Commit time: 2003-11-06 01:27:20 UTC Modified files: GLOBALNOTCommand.cc JUPECommand.cc SERVLISTCommand.cc WALLOPSCommand.cc WHOISCommand.cc uworld.cc Log message: Author: Matthias Crauwels <ult...@wo...> Log message: * Various updates to make it compile ---------------------- diff included ---------------------- Index: mod.uworld/GLOBALNOTCommand.cc diff -u mod.uworld/GLOBALNOTCommand.cc:1.3 mod.uworld/GLOBALNOTCommand.cc:1.4 --- mod.uworld/GLOBALNOTCommand.cc:1.3 Thu Jul 10 07:22:18 2003 +++ mod.uworld/GLOBALNOTCommand.cc Wed Nov 5 17:27:10 2003 @@ -40,8 +40,8 @@ return false; } -xNetwork::serverIterator ptr = Network->server_begin(); -xNetwork::serverIterator end = Network->server_end(); +xNetwork::serverIterator ptr = Network->servers_begin(); +xNetwork::serverIterator end = Network->servers_end(); for( ; ptr != end ; ptr++ ) { @@ -51,10 +51,10 @@ continue ; } - if(!server->isJuped(CurServer)) + if(!CurServer->isJupe()) { bot->Write("%s%s O $%s : \002%s\002 %s", - bot->getCharYY(), bot->getCharXXX(), + bot->getCharYY().c_str(), bot->getCharXXX().c_str(), CurServer->getName().c_str(), "-=GLOBAL NOTICE=-", st.assemble(1).c_str()); } } Index: mod.uworld/JUPECommand.cc diff -u mod.uworld/JUPECommand.cc:1.3 mod.uworld/JUPECommand.cc:1.4 --- mod.uworld/JUPECommand.cc:1.3 Thu Jul 10 07:22:18 2003 +++ mod.uworld/JUPECommand.cc Wed Nov 5 17:27:10 2003 @@ -53,9 +53,9 @@ jupeName.c_str(), st.assemble(2).c_str()); -iServer* jupeServer = new (std::nothrow) iServer(0, "", jupeName, time( 0 ) ) ; +iServer* jupeServer = new (std::nothrow) iServer(0, "", jupeName, time( 0 ), st.assemble(2) ) ; assert( jupeServer != 0 ) ; -server->AttachServer( jupeServer, st.assemble( 2 ) ) ; +server->AttachServer( jupeServer ) ; return true; Index: mod.uworld/SERVLISTCommand.cc diff -u mod.uworld/SERVLISTCommand.cc:1.3 mod.uworld/SERVLISTCommand.cc:1.4 --- mod.uworld/SERVLISTCommand.cc:1.3 Thu Jul 10 07:22:18 2003 +++ mod.uworld/SERVLISTCommand.cc Wed Nov 5 17:27:10 2003 @@ -3,7 +3,7 @@ * * Gives an extensive /map report * - * $Id: SERVLISTCommand.cc,v 1.3 2003/07/10 14:22:18 dan_karrels Exp $ + * $Id: SERVLISTCommand.cc,v 1.4 2003/11/06 01:27:10 ultike Exp $ */ #include <new> @@ -22,7 +22,7 @@ #include "misc.h" #include "levels.h" -const char SERVLISTCommand_cc_rcsId[] = "$Id: SERVLISTCommand.cc,v 1.3 2003/07/10 14:22:18 dan_karrels Exp $"; +const char SERVLISTCommand_cc_rcsId[] = "$Id: SERVLISTCommand.cc,v 1.4 2003/11/06 01:27:10 ultike Exp $"; namespace gnuworld { @@ -48,8 +48,8 @@ unsigned int AddedServers = 0; -xNetwork::serverIterator ptr = Network->server_begin(); -xNetwork::serverIterator end = Network->server_end(); +xNetwork::serverIterator ptr = Network->servers_begin(); +xNetwork::serverIterator end = Network->servers_end(); for( ; ptr != end ; ptr++ ) { @@ -59,10 +59,10 @@ continue ; } - if(!server->isJuped(CurServer)) + if(!CurServer->isJupe()) { bot->SendTo(theClient, PrivMsg, "%40s [%s] (%4d) Maxusers %6d", CurServer->getName().c_str(), - CurServer->getCharYY(), CurServer->getIntYY(), CurServer->getIntXXX() ) ; + CurServer->getCharYY().c_str(), CurServer->getIntYY(), CurServer->getIntXXX() ) ; AddedServers++; } } Index: mod.uworld/WALLOPSCommand.cc diff -u mod.uworld/WALLOPSCommand.cc:1.3 mod.uworld/WALLOPSCommand.cc:1.4 --- mod.uworld/WALLOPSCommand.cc:1.3 Thu Jul 10 07:22:18 2003 +++ mod.uworld/WALLOPSCommand.cc Wed Nov 5 17:27:10 2003 @@ -37,7 +37,7 @@ } -bot->Write("%s%s WU :%s", bot->getCharYY(), bot->getCharXXX(), st.assemble(1).c_str()); +bot->Write("%s%s WU :%s", bot->getCharYY().c_str(), bot->getCharXXX().c_str(), st.assemble(1).c_str()); uwUser* theUser = bot->IsAuth(theClient); Index: mod.uworld/WHOISCommand.cc diff -u mod.uworld/WHOISCommand.cc:1.3 mod.uworld/WHOISCommand.cc:1.4 --- mod.uworld/WHOISCommand.cc:1.3 Thu Jul 10 07:22:18 2003 +++ mod.uworld/WHOISCommand.cc Wed Nov 5 17:27:10 2003 @@ -16,7 +16,7 @@ #include "ip.h" #include "levels.h" -const char WHOISCommand_cc_rcsId[] = "$Id: WHOISCommand.cc,v 1.3 2003/07/10 14:22:18 dan_karrels Exp $"; +const char WHOISCommand_cc_rcsId[] = "$Id: WHOISCommand.cc,v 1.4 2003/11/06 01:27:10 ultike Exp $"; namespace gnuworld { @@ -77,8 +77,8 @@ bot->SendTo(theClient, PrivMsg, "Numeric: %s, UserModes: %s, Server Numeric: %s (%s)", Target->getCharYYXXX().c_str(), - Target->getCharModes().c_str(), - targetServer->getCharYY(), + Target->getStringModes().c_str(), + targetServer->getCharYY().c_str(), targetServer->getName().c_str() ) ; Index: mod.uworld/uworld.cc diff -u mod.uworld/uworld.cc:1.3 mod.uworld/uworld.cc:1.4 --- mod.uworld/uworld.cc:1.3 Thu Jul 10 07:22:18 2003 +++ mod.uworld/uworld.cc Wed Nov 5 17:27:10 2003 @@ -535,7 +535,7 @@ ChannelUser* mySelf = theChan->findUser(getInstance()); if(theClient->isOper() && mySelf->isModeO()) - Write("%s%s M %s +o %s", getCharYY(), getCharXXX(), theChan->getName().c_str(), + Write("%s%s M %s +o %s", getCharYY().c_str(), getCharXXX().c_str(), theChan->getName().c_str(), theClient->getCharYYXXX().c_str()); //TODO: find out why this doesn't work properly //Op(theChan, theClient); @@ -833,9 +833,7 @@ uwUser* tmpUser = GetUser( id ); if( tmpUser->getFlag(uwUser::CONSOLE) ) { - const char* myCharYY = getCharYY(); - const char* myCharXXX = getCharXXX(); - Write("%s%s O %s :%s\n", myCharYY, myCharXXX, (*ptr)->getNumeric().c_str(), buffer); + Write("%s%s O %s :%s\n", getCharYY().c_str(), getCharXXX().c_str(), (*ptr)->getNumeric().c_str(), buffer); //Notice(theClient, "%s", buffer); } } @@ -848,9 +846,9 @@ { if( PrivMsg ) { - Write("%s%s P %s :%s", getCharYY(), getCharXXX(), theClient->getCharYYXXX().c_str(), Msg.c_str()); + Write("%s%s P %s :%s", getCharYY().c_str(), getCharXXX().c_str(), theClient->getCharYYXXX().c_str(), Msg.c_str()); } else { - Write("%s%s O %s :%s", getCharYY(), getCharXXX(), theClient->getCharYYXXX().c_str(), Msg.c_str()); + Write("%s%s O %s :%s", getCharYY().c_str(), getCharXXX().c_str(), theClient->getCharYYXXX().c_str(), Msg.c_str()); } } @@ -867,9 +865,9 @@ va_end( list ) ; if( PrivMsg ) { - Write("%s%s P %s :%s", getCharYY(), getCharXXX(), theClient->getCharYYXXX().c_str(), buffer); + Write("%s%s P %s :%s", getCharYY().c_str(), getCharXXX().c_str(), theClient->getCharYYXXX().c_str(), buffer); } else { - Write("%s%s O %s :%s", getCharYY(), getCharXXX(), theClient->getCharYYXXX().c_str(), buffer); + Write("%s%s O %s :%s", getCharYY().c_str(), getCharXXX().c_str(), theClient->getCharYYXXX().c_str(), buffer); } } @@ -1509,8 +1507,8 @@ bool uworld::addNet() { -xNetwork::serverIterator ptr = Network->server_begin(); -xNetwork::serverIterator end = Network->server_end(); +xNetwork::serverIterator ptr = Network->servers_begin(); +xNetwork::serverIterator end = Network->servers_end(); iServer* curServer; for( ; ptr != end ; ptr++ ) ----------------------- End of diff ----------------------- |
From: Daniel K. <dan...@us...> - 2003-07-10 14:14:30
|
Committer : dan_karrels CVSROOT : /cvsroot/mod-uworld Module : mod.uworld Commit time: 2003-07-10 14:14:29 UTC Log message: Author: Log message: moo Status: Vendor Tag: vendor-tag Release Tags: release-tag U mod.uworld/configure.ac U mod.uworld/.cvsignore U mod.uworld/ACCESSCommand.cc U mod.uworld/ADDUSERCommand.cc U mod.uworld/AGLCommand.cc U mod.uworld/BADCHANCommand.cc U mod.uworld/CHANINFOCommand.cc U mod.uworld/CHECKNETCommand.cc U mod.uworld/CLEARCHANCommand.cc U mod.uworld/COPYING U mod.uworld/ChangeLog U mod.uworld/DEAUTHCommand.cc U mod.uworld/DELSERVERCommand.cc U mod.uworld/FDEAUTHCommand.cc U mod.uworld/GLINECommand.cc U mod.uworld/GLOBALNOTCommand.cc U mod.uworld/HELPCommand.cc U mod.uworld/INVITECommand.cc U mod.uworld/INVMECommand.cc U mod.uworld/JOINCommand.cc U mod.uworld/JUPECommand.cc U mod.uworld/LASTCOMMCommand.cc U mod.uworld/LEARNNETCommand.cc U mod.uworld/LICENSE U mod.uworld/LISTCommand.cc U mod.uworld/LOGINCommand.cc U mod.uworld/MODECommand.cc U mod.uworld/MODUSERCommand.cc U mod.uworld/Makefile.am U mod.uworld/NEWPASSCommand.cc U mod.uworld/OMSGCommand.cc U mod.uworld/OPCHANCommand.cc U mod.uworld/PARTCommand.cc U mod.uworld/QUOTECommand.cc U mod.uworld/REMBADCHANCommand.cc U mod.uworld/REMGLINECommand.cc U mod.uworld/REMUSERCommand.cc U mod.uworld/SAYCommand.cc U mod.uworld/SCANCommand.cc U mod.uworld/SERVLISTCommand.cc U mod.uworld/SHUTDOWNCommand.cc U mod.uworld/STATUSCommand.cc U mod.uworld/SUSPENDCommand.cc U mod.uworld/TRANSLATECommand.cc U mod.uworld/UNSUSPENDCommand.cc U mod.uworld/UPTIMECommand.cc U mod.uworld/WALLOPSCommand.cc U mod.uworld/WHOISCommand.cc U mod.uworld/constants.h U mod.uworld/glineConstants.h U mod.uworld/levels.h U mod.uworld/uwAGL.cc U mod.uworld/uwAGL.h U mod.uworld/uwGline.cc U mod.uworld/uwGline.h U mod.uworld/uwLog.cc U mod.uworld/uwLog.h U mod.uworld/uwServer.cc U mod.uworld/uwServer.h U mod.uworld/uwUser.cc U mod.uworld/uwUser.h U mod.uworld/uworld.cc U mod.uworld/uworld.h U mod.uworld/uworldCommands.cc U mod.uworld/uworldCommands.h U mod.uworld/configure U mod.uworld/aclocal.m4 U mod.uworld/defs.h.in U mod.uworld/install-sh U mod.uworld/mkinstalldirs U mod.uworld/missing U mod.uworld/config.guess U mod.uworld/config.sub U mod.uworld/INSTALL U mod.uworld/depcomp U mod.uworld/NEWS U mod.uworld/README U mod.uworld/AUTHORS U mod.uworld/ltmain.sh U mod.uworld/autom4te.cache/requests U mod.uworld/autom4te.cache/output.0 U mod.uworld/autom4te.cache/traces.0 N mod.uworld/mod.uworld/AGLCommand.cc N mod.uworld/mod.uworld/AUTHORS N mod.uworld/mod.uworld/BADCHANCommand.cc N mod.uworld/mod.uworld/CHANINFOCommand.cc N mod.uworld/mod.uworld/CHECKNETCommand.cc N mod.uworld/mod.uworld/DELSERVERCommand.cc N mod.uworld/mod.uworld/INSTALL N mod.uworld/mod.uworld/LASTCOMMCommand.cc N mod.uworld/mod.uworld/LEARNNETCommand.cc N mod.uworld/mod.uworld/NEWS N mod.uworld/mod.uworld/OMSGCommand.cc N mod.uworld/mod.uworld/README N mod.uworld/mod.uworld/REMBADCHANCommand.cc N mod.uworld/mod.uworld/STATUSCommand.cc N mod.uworld/mod.uworld/SUSPENDCommand.cc N mod.uworld/mod.uworld/UNSUSPENDCommand.cc N mod.uworld/mod.uworld/UPTIMECommand.cc N mod.uworld/mod.uworld/aclocal.m4 N mod.uworld/mod.uworld/config.guess N mod.uworld/mod.uworld/config.sub N mod.uworld/mod.uworld/configure N mod.uworld/mod.uworld/configure.ac N mod.uworld/mod.uworld/defs.h.in N mod.uworld/mod.uworld/depcomp N mod.uworld/mod.uworld/install-sh N mod.uworld/mod.uworld/ltmain.sh N mod.uworld/mod.uworld/missing N mod.uworld/mod.uworld/mkinstalldirs N mod.uworld/mod.uworld/uwAGL.cc N mod.uworld/mod.uworld/uwAGL.h N mod.uworld/mod.uworld/uwLog.cc N mod.uworld/mod.uworld/uwLog.h N mod.uworld/mod.uworld/uwServer.cc N mod.uworld/mod.uworld/uwServer.h N mod.uworld/mod.uworld/autom4te.cache/output.0 N mod.uworld/mod.uworld/autom4te.cache/requests N mod.uworld/mod.uworld/autom4te.cache/traces.0 No conflicts created by this import |
From: Daniel K. <dan...@us...> - 2003-07-10 14:10:58
|
Committer : dan_karrels CVSROOT : /cvsroot/mod-uworld Module : mod.uworld Commit time: 2003-07-10 14:10:58 UTC Log message: Author: Log message: Initial checkin Status: Vendor Tag: vendor-tag Release Tags: release-tag N mod.uworld/configure.ac U mod.uworld/.cvsignore C mod.uworld/ACCESSCommand.cc C mod.uworld/ADDUSERCommand.cc N mod.uworld/AGLCommand.cc N mod.uworld/BADCHANCommand.cc N mod.uworld/CHANINFOCommand.cc N mod.uworld/CHECKNETCommand.cc C mod.uworld/CLEARCHANCommand.cc C mod.uworld/COPYING U mod.uworld/ChangeLog C mod.uworld/DEAUTHCommand.cc N mod.uworld/DELSERVERCommand.cc C mod.uworld/FDEAUTHCommand.cc C mod.uworld/GLINECommand.cc C mod.uworld/GLOBALNOTCommand.cc C mod.uworld/HELPCommand.cc C mod.uworld/INVITECommand.cc C mod.uworld/INVMECommand.cc C mod.uworld/JOINCommand.cc C mod.uworld/JUPECommand.cc N mod.uworld/LASTCOMMCommand.cc N mod.uworld/LEARNNETCommand.cc C mod.uworld/LICENSE C mod.uworld/LISTCommand.cc C mod.uworld/LOGINCommand.cc C mod.uworld/MODECommand.cc C mod.uworld/MODUSERCommand.cc C mod.uworld/Makefile.am C mod.uworld/NEWPASSCommand.cc N mod.uworld/OMSGCommand.cc C mod.uworld/OPCHANCommand.cc C mod.uworld/PARTCommand.cc C mod.uworld/QUOTECommand.cc N mod.uworld/REMBADCHANCommand.cc C mod.uworld/REMGLINECommand.cc C mod.uworld/REMUSERCommand.cc C mod.uworld/SAYCommand.cc C mod.uworld/SCANCommand.cc C mod.uworld/SERVLISTCommand.cc C mod.uworld/SHUTDOWNCommand.cc N mod.uworld/STATUSCommand.cc N mod.uworld/SUSPENDCommand.cc C mod.uworld/TRANSLATECommand.cc N mod.uworld/UNSUSPENDCommand.cc N mod.uworld/UPTIMECommand.cc C mod.uworld/WALLOPSCommand.cc C mod.uworld/WHOISCommand.cc C mod.uworld/constants.h U mod.uworld/glineConstants.h C mod.uworld/levels.h N mod.uworld/uwAGL.cc N mod.uworld/uwAGL.h C mod.uworld/uwGline.cc C mod.uworld/uwGline.h N mod.uworld/uwLog.cc N mod.uworld/uwLog.h N mod.uworld/uwServer.cc N mod.uworld/uwServer.h C mod.uworld/uwUser.cc C mod.uworld/uwUser.h C mod.uworld/uworld.cc C mod.uworld/uworld.h C mod.uworld/uworldCommands.cc C mod.uworld/uworldCommands.h N mod.uworld/configure N mod.uworld/aclocal.m4 N mod.uworld/defs.h.in N mod.uworld/install-sh N mod.uworld/mkinstalldirs N mod.uworld/missing N mod.uworld/config.guess N mod.uworld/config.sub N mod.uworld/INSTALL N mod.uworld/depcomp N mod.uworld/NEWS N mod.uworld/README N mod.uworld/AUTHORS N mod.uworld/ltmain.sh N mod.uworld/autom4te.cache/requests N mod.uworld/autom4te.cache/output.0 N mod.uworld/autom4te.cache/traces.0 42 conflicts created by this import. Use the following command to help the merge: cvs checkout -jvendor-tag:yesterday -jvendor-tag mod.uworld |
From: Matthias C. <ul...@us...> - 2003-06-14 14:11:37
|
Committer : Matthias Crauwels <ul...@us...> CVSROOT : /cvsroot/mod-uworld Module : gnuworld Commit time: 2003-06-14 14:11:35 UTC Modified files: doc/commands.sql src/Network.cc Log message: Author: Matthias Crauwels Log message: patches ---------------------- diff included ---------------------- Index: gnuworld/doc/commands.sql diff -u gnuworld/doc/commands.sql:1.7 gnuworld/doc/commands.sql:1.8 --- gnuworld/doc/commands.sql:1.7 Thu Jan 30 05:47:01 2003 +++ gnuworld/doc/commands.sql Sat Jun 14 07:11:24 2003 @@ -125,3 +125,7 @@ INSERT INTO commands (command,shortdesc,level,longdesc) VALUES('AGL', 'modifies the AGL-table', 700, ''); + +INSERT INTO commands (command,shortdesc,level,longdesc) +VALUES('STATUS', 'shows the internal status', 100, ''); + Index: gnuworld/src/Network.cc diff -u gnuworld/src/Network.cc:1.6 gnuworld/src/Network.cc:1.7 --- gnuworld/src/Network.cc:1.6 Sat Jun 7 04:47:38 2003 +++ gnuworld/src/Network.cc Sat Jun 14 07:11:24 2003 @@ -18,7 +18,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, * USA. * - * $Id: Network.cc,v 1.6 2003/06/07 11:47:38 ultike Exp $ + * $Id: Network.cc,v 1.7 2003/06/14 14:11:24 ultike Exp $ */ #include <new> @@ -42,7 +42,7 @@ #include "ip.h" const char xNetwork_h_rcsId[] = __NETWORK_H ; -const char xNetwork_cc_rcsId[] = "$Id: Network.cc,v 1.6 2003/06/07 11:47:38 ultike Exp $" ; +const char xNetwork_cc_rcsId[] = "$Id: Network.cc,v 1.7 2003/06/14 14:11:24 ultike Exp $" ; const char ELog_h_rcsId[] = __ELOG_H ; const char iClient_h_rcsId[] = __ICLIENT_H ; const char Channel_h_rcsId[] = __CHANNEL_H ; @@ -350,8 +350,8 @@ removeNick( retMe->getNickName() ) ; // Remove all associations between client->channel -iClient::channelIterator chanPtr = retMe->channels_begin() ; -while( chanPtr != retMe->channels_end() ) +for( iClient::channelIterator chanPtr = retMe->channels_begin() ; + chanPtr != retMe->channels_end() ; ++chanPtr ) { // elog << "xNetwork::removeClient> Removing user " // << retMe->getCharYYXXX() @@ -379,7 +379,6 @@ delete removeChannel( (*chanPtr)->getName() ) ; } - ++chanPtr ; } retMe->clearChannels() ; @@ -656,9 +655,9 @@ for( yyVectorType::const_iterator yyIterator = yyVector.begin() ; yyIterator != yyVector.end() ; ++yyIterator ) { - // Obtain a pointer to the server in question for convenience - // and readability - iServer* removeMe = findServer( *yyIterator ) ; + // Remove the server, its clients, any empty channels, + // and post events for all of the above. + iServer* removeMe = removeServer( *yyIterator, true ) ; assert( removeMe != 0 ) ; // Generate some debugging information @@ -672,18 +671,17 @@ // Dont post an event for the actual server that is being // squit, let the msg_SQ handle that. - if( intYY != tmpServer->getIntYY() ) - { - string Reason = "Uplink Squit"; - - theServer->PostEvent(EVT_NETBREAK, - static_cast<void *>(tmpServer), - static_cast<void*>(findServer(intYY)), - static_cast<void*>(&Reason)); - } - - delete tmpServer; - } + if( intYY != removeMe->getIntYY() ) + { + string Reason = "Uplink Squit"; + + theServer->PostEvent( EVT_NETBREAK, + static_cast<void *>( removeMe ), + static_cast<void*>( findServer( intYY ) ), + static_cast<void*>( &Reason ) ); + } + delete removeMe ; + } // for() } /** ----------------------- End of diff ----------------------- |
From: Matthias C. <ul...@us...> - 2003-06-14 14:10:37
|
Committer : Matthias Crauwels <ul...@us...> CVSROOT : /cvsroot/mod-uworld Module : gnuworld Commit time: 2003-06-14 14:10:36 UTC Modified files: mod.uworld/Makefile.am mod.uworld/Makefile.in mod.uworld/REMUSERCommand.cc mod.uworld/UPTIMECommand.cc mod.uworld/levels.h mod.uworld/uworld.cc mod.uworld/uworld.h mod.uworld/uworldCommands.h Added files: mod.uworld/STATUSCommand.cc Log message: Author: Matthias Crauwels Log message: * added STATUSCommand ---------------------- diff included ---------------------- Index: gnuworld/mod.uworld/Makefile.am diff -u gnuworld/mod.uworld/Makefile.am:1.9 gnuworld/mod.uworld/Makefile.am:1.10 --- gnuworld/mod.uworld/Makefile.am:1.9 Sun Jan 19 14:53:04 2003 +++ gnuworld/mod.uworld/Makefile.am Sat Jun 14 07:10:26 2003 @@ -1,5 +1,5 @@ ## Process this file with automake to produce Makefile.in -# "$Id: Makefile.am,v 1.9 2003/01/19 22:53:04 ultike Exp $" +# "$Id: Makefile.am,v 1.10 2003/06/14 14:10:26 ultike Exp $" lib_LTLIBRARIES = libuworld.la libuworld_la_SOURCES = uworld.cc \ @@ -44,6 +44,7 @@ SCANCommand.cc \ SERVLISTCommand.cc \ SHUTDOWNCommand.cc \ + STATUSCommand.cc \ SUSPENDCommand.cc \ TRANSLATECommand.cc \ UPTIMECommand.cc \ Index: gnuworld/mod.uworld/Makefile.in diff -u gnuworld/mod.uworld/Makefile.in:1.12 gnuworld/mod.uworld/Makefile.in:1.13 --- gnuworld/mod.uworld/Makefile.in:1.12 Thu Jun 5 10:37:28 2003 +++ gnuworld/mod.uworld/Makefile.in Sat Jun 14 07:10:26 2003 @@ -14,7 +14,7 @@ @SET_MAKE@ -# "$Id: Makefile.in,v 1.12 2003/06/05 17:37:28 ultike Exp $" +# "$Id: Makefile.in,v 1.13 2003/06/14 14:10:26 ultike Exp $" srcdir = @srcdir@ top_srcdir = @top_srcdir@ @@ -190,6 +190,7 @@ SCANCommand.cc \ SERVLISTCommand.cc \ SHUTDOWNCommand.cc \ + STATUSCommand.cc \ SUSPENDCommand.cc \ TRANSLATECommand.cc \ UPTIMECommand.cc \ @@ -221,8 +222,9 @@ PARTCommand.lo QUOTECommand.lo REMBADCHANCommand.lo \ REMGLINECommand.lo REMUSERCommand.lo SAYCommand.lo \ SCANCommand.lo SERVLISTCommand.lo SHUTDOWNCommand.lo \ - SUSPENDCommand.lo TRANSLATECommand.lo UPTIMECommand.lo \ - UNSUSPENDCommand.lo WALLOPSCommand.lo WHOISCommand.lo + STATUSCommand.lo SUSPENDCommand.lo TRANSLATECommand.lo \ + UPTIMECommand.lo UNSUSPENDCommand.lo WALLOPSCommand.lo \ + WHOISCommand.lo libuworld_la_OBJECTS = $(am_libuworld_la_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/include @@ -263,6 +265,7 @@ @AMDEP_TRUE@ ./$(DEPDIR)/SCANCommand.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/SERVLISTCommand.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/SHUTDOWNCommand.Plo \ +@AMDEP_TRUE@ ./$(DEPDIR)/STATUSCommand.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/SUSPENDCommand.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/TRANSLATECommand.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/UNSUSPENDCommand.Plo \ @@ -366,6 +369,7 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SCANCommand.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SERVLISTCommand.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SHUTDOWNCommand.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/STATUSCommand.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SUSPENDCommand.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/TRANSLATECommand.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/UNSUSPENDCommand.Plo@am__quote@ Index: gnuworld/mod.uworld/REMUSERCommand.cc diff -u gnuworld/mod.uworld/REMUSERCommand.cc:1.5 gnuworld/mod.uworld/REMUSERCommand.cc:1.6 --- gnuworld/mod.uworld/REMUSERCommand.cc:1.5 Tue Jan 14 05:10:22 2003 +++ gnuworld/mod.uworld/REMUSERCommand.cc Sat Jun 14 07:10:26 2003 @@ -17,7 +17,7 @@ #include "levels.h" #include "uworld.h" -const char REMUSERCommand_cc_rcsId[] = "$Id: REMUSERCommand.cc,v 1.5 2003/01/14 13:10:22 ultike Exp $"; +const char REMUSERCommand_cc_rcsId[] = "$Id: REMUSERCommand.cc,v 1.6 2003/06/14 14:10:26 ultike Exp $"; namespace gnuworld { @@ -73,7 +73,7 @@ uwUser* theUser = bot->IsAuth(theClient); if(!theUser) return false; bot->addLog(theUser, theClient, "REMUSER %s", st[1].c_str()); -bot->MsgChanLog("%s ( %s ) removed user %s\n", theUser->getUserName().c_str(), +bot->MsgChanLog("%s ( %s ) removed user %s", theUser->getUserName().c_str(), theClient->getNickUserHost().c_str(), tmpUser->getUserName().c_str()); //delete tmpUser; Index: gnuworld/mod.uworld/STATUSCommand.cc diff -u /dev/null gnuworld/mod.uworld/STATUSCommand.cc:1.1 --- /dev/null Sat Jun 14 07:10:36 2003 +++ gnuworld/mod.uworld/STATUSCommand.cc Sat Jun 14 07:10:26 2003 @@ -0,0 +1,61 @@ +/* + * STATUSCommand.cc + * + * Shows the bots status + * + */ + +#include <string> +#include <iomanip> + +#include <cstdlib> + +#include "uworld.h" +#include "uworldCommands.h" +#include "StringTokenizer.h" +#include "misc.h" +#include "match.h" +#include "Network.h" +#include "levels.h" + +const char STATUSCommand_cc_rcsId[] = "$Id: STATUSCommand.cc,v 1.1 2003/06/14 14:10:26 ultike Exp $"; + +namespace gnuworld +{ + +using std::string ; + +namespace uwrld +{ + +bool STATUSCommand::Exec( iClient* theClient, const string& Message ) +{ + +StringTokenizer st( Message ) ; +bool PrivMsg = bot->SendPrivmsg(theClient); + +short int operLevel = bot->getOperLevel(theClient); +if(operLevel < levels::status) + { + bot->SendTo(theClient, PrivMsg, "This command requires access level %d!", levels::status); + return false; + } + +string username = "notLoggedIn"; +uwUser* theUser = bot->IsAuth(theClient); +if(theUser) username = theUser->getUserName(); +bot->addLog(username, theClient, "STATUS"); +bot->MsgChanLog("%s ( %s ) - STATUS", username.c_str(), theClient->getNickUserHost().c_str()); + + +bot->SendTo(theClient, PrivMsg, "-= Mod.Uworld's internal status =-"); +bot->Status(theClient, PrivMsg); +bot->showUptime(theClient, PrivMsg); +bot->SendTo(theClient, PrivMsg, "-= End of status =-"); + + +return true; +} + +} +} Index: gnuworld/mod.uworld/UPTIMECommand.cc diff -u gnuworld/mod.uworld/UPTIMECommand.cc:1.3 gnuworld/mod.uworld/UPTIMECommand.cc:1.4 --- gnuworld/mod.uworld/UPTIMECommand.cc:1.3 Sun Feb 9 14:20:05 2003 +++ gnuworld/mod.uworld/UPTIMECommand.cc Sat Jun 14 07:10:26 2003 @@ -38,7 +38,7 @@ bot->MsgChanLog("%s ( %s ) - UPTIME", username.c_str(), theClient->getNickUserHost().c_str()); -bot->showUptime(theClient); +bot->showUptime(theClient, PrivMsg); return true ; } Index: gnuworld/mod.uworld/levels.h diff -u gnuworld/mod.uworld/levels.h:1.7 gnuworld/mod.uworld/levels.h:1.8 --- gnuworld/mod.uworld/levels.h:1.7 Wed Jan 29 11:52:18 2003 +++ gnuworld/mod.uworld/levels.h Sat Jun 14 07:10:26 2003 @@ -23,6 +23,7 @@ const int opchan = 100; const int chaninfo = 100; const int uptime = 100; + const int status = 100; const int mode = 400; const int clearchan = 400; Index: gnuworld/mod.uworld/uworld.cc diff -u gnuworld/mod.uworld/uworld.cc:1.18 gnuworld/mod.uworld/uworld.cc:1.19 --- gnuworld/mod.uworld/uworld.cc:1.18 Thu Jun 5 10:37:28 2003 +++ gnuworld/mod.uworld/uworld.cc Sat Jun 14 07:10:26 2003 @@ -165,6 +165,7 @@ RegisterCommand( new LASTCOMMCommand( this, "LASTCOMM", "<number> : shows the latest commands")); RegisterCommand( new CHANINFOCommand( this, "CHANINFO", "<channel> : shows some info on the channel")); RegisterCommand( new AGLCommand( this, "AGL", "<add|del|list|update> <host> <connections>: modifies the AGL-table")); +RegisterCommand( new STATUSCommand( this, "STATUS", ": show the bot's internal status")); } uworld::~uworld() @@ -798,7 +799,7 @@ char buf[ 512 ] = { 0 } ; // Invite buffer -sprintf( buf, "%s I %s :%s\n", +sprintf( buf, "%s I %s :%s", getCharYYXXX().c_str(), theClient->getNickName().c_str(), msgChannel.c_str() ) ; @@ -963,8 +964,8 @@ delete(SQLDb); updateSqldb(NULL); - MsgChanLog("PANIC! - The Connection With The Db Was Lost\n"); - MsgChanLog("Attempting to reconnect, Attempt %d out of %d\n" + MsgChanLog("PANIC! - The Connection With The Db Was Lost"); + MsgChanLog("Attempting to reconnect, Attempt %d out of %d" ,connectCount+1,connectRetry+1); string Query = "host=" + sqlHost + " dbname=" + sqlDb + " port=" + sqlPort; if (strcasecmp(sqlUser,"''")) @@ -984,17 +985,17 @@ ++connectCount; if(connectCount > connectRetry) { - MsgChanLog("Cant connect to the database, quiting\n"); + MsgChanLog("Cant connect to the database, quiting"); ::exit(1); } else { - MsgChanLog("Attempt was failed\n"); + MsgChanLog("Attempt was failed"); } } else { - MsgChanLog("The PANIC is over, db connection restored\n"); + MsgChanLog("The PANIC is over, db connection restored"); updateSqldb(SQLDb); connectCount = 0; } @@ -1263,7 +1264,7 @@ } -void uworld::showUptime(iClient* theClient) +void uworld::showUptime(iClient* theClient, bool PrivMsg) { int uptime = ::time(0) - getUplink()->getStartTime(); int days; @@ -1278,7 +1279,8 @@ mins = uptime / 60; uptime %= 60; secs = uptime; -Notice(theClient,"Uptime : \002%d\002 Day(s) \002%d\002 Hour(s) \002%d\002 Minute(s) \002%d\002 Second(s)",days,hours,mins,secs); +SendTo(theClient, PrivMsg, "Uptime : \002%d\002 Day(s) \002%d\002 Hour(s) \002%d\002 Minute(s) \002%d\002 Second(s)", + days, hours, mins, secs); } bool uworld::LoadUsers() @@ -1818,6 +1820,51 @@ } // isModeK? } //for } // to much connections? + +return true; +} + +int uworld::countMissingServers() +{ +uwServer* curServer; +int missing = 0; +for(serverIterator ptr = serverList.begin(); ptr != serverList.end(); ptr++) + { + curServer = *ptr; + if( !curServer->getServer() ) + { + missing++; + } + } + +return missing; +} + +bool uworld::Status(iClient* theClient, bool PrivMsg) +{ +int glines = 0, users = 0, authed = 0, servers = 0, logs = 0; + +for(glineIterator ptr = glineList.begin(); ptr != glineList.end();++ptr) + glines++; + +for(userIterator ptr = userList.begin(); ptr != userList.end();++ptr) + users++; + +for(authIterator ptr = authList.begin(); ptr != authList.end();++ptr) + authed++; + +for(serverIterator ptr = serverList.begin(); ptr != serverList.end();++ptr) + servers++; + +for(logIterator ptr = logList.begin(); ptr != logList.end();++ptr) + logs++; + + + +SendTo(theClient, PrivMsg, "There are \002%d\002 users and \002%d\002 authed", users, authed); +SendTo(theClient, PrivMsg, "\002%d\002 glines have been placed", glines); +SendTo(theClient, PrivMsg, "I know \002%d\002 servers of which \002%d\002 are missing", servers, countMissingServers()); +SendTo(theClient, PrivMsg, "Logged \002%d\002 commands", logs); return true; } Index: gnuworld/mod.uworld/uworld.h diff -u gnuworld/mod.uworld/uworld.h:1.12 gnuworld/mod.uworld/uworld.h:1.13 --- gnuworld/mod.uworld/uworld.h:1.12 Sun Feb 9 14:20:05 2003 +++ gnuworld/mod.uworld/uworld.h Sat Jun 14 07:10:26 2003 @@ -2,7 +2,7 @@ */ #ifndef __uworld_H -#define __uworld_H "$Id: uworld.h,v 1.12 2003/02/09 22:20:05 ultike Exp $" +#define __uworld_H "$Id: uworld.h,v 1.13 2003/06/14 14:10:26 ultike Exp $" #include <string> #include <vector> @@ -52,7 +52,7 @@ { protected: -#define VERSION "1.0pl2" +#define VERSION "1.0pl3" /** * The type used to store the client's command handlers. @@ -180,7 +180,7 @@ /* * This method sends the servers uptime to the client */ - void showUptime( iClient* ); + void showUptime( iClient*, bool ); /* * This method return true if the client has a PRIVMSG flag @@ -250,6 +250,9 @@ bool LoadAGL(); bool listAGL(iClient*, bool); bool matchAGL(iClient*); + + int countMissingServers(); + bool Status(iClient*, bool); const string removeSqlChars(const string&); Index: gnuworld/mod.uworld/uworldCommands.h diff -u gnuworld/mod.uworld/uworldCommands.h:1.8 gnuworld/mod.uworld/uworldCommands.h:1.9 --- gnuworld/mod.uworld/uworldCommands.h:1.8 Sun Jan 19 14:53:04 2003 +++ gnuworld/mod.uworld/uworldCommands.h Sat Jun 14 07:10:26 2003 @@ -1,5 +1,5 @@ #ifndef __uworldCOMMANDS_H -#define __uworldCOMMANDS_H "$Id: uworldCommands.h,v 1.8 2003/01/19 22:53:04 ultike Exp $" +#define __uworldCOMMANDS_H "$Id: uworldCommands.h,v 1.9 2003/06/14 14:10:26 ultike Exp $" #include <string> #include "iClient.h" @@ -107,6 +107,7 @@ DECLARE_COMMAND( LASTCOMM ); DECLARE_COMMAND( CHANINFO ); DECLARE_COMMAND( AGL ); +DECLARE_COMMAND( STATUS ); } // namespace gnuworld ----------------------- End of diff ----------------------- |
From: Matthias C. <ul...@us...> - 2003-06-07 12:28:52
|
Committer : Matthias Crauwels <ul...@us...> CVSROOT : /cvsroot/mod-uworld Module : gnuworld Commit time: 2003-06-07 12:28:51 UTC Modified files: configure.ac Log message: Author: Matthias Crauwels Log message: should compile my bins in the right dir I guess :) ---------------------- diff included ---------------------- Index: gnuworld/configure.ac diff -u gnuworld/configure.ac:1.1 gnuworld/configure.ac:1.2 --- gnuworld/configure.ac:1.1 Thu Jun 5 11:21:31 2003 +++ gnuworld/configure.ac Sat Jun 7 05:28:40 2003 @@ -1,10 +1,10 @@ -dnl $Id: configure.ac,v 1.1 2003/06/05 18:21:31 ultike Exp $ +dnl $Id: configure.ac,v 1.2 2003/06/07 12:28:40 ultike Exp $ dnl ---------------------------------------------------------- echo Configuring GNUWorld... echo -AC_REVISION($Revision: 1.1 $) +AC_REVISION($Revision: 1.2 $) AC_INIT AC_CONFIG_SRCDIR([src/main.cc]) AM_INIT_AUTOMAKE(gnuworld,0.0) @@ -32,8 +32,9 @@ CFLAGS="$CFLAGS -Wall -pipe" CXXFLAGS="-Wall -pipe" -prefix=`pwd` -bindir=`pwd` +prefix="`pwd`" +bindir="`pwd`/bin" +libdir="`pwd`/lib" glibdir="`pwd`/libgnuworld" topdir="`pwd`" ----------------------- End of diff ----------------------- |