srvx-commits Mailing List for srvx IRC Services (Page 81)
Brought to you by:
entrope
You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(80) |
Sep
(51) |
Oct
(94) |
Nov
(132) |
Dec
(85) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(163) |
Feb
(96) |
Mar
(70) |
Apr
(182) |
May
(173) |
Jun
(73) |
Jul
(101) |
Aug
(101) |
Sep
(71) |
Oct
(76) |
Nov
(58) |
Dec
(60) |
2003 |
Jan
(61) |
Feb
(14) |
Mar
(3) |
Apr
|
May
(7) |
Jun
(22) |
Jul
(81) |
Aug
(41) |
Sep
(34) |
Oct
(41) |
Nov
(16) |
Dec
(28) |
2004 |
Jan
(7) |
Feb
|
Mar
(3) |
Apr
(15) |
May
(11) |
Jun
(1) |
Jul
(4) |
Aug
(1) |
Sep
(4) |
Oct
(1) |
Nov
(1) |
Dec
(1) |
2005 |
Jan
(13) |
Feb
(6) |
Mar
(1) |
Apr
|
May
(2) |
Jun
(1) |
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
2009 |
Jan
|
Feb
|
Mar
(5) |
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
(2) |
Oct
|
Nov
|
Dec
|
2010 |
Jan
(2) |
Feb
(3) |
Mar
(4) |
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(2) |
Dec
|
2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
(1) |
Dec
|
2012 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2016 |
Jan
|
Feb
|
Mar
|
Apr
(3) |
May
(4) |
Jun
|
Jul
(1) |
Aug
|
Sep
(3) |
Oct
(2) |
Nov
|
Dec
|
2017 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2018 |
Jan
(2) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2020 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2023 |
Jan
|
Feb
(3) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(3) |
Dec
|
2025 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Entrope <en...@us...> - 2001-10-03 00:57:49
|
Update of /cvsroot/srvx/services/docs In directory usw-pr-cvs1:/tmp/cvs-serv19385/docs Added Files: devel-notes.txt Log Message: get rid of further uses of HAVE_ansihdr_H, and document the list of accepted ANSI headers --- NEW FILE --- This file contains various development notes useful when coding srvx. HEADER FILES: If a file or feature is not defined in ANSI C89, an autoconf feature test should be used to verify that it is supported. ANSI C89 specifies that the following header files exist: <assert.h> <ctype.h> <errno.h> <float.h> <limits.h> <locale.h> <math.h> <setjmp.h> <signal.h> <stdarg.h> <stddef.h> <stdio.h> <stdlib.h> <string.h> <time.h> |
From: Entrope <en...@us...> - 2001-10-02 16:32:10
|
Update of /cvsroot/srvx/services In directory usw-pr-cvs1:/tmp/cvs-serv27782 Modified Files: aclocal.m4 configure.ac Log Message: update checked header list in configure.ac Index: aclocal.m4 =================================================================== RCS file: /cvsroot/srvx/services/aclocal.m4,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -r1.14 -r1.15 *** aclocal.m4 2001/09/27 21:58:08 1.14 --- aclocal.m4 2001/10/02 16:32:07 1.15 *************** *** 1,36 **** ! dnl aclocal.m4 generated automatically by aclocal 1.4-p4 ! dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. ! dnl This file is free software; the Free Software Foundation ! dnl gives unlimited permission to copy and/or distribute it, ! dnl with or without modifications, as long as this notice is preserved. ! ! dnl This program is distributed in the hope that it will be useful, ! dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without ! dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A ! dnl PARTICULAR PURPOSE. # Like AC_CONFIG_HEADER, but automatically create stamp file. ! AC_DEFUN(AM_CONFIG_HEADER, ! [AC_PREREQ([2.12]) ! AC_CONFIG_HEADER([$1]) ! dnl When config.status generates a header, we must update the stamp-h file. ! dnl This file resides in the same directory as the config header ! dnl that is generated. We must strip everything past the first ":", ! dnl and everything past the last "/". ! AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl ! ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>, ! <<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>, ! <<am_indx=1 ! for am_file in <<$1>>; do ! case " <<$>>CONFIG_HEADERS " in ! *" <<$>>am_file "*<<)>> ! echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx ;; esac ! am_indx=`expr "<<$>>am_indx" + 1` ! done<<>>dnl>>) ! changequote([,]))]) # Do all the work for Automake. This macro actually does too much -- --- 1,81 ---- ! # aclocal.m4 generated automatically by aclocal 1.5 ! # Copyright 1996, 1997, 1998, 1999, 2000, 2001 ! # 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. ! ! # This program is distributed in the hope that it will be useful, ! # but WITHOUT ANY WARRANTY, to the extent permitted by law; without ! # even the implied warranty of MERCHANTABILITY or FITNESS FOR A ! # PARTICULAR PURPOSE. # Like AC_CONFIG_HEADER, but automatically create stamp file. ! # serial 3 ! ! # 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. We must strip everything past the first ":", ! # and everything past the last "/". ! ! AC_PREREQ([2.12]) ! ! AC_DEFUN([AM_CONFIG_HEADER], ! [ifdef([AC_FOREACH],dnl ! [dnl init our file count if it isn't already ! m4_ifndef([_AM_Config_Header_Index], m4_define([_AM_Config_Header_Index], [0])) ! dnl prepare to store our destination file list for use in config.status ! AC_FOREACH([_AM_File], [$1], ! [m4_pushdef([_AM_Dest], m4_patsubst(_AM_File, [:.*])) ! m4_define([_AM_Config_Header_Index], m4_incr(_AM_Config_Header_Index)) ! dnl and add it to the list of files AC keeps track of, along ! dnl with our hook ! AC_CONFIG_HEADERS(_AM_File, ! dnl COMMANDS, [, INIT-CMDS] ! [# update the timestamp ! echo timestamp >"AS_ESCAPE(_AM_DIRNAME(]_AM_Dest[))/stamp-h]_AM_Config_Header_Index[" ! ][$2]m4_ifval([$3], [, [$3]]))dnl AC_CONFIG_HEADERS ! m4_popdef([_AM_Dest])])],dnl ! [AC_CONFIG_HEADER([$1]) ! AC_OUTPUT_COMMANDS( ! ifelse(patsubst([$1], [[^ ]], []), ! [], ! [test -z "$CONFIG_HEADERS" || echo timestamp >dnl ! patsubst([$1], [^\([^:]*/\)?.*], [\1])stamp-h]),dnl ! [am_indx=1 ! for am_file in $1; do ! case " \$CONFIG_HEADERS " in ! *" \$am_file "*) ! am_dir=\`echo \$am_file |sed 's%:.*%%;s%[^/]*\$%%'\` ! if test -n "\$am_dir"; then ! am_tmpdir=\`echo \$am_dir |sed 's%^\(/*\).*\$%\1%'\` ! for am_subdir in \`echo \$am_dir |sed 's%/% %'\`; do ! am_tmpdir=\$am_tmpdir\$am_subdir/ ! if test ! -d \$am_tmpdir; then ! mkdir \$am_tmpdir ! fi ! done ! fi ! echo timestamp > "\$am_dir"stamp-h\$am_indx ;; esac ! am_indx=\`expr \$am_indx + 1\` ! done]) ! ])]) # AM_CONFIG_HEADER ! ! # _AM_DIRNAME(PATH) ! # ----------------- ! # Like AS_DIRNAME, only do it during macro expansion ! AC_DEFUN([_AM_DIRNAME], ! [m4_if(m4_regexp([$1], [^.*[^/]//*[^/][^/]*/*$]), -1, ! m4_if(m4_regexp([$1], [^//\([^/]\|$\)]), -1, ! m4_if(m4_regexp([$1], [^/.*]), -1, ! [.], ! m4_patsubst([$1], [^\(/\).*], [\1])), ! m4_patsubst([$1], [^\(//\)\([^/].*\|$\)], [\1])), ! m4_patsubst([$1], [^\(.*[^/]\)//*[^/][^/]*/*$], [\1]))[]dnl ! ]) # _AM_DIRNAME # Do all the work for Automake. This macro actually does too much -- *************** *** 38,79 **** # But this isn't really a big deal. ! # serial 1 ! ! dnl Usage: ! dnl AM_INIT_AUTOMAKE(package,version, [no-define]) ! AC_DEFUN(AM_INIT_AUTOMAKE, ! [AC_REQUIRE([AC_PROG_INSTALL]) ! PACKAGE=[$1] ! AC_SUBST(PACKAGE) ! VERSION=[$2] ! AC_SUBST(VERSION) ! 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 ifelse([$3],, ! AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) ! AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])) ! AC_REQUIRE([AM_SANITY_CHECK]) ! AC_REQUIRE([AC_ARG_PROGRAM]) ! dnl FIXME This is truly gross. ! missing_dir=`cd $ac_aux_dir && pwd` ! AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir) ! AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir) ! AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir) ! AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir) ! AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir) ! AC_REQUIRE([AC_PROG_MAKE_SET])]) # # Check to make sure that the build environment is sane. # ! AC_DEFUN(AM_SANITY_CHECK, [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 ! echo timestamp > conftestfile # 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 --- 83,185 ---- # But this isn't really a big deal. ! # serial 5 ! # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be ! # written in clear, in which case automake, when reading aclocal.m4, ! # will think it sees a *use*, and therefore will trigger all it's ! # C support machinery. Also note that it means that autoscan, seeing ! # CC etc. in the Makefile, will ask for an AC_PROG_CC use... ! ! ! # We require 2.13 because we rely on SHELL being computed by configure. ! AC_PREREQ([2.13]) ! ! # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) ! # ----------------------------------------------------------- ! # If MACRO-NAME is provided do IF-PROVIDED, else IF-NOT-PROVIDED. ! # The purpose of this macro is to provide the user with a means to ! # check macros which are provided without letting her know how the ! # information is coded. ! # If this macro is not defined by Autoconf, define it here. ! ifdef([AC_PROVIDE_IFELSE], ! [], ! [define([AC_PROVIDE_IFELSE], ! [ifdef([AC_PROVIDE_$1], ! [$2], [$3])])]) ! ! ! # AM_INIT_AUTOMAKE(PACKAGE,VERSION, [NO-DEFINE]) ! # ---------------------------------------------- ! AC_DEFUN([AM_INIT_AUTOMAKE], ! [AC_REQUIRE([AC_PROG_INSTALL])dnl ! # test to see if srcdir already configured ! if test "`CDPATH=:; cd $srcdir && pwd`" != "`pwd`" && ! test -f $srcdir/config.status; then ! AC_MSG_ERROR([source directory already configured; run \"make distclean\" there first]) fi + + # Define the identity of the package. + PACKAGE=$1 + AC_SUBST(PACKAGE)dnl + VERSION=$2 + AC_SUBST(VERSION)dnl ifelse([$3],, ! [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) ! AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])]) + # Autoconf 2.50 wants to disallow AM_ names. We explicitly allow + # the ones we care about. + ifdef([m4_pattern_allow], + [m4_pattern_allow([^AM_[A-Z]+FLAGS])])dnl + + # Autoconf 2.50 always computes EXEEXT. However we need to be + # compatible with 2.13, for now. So we always define EXEEXT, but we + # don't compute it. + AC_SUBST(EXEEXT) + # Similar for OBJEXT -- only we only use OBJEXT if the user actually + # requests that it be used. This is a bit dumb. + : ${OBJEXT=o} + AC_SUBST(OBJEXT) + + # Some tools Automake needs. + AC_REQUIRE([AM_SANITY_CHECK])dnl + AC_REQUIRE([AC_ARG_PROGRAM])dnl + AM_MISSING_PROG(ACLOCAL, aclocal) + AM_MISSING_PROG(AUTOCONF, autoconf) + AM_MISSING_PROG(AUTOMAKE, automake) + 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_DEP_TRACK])dnl + AC_REQUIRE([AM_SET_DEPDIR])dnl + 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 + ]) + # # Check to make sure that the build environment is sane. # + + # serial 3 ! # AM_SANITY_CHECK ! # --------------- ! 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 *************** *** 82,92 **** # directory). if ( ! set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null` ! if test "[$]*" = "X"; then # -L didn't work. ! set X `ls -t $srcdir/configure conftestfile` fi ! if test "[$]*" != "X $srcdir/configure conftestfile" \ ! && test "[$]*" != "X conftestfile $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen --- 188,199 ---- # 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 # If neither matched, then we have a broken ls. This can happen *************** *** 98,102 **** fi ! test "[$]2" = conftestfile ) then --- 205,209 ---- fi ! test "$[2]" = conftest.file ) then *************** *** 107,129 **** Check your system clock]) fi - rm -f conftest* AC_MSG_RESULT(yes)]) ! dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY) ! dnl The program must properly implement --version. ! AC_DEFUN(AM_MISSING_PROG, ! [AC_MSG_CHECKING(for working $2) ! # Run test in a subshell; some versions of sh will print an error if ! # an executable is not found, even if stderr is redirected. ! # Redirect stdin to placate older versions of autoconf. Sigh. ! if ($2 --version) < /dev/null > /dev/null 2>&1; then ! $1=$2 ! AC_MSG_RESULT(found) else ! $1="$3/missing $2" ! AC_MSG_RESULT(missing) fi ! AC_SUBST($1)]) # Add --enable-maintainer-mode option to configure. # From Jim Meyering --- 214,562 ---- Check your system clock]) fi AC_MSG_RESULT(yes)]) + + + # serial 2 ! # 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)]) ! ! ! # 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= ! am_backtick='`' ! AC_MSG_WARN([${am_backtick}missing' script is too old or missing]) fi ! ]) ! ! # AM_AUX_DIR_EXPAND ! ! # 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. ! ! AC_DEFUN([AM_AUX_DIR_EXPAND], [ ! # expand $ac_aux_dir to an absolute path ! am_aux_dir=`CDPATH=:; cd $ac_aux_dir && pwd` ! ]) ! ! # AM_PROG_INSTALL_SH ! # ------------------ ! # Define $install_sh. ! AC_DEFUN([AM_PROG_INSTALL_SH], ! [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl ! install_sh=${install_sh-"$am_aux_dir/install-sh"} ! AC_SUBST(install_sh)]) ! ! # One issue with vendor `install' (even GNU) is that you can't ! # specify the program used to strip binaries. This is especially ! # annoying in cross-compiling environments, where the build's strip ! # is unlikely to handle the host's binaries. ! # Fortunately install-sh will honor a STRIPPROG variable, so we ! # always use install-sh in `make install-strip', and initialize ! # STRIPPROG with the value of the STRIP variable (set by the user). ! AC_DEFUN([AM_PROG_INSTALL_STRIP], ! [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl ! INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" ! AC_SUBST([INSTALL_STRIP_PROGRAM])]) ! ! # serial 4 -*- Autoconf -*- ! ! ! ! # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be ! # written in clear, in which case automake, when reading aclocal.m4, ! # will think it sees a *use*, and therefore will trigger all it's ! # C support machinery. Also note that it means that autoscan, seeing ! # CC etc. in the Makefile, will ask for an AC_PROG_CC use... ! ! + # _AM_DEPENDENCIES(NAME) + # --------------------- + # See how the compiler implements dependency checking. + # NAME is "CC", "CXX" or "OBJC". + # We try a few techniques and use that to set a single cache variable. + # + # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was + # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular + # dependency, and given that the user is not expected to run this macro, + # just rely on AC_PROG_CC. + AC_DEFUN([_AM_DEPENDENCIES], + [AC_REQUIRE([AM_SET_DEPDIR])dnl + AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl + AC_REQUIRE([AM_MAKE_INCLUDE])dnl + AC_REQUIRE([AM_DEP_TRACK])dnl + + ifelse([$1], CC, [depcc="$CC" am_compiler_list=], + [$1], CXX, [depcc="$CXX" am_compiler_list=], + [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'] + [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], + [depcc="$$1" am_compiler_list=]) + + AC_CACHE_CHECK([dependency style of $depcc], + [am_cv_$1_dependencies_compiler_type], + [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + + 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 + # 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 + + case $depmode in + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + none) break ;; + esac + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # 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 conftest.c -o conftest.o >/dev/null 2>&1 && + grep conftest.h conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + am_cv_$1_dependencies_compiler_type=$depmode + break + fi + done + + cd .. + rm -rf conftest.dir + else + am_cv_$1_dependencies_compiler_type=none + fi + ]) + $1DEPMODE="depmode=$am_cv_$1_dependencies_compiler_type" + AC_SUBST([$1DEPMODE]) + ]) + + + # AM_SET_DEPDIR + # ------------- + # Choose a directory name for dependency files. + # This macro is AC_REQUIREd in _AM_DEPENDENCIES + AC_DEFUN([AM_SET_DEPDIR], + [rm -f .deps 2>/dev/null + mkdir .deps 2>/dev/null + if test -d .deps; then + DEPDIR=.deps + else + # MS-DOS does not allow filenames that begin with a dot. + DEPDIR=_deps + fi + rmdir .deps 2>/dev/null + AC_SUBST(DEPDIR) + ]) + + + # AM_DEP_TRACK + # ------------ + AC_DEFUN([AM_DEP_TRACK], + [AC_ARG_ENABLE(dependency-tracking, + [ --disable-dependency-tracking Speeds up one-time builds + --enable-dependency-tracking Do not reject slow dependency extractors]) + if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' + fi + AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) + pushdef([subst], defn([AC_SUBST])) + subst(AMDEPBACKSLASH) + popdef([subst]) + ]) + + # Generate code to set up dependency tracking. + # This macro should only be invoked once -- use via AC_REQUIRE. + # Usage: + # AM_OUTPUT_DEPENDENCY_COMMANDS + + # + # This code is only required when automatic dependency tracking + # is enabled. FIXME. This creates each `.P' file that we will + # need in order to bootstrap the dependency handling code. + AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],[ + AC_OUTPUT_COMMANDS([ + test x"$AMDEP_TRUE" != x"" || + for mf in $CONFIG_FILES; do + case "$mf" in + Makefile) dirpart=.;; + */Makefile) dirpart=`echo "$mf" | sed -e 's|/[^/]*$||'`;; + *) continue;; + esac + grep '^DEP_FILES *= *[^ #]' < "$mf" > /dev/null || continue + # Extract the definition of DEP_FILES from the Makefile without + # running `make'. + DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"` + test -z "$DEPDIR" && continue + # When using ansi2knr, U may be empty or an underscore; expand it + U=`sed -n -e '/^U = / s///p' < "$mf"` + test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR" + # We invoke sed twice because it is the simplest approach to + # changing $(DEPDIR) to its actual value in the expansion. + for file in `sed -n -e ' + /^DEP_FILES = .*\\\\$/ { + s/^DEP_FILES = // + :loop + s/\\\\$// + p + n + /\\\\$/ b loop + p + } + /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`echo "$file" | sed -e 's|/[^/]*$||'` + $ac_aux_dir/mkinstalldirs "$dirpart/$fdir" > /dev/null 2>&1 + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done + done + ], [AMDEP_TRUE="$AMDEP_TRUE" + ac_aux_dir="$ac_aux_dir"])]) + + # AM_MAKE_INCLUDE() + # ----------------- + # Check to see how make treats includes. + AC_DEFUN([AM_MAKE_INCLUDE], + [am_make=${MAKE-make} + cat > confinc << 'END' + doit: + @echo done + END + # If we don't find an include directive, just comment out the code. + AC_MSG_CHECKING([for style of include used by $am_make]) + am__include='#' + am__quote= + _am_result=none + # First try GNU make style include. + echo "include confinc" > confmf + # We grep out `Entering directory' and `Leaving directory' + # messages which can occur if `w' ends up in MAKEFLAGS. + # In particular we don't look at `^make:' because GNU make might + # be invoked under some other name (usually "gmake"), in which + # case it prints its new name instead of `make'. + if test "`$am_make -s -f confmf 2> /dev/null | fgrep -v 'ing directory'`" = "done"; then + am__include=include + am__quote= + _am_result=GNU + fi + # Now try BSD make style include. + if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then + am__include=.include + am__quote='"' + _am_result=BSD + fi + fi + AC_SUBST(am__include) + AC_SUBST(am__quote) + AC_MSG_RESULT($_am_result) + rm -f confinc confmf + ]) + + # serial 3 + + # AM_CONDITIONAL(NAME, SHELL-CONDITION) + # ------------------------------------- + # Define a conditional. + # + # FIXME: Once using 2.50, use this: + # m4_match([$1], [^TRUE\|FALSE$], [AC_FATAL([$0: invalid condition: $1])])dnl + AC_DEFUN([AM_CONDITIONAL], + [ifelse([$1], [TRUE], + [errprint(__file__:__line__: [$0: invalid condition: $1 + ])dnl + m4exit(1)])dnl + ifelse([$1], [FALSE], + [errprint(__file__:__line__: [$0: invalid condition: $1 + ])dnl + m4exit(1)])dnl + AC_SUBST([$1_TRUE]) + AC_SUBST([$1_FALSE]) + if $2; then + $1_TRUE= + $1_FALSE='#' + else + $1_TRUE='#' + $1_FALSE= + fi]) + # Add --enable-maintainer-mode option to configure. # From Jim Meyering *************** *** 131,135 **** # serial 1 ! AC_DEFUN(AM_MAINTAINER_MODE, [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) dnl maintainer-mode is disabled by default --- 564,568 ---- # serial 1 ! AC_DEFUN([AM_MAINTAINER_MODE], [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) dnl maintainer-mode is disabled by default *************** *** 139,144 **** USE_MAINTAINER_MODE=$enableval, USE_MAINTAINER_MODE=no) ! AC_MSG_RESULT($USE_MAINTAINER_MODE) ! AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes) MAINT=$MAINTAINER_MODE_TRUE AC_SUBST(MAINT)dnl --- 572,577 ---- USE_MAINTAINER_MODE=$enableval, USE_MAINTAINER_MODE=no) ! AC_MSG_RESULT([$USE_MAINTAINER_MODE]) ! AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes]) MAINT=$MAINTAINER_MODE_TRUE AC_SUBST(MAINT)dnl *************** *** 146,162 **** ) - # Define a conditional. - - AC_DEFUN(AM_CONDITIONAL, - [AC_SUBST($1_TRUE) - AC_SUBST($1_FALSE) - if $2; then - $1_TRUE= - $1_FALSE='#' - else - $1_TRUE='#' - $1_FALSE= - fi]) - # libtool.m4 - Configure libtool for the host system. -*-Shell-script-*- --- 579,582 ---- *************** *** 4233,4266 **** ! # serial 1 ! ! # The idea is to distribute rx.[hc] and regex.[hc] together, for a while. ! # The WITH_REGEX symbol (which should also be documented in acconfig.h) ! # is used to decide which of regex.h or rx.h should be included in the ! # application. If `./configure --with-regex' is given (the default), the ! # package will use gawk's regex. If `./configure --without-regex', a ! # check is made to see if rx is already installed, as with newer Linux'es. ! # If not found, the package will use the rx from the distribution. ! # If found, the package will use the system's rx which, on Linux at least, ! # will result in a smaller executable file. ! AC_DEFUN(AM_WITH_REGEX, ! [AC_MSG_CHECKING(which of GNU rx or gawk's regex is wanted) AC_ARG_WITH(regex, [ --without-regex use GNU rx in lieu of gawk's regex for matching], ! [test "$withval" = yes && am_with_regex=1], ! [am_with_regex=1]) if test -n "$am_with_regex"; then AC_MSG_RESULT(regex) ! AC_DEFINE(WITH_REGEX,1,[Define if using GNU regex]) AC_CACHE_CHECK([for GNU regex in libc], am_cv_gnu_regex, ! AC_TRY_LINK([], [extern int re_max_failures; re_max_failures = 1], ! am_cv_gnu_regex=yes, am_cv_gnu_regex=no)) if test $am_cv_gnu_regex = no; then ! LIBOBJS="$LIBOBJS regex.o" fi else AC_MSG_RESULT(rx) ! AC_CHECK_FUNC(re_rx_search, , [LIBOBJS="$LIBOBJS rx.o"]) fi AC_SUBST(LIBOBJS)dnl --- 4653,4695 ---- ! # serial 2 ! # AM_WITH_REGEX ! # ------------- ! # ! # The idea is to distribute rx.[hc] and regex.[hc] together, for a ! # while. The WITH_REGEX symbol is used to decide which of regex.h or ! # rx.h should be included in the application. If `./configure ! # --with-regex' is given (the default), the package will use gawk's ! # regex. If `./configure --without-regex', a check is made to see if ! # rx is already installed, as with newer Linux'es. If not found, the ! # package will use the rx from the distribution. If found, the ! # package will use the system's rx which, on Linux at least, will ! # result in a smaller executable file. ! # ! # FIXME: This macro seems quite obsolete now since rx doesn't seem to ! # be maintained, while regex is. ! AC_DEFUN([AM_WITH_REGEX], ! [ifdef([AC_LIBSOURCES], ! [AC_LIBSOURCES([rx.h, rx.c, regex.c, regex.h])])dnl ! AC_MSG_CHECKING([which of GNU rx or gawk's regex is wanted]) AC_ARG_WITH(regex, [ --without-regex use GNU rx in lieu of gawk's regex for matching], ! [test "$withval" = yes && am_with_regex=1], ! [am_with_regex=1]) if test -n "$am_with_regex"; then AC_MSG_RESULT(regex) ! AC_DEFINE(WITH_REGEX, 1, [Define if using GNU regex]) AC_CACHE_CHECK([for GNU regex in libc], am_cv_gnu_regex, ! [AC_TRY_LINK([], ! [extern int re_max_failures; re_max_failures = 1], ! [am_cv_gnu_regex=yes], ! [am_cv_gnu_regex=no])]) if test $am_cv_gnu_regex = no; then ! LIBOBJS="$LIBOBJS regex.$ac_objext" fi else AC_MSG_RESULT(rx) ! AC_CHECK_FUNC(re_rx_search, , [LIBOBJS="$LIBOBJS rx.$ac_objext"]) fi AC_SUBST(LIBOBJS)dnl Index: configure.ac =================================================================== RCS file: /cvsroot/srvx/services/configure.ac,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -r1.11 -r1.12 *** configure.ac 2001/09/29 04:17:37 1.11 --- configure.ac 2001/10/02 16:32:07 1.12 *************** *** 86,90 **** dnl Would rather not bail on headers, BSD has alot of the functions elsewhere. -Jedi ! AC_CHECK_HEADERS(arpa/inet.h ctype.h errno.h fcntl.h malloc.h math.h netdb.h netinet/in.h pthread.h setjmp.h signal.h stdarg.h stdio.h stdlib.h sys/resource.h sys/timeb.h sys/times.h sys/select.h string.h sys/param.h sys/poll.h sys/socket.h sys/time.h sys/types.h time.h unistd.h getopt.h memory.h regex.h alloca.h dlfcn.h,,) dnl portability stuff, hurray! -Jedi --- 86,90 ---- dnl Would rather not bail on headers, BSD has alot of the functions elsewhere. -Jedi ! AC_CHECK_HEADERS(arpa/inet.h fcntl.h malloc.h netdb.h netinet/in.h pthread.h sys/resource.h sys/timeb.h sys/times.h sys/select.h sys/param.h sys/poll.h sys/socket.h sys/time.h sys/types.h unistd.h getopt.h memory.h regex.h alloca.h dlfcn.h,,) dnl portability stuff, hurray! -Jedi |
Update of /cvsroot/srvx/services/src In directory usw-pr-cvs1:/tmp/cvs-serv20453/src Modified Files: Makefile.am common.h conf.c config.h.in dict-hash.c dict-splay.c dict.h gline.c gline.h hash.c hash.h heap.c log.c log.h main.c md5.c mod_common.c proto.c proto.h proto_bahamut.c proto_ircu_p10.c recdb.c rules.c saxdb.c sockcheck.c timeq.c timeq.h uplink.h Removed Files: md5.h Log Message: squash various lclint warnings Index: Makefile.am =================================================================== RCS file: /cvsroot/srvx/services/src/Makefile.am,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -r1.40 -r1.41 *** Makefile.am 2001/09/28 15:21:29 1.40 --- Makefile.am 2001/10/02 16:04:36 1.41 *************** *** 8,12 **** srvx_LDFLAGS = $(export_dynamic_flag_spec) srvx_SOURCES = \ - alias.c alias.h \ compat.c compat.h \ conf.c conf.h \ --- 8,11 ---- *************** *** 19,23 **** log.c log.h \ main.c messages.h common.h \ ! md5.c md5.h \ modules.c modules.h \ policer.c policer.h \ --- 18,22 ---- log.c log.h \ main.c messages.h common.h \ ! md5.c \ modules.c modules.h \ policer.c policer.h \ *************** *** 48,49 **** --- 47,53 ---- globtest_SOURCES = tools.c globtest.c common.h globtest_CFLAGS = -DGLOBTEST + + LINT = lclint + LINTOPTS = +showscan +posixlib -boolops -predboolint -noeffect + lint: + $(LINT) $(LINTOPTS) compat.c conf.c dict-splay.c getopt.c getopt1.c gline.c hash.c heap.c log.c main.c md5.c mod_common.c modules.c policer.c proto.c proto_bahamut.c recdb.c rules.c saxdb.c service.c timeq.c Index: common.h =================================================================== RCS file: /cvsroot/srvx/services/src/common.h,v retrieving revision 1.68 retrieving revision 1.69 diff -C2 -r1.68 -r1.69 *** common.h 2001/09/27 21:58:07 1.68 --- common.h 2001/10/02 16:04:36 1.69 *************** *** 51,54 **** --- 51,60 ---- #endif + #ifdef __GNUC__ + #define PRINTF_LIKE(M,N) __attribute__((format (printf, M, N))) + #else + #define PRINTF_LIKE(M,N) + #endif + #define SOCKCHECK_USABLE (defined(HAVE_POLL) && defined(HAVE_PTHREAD) && !defined(__CYGWIN__)) *************** *** 65,69 **** #define ArrayLength(x) (sizeof(x)/sizeof(x[0])) ! #define safestrncpy(dest, src, len) do { char *d = (dest); unsigned int l = (len); strncpy(d, (src), l); d[l-1] = 0; } while (0) #if WITH_DMALLOC --- 71,75 ---- #define ArrayLength(x) (sizeof(x)/sizeof(x[0])) ! #define safestrncpy(dest, src, len) do { unsigned char *d = (dest); size_t l = (len); strncpy(d, (src), l); d[l-1] = '\0'; } while (0) #if WITH_DMALLOC *************** *** 73,96 **** #endif - extern time_t now; - - struct userNode *AddService(const char *nick, const char *desc); - struct userNode *AddClone(const char *nick, const char *username, const char *hostname, const char *desc); - - int read_from_socket(void); - void close_socket(void); - - typedef void (*exit_func_t)(void); - void reg_exit_func(exit_func_t handler); - void call_exit_funcs(void); - - typedef void (*db_write_func_t)(void); - void reg_db_write_func(db_write_func_t handler); - void write_databases(void); - - #define MD5_CRYPT_LENGTH 33 - const char *cryptpass(const char *pass, char buffer[MD5_CRYPT_LENGTH]); - int checkpass(const char *pass, const char *crypt); - #define DECLARE_LIST(STRUCTNAME,ITEMTYPE) struct STRUCTNAME {\ unsigned int used, size;\ --- 79,82 ---- *************** *** 130,133 **** --- 116,133 ---- free(list->list);\ } + + extern time_t now; + + typedef void (*exit_func_t)(void); + void reg_exit_func(exit_func_t handler); + void call_exit_funcs(void); + + typedef void (*db_write_func_t)(void); + void reg_db_write_func(db_write_func_t handler); + void write_databases(void); + + #define MD5_CRYPT_LENGTH 33 + const char *cryptpass(const char *pass, char buffer[]); + int checkpass(const char *pass, const char *crypt); #endif /* ifdef _COMMON_H_ */ Index: conf.c =================================================================== RCS file: /cvsroot/srvx/services/src/conf.c,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -r1.22 -r1.23 *** conf.c 2001/08/01 22:14:35 1.22 --- conf.c 2001/10/02 16:04:36 1.23 *************** *** 20,32 **** #include "config.h" ! #ifdef HAVE_ERRNO_H #include <errno.h> - #endif - #ifdef HAVE_STDIO_H #include <stdio.h> - #endif - #ifdef HAVE_STDLIB_H #include <stdlib.h> - #endif #include "common.h" --- 20,27 ---- #include "config.h" ! #include <assert.h> #include <errno.h> #include <stdio.h> #include <stdlib.h> #include "common.h" *************** *** 39,44 **** static dict_t conf_db; static dict_t conf_server; static conf_reload_func *reload_funcs; ! static int num_rfs, size_rfs; void --- 34,40 ---- static dict_t conf_db; static dict_t conf_server; + static conf_reload_func *reload_funcs; ! static size_t num_rfs, size_rfs; void *************** *** 46,51 **** { if (num_rfs >= size_rfs) { ! size_rfs <<= 1; ! reload_funcs = realloc(reload_funcs, size_rfs*sizeof(conf_reload_func)); } reload_funcs[num_rfs++] = crf; --- 42,54 ---- { if (num_rfs >= size_rfs) { ! if (!reload_funcs) { ! size_rfs = 8; ! reload_funcs = calloc(size_rfs, sizeof(conf_reload_func)); ! assert(reload_funcs != NULL); ! } else { ! size_rfs <<= 1; ! reload_funcs = realloc(reload_funcs, size_rfs*sizeof(conf_reload_func)); ! assert(reload_funcs != NULL); ! } } reload_funcs[num_rfs++] = crf; *************** *** 55,59 **** conf_call_reload_funcs(void) { ! int i; for (i=0; i<num_rfs; i++) reload_funcs[i](); } --- 58,62 ---- conf_call_reload_funcs(void) { ! size_t i; for (i=0; i<num_rfs; i++) reload_funcs[i](); } *************** *** 62,88 **** conf_read(const char *conf_file_name) { ! dict_t old_conf = conf_db; ! if (!(conf_db = parse_database(conf_file_name))) { ! goto fail; ! } ! if (!(conf_server = database_get_data(conf_db, "server", RECDB_OBJECT))) { ! log(MAIN_LOG, LOG_ERROR, "No server section found in config file.\n"); ! goto fail; ! } ! if (!reload_funcs) { ! size_rfs = 5; ! reload_funcs = malloc(size_rfs*sizeof(conf_reload_func)); ! num_rfs = 0; ! } else { ! conf_call_reload_funcs(); } ! if (old_conf && old_conf != conf_db) free_database(old_conf); return 1; - - fail: - log(MAIN_LOG, LOG_ERROR, "Reverting to previous configuration.\n"); - if (conf_db) free_database(conf_db); - conf_db = old_conf; - return 0; } --- 65,79 ---- conf_read(const char *conf_file_name) { ! dict_t new_conf; ! ! if (!(new_conf = parse_database(conf_file_name)) ! || !(conf_server = database_get_data(new_conf, "server", RECDB_OBJECT))) { ! log(MAIN_LOG, LOG_ERROR, "Reverting to previous configuration\n"); ! return 0; } ! free_database(conf_db); ! conf_db = new_conf; ! conf_call_reload_funcs(); return 1; } *************** *** 93,98 **** free_database(conf_db); conf_db = NULL; } - if (reload_funcs) free(reload_funcs); } --- 84,92 ---- free_database(conf_db); conf_db = NULL; + } + if (reload_funcs) { + free(reload_funcs); + reload_funcs = NULL; } } *************** *** 127,131 **** int conf_server_ping_freq(void) { ! const char *text = database_get_data(conf_server, "ping_freq", RECDB_QSTRING); return text ? (signed)ParseInterval(text) : -1; } --- 121,125 ---- int conf_server_ping_freq(void) { ! const unsigned char *text = database_get_data(conf_server, "ping_freq", RECDB_QSTRING); return text ? (signed)ParseInterval(text) : -1; } *************** *** 133,137 **** int conf_server_ping_timeout(void) { ! const char *text = database_get_data(conf_server, "ping_timeout", RECDB_QSTRING); return text ? (signed)ParseInterval(text) : -1; } --- 127,131 ---- int conf_server_ping_timeout(void) { ! const unsigned char *text = database_get_data(conf_server, "ping_timeout", RECDB_QSTRING); return text ? (signed)ParseInterval(text) : -1; } Index: config.h.in =================================================================== RCS file: /cvsroot/srvx/services/src/config.h.in,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -r1.26 -r1.27 *** config.h.in 2001/09/28 15:18:20 1.26 --- config.h.in 2001/10/02 16:04:36 1.27 *************** *** 292,295 **** --- 292,298 ---- #undef HAVE_SYS_RESOURCE_H + /* Define if you have the <sys/select.h> header file. */ + #undef HAVE_SYS_SELECT_H + /* Define if you have the <sys/socket.h> header file. */ #undef HAVE_SYS_SOCKET_H Index: dict-hash.c =================================================================== RCS file: /cvsroot/srvx/services/src/dict-hash.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** dict-hash.c 2001/07/18 02:03:02 1.3 --- dict-hash.c 2001/10/02 16:04:36 1.4 *************** *** 38,42 **** struct dict { struct dict_node **table; ! unsigned int used, size; free_f free_keys, free_data; }; --- 38,42 ---- struct dict { struct dict_node **table; ! size_t used, size; free_f free_keys, free_data; }; *************** *** 51,57 **** unsigned int accum; for (i=0; i<256; i++) { ! accum = tolower(i) << 24; for (j=0; j<8; j++) { ! if (accum & 0x8000000) { accum = (accum << 1) ^ POLYNOMIAL; } else { --- 51,57 ---- unsigned int accum; for (i=0; i<256; i++) { ! accum = ((unsigned int)tolower(i)) << 24; for (j=0; j<8; j++) { ! if ((accum & 0x8000000) != 0) { accum = (accum << 1) ^ POLYNOMIAL; } else { *************** *** 66,70 **** dict_hash(dict_t dict, const unsigned char *string) { ! int accum = 0; while (*string) { accum = (accum << 8) ^ crc_table[((accum >> 24) ^ *string++) & 0xFF]; --- 66,70 ---- dict_hash(dict_t dict, const unsigned char *string) { ! unsigned int accum = 0; while (*string) { accum = (accum << 8) ^ crc_table[((accum >> 24) ^ *string++) & 0xFF]; *************** *** 78,96 **** static int crc_init; dict_t dict; ! if (!crc_init) { gen_crc_table(); crc_init = 1; } dict = malloc(sizeof(struct dict)); dict->used = 0; dict->size = 8; - dict->table = malloc(dict->size*sizeof(dict->table[0])); - memset(dict->table, 0, dict->size*sizeof(dict->table[0])); dict->free_keys = NULL; dict->free_data = NULL; return dict; } ! unsigned int dict_size(dict_t dict) { --- 78,100 ---- static int crc_init; dict_t dict; ! if (crc_init == 0) { gen_crc_table(); crc_init = 1; } dict = malloc(sizeof(struct dict)); + if (!dict) return NULL; dict->used = 0; dict->size = 8; dict->free_keys = NULL; dict->free_data = NULL; + dict->table = calloc(dict->size, sizeof(dict->table[0])); + if (!dict->table) { + free(dict); + return NULL; + } return dict; } ! size_t dict_size(dict_t dict) { *************** *** 113,117 **** dict_foreach(dict_t dict, dict_iterator_f it, void *extra) { ! unsigned int i; struct dict_node *node; --- 117,121 ---- dict_foreach(dict_t dict, dict_iterator_f it, void *extra) { ! size_t i; struct dict_node *node; *************** *** 132,137 **** old_size = dict->size; dict->size <<= 1; ! new_table = malloc(dict->size*sizeof(new_table[0])); ! memset(new_table, 0, dict->size*sizeof(new_table[0])); for (i=0; i<old_size; i++) { for (node=dict->table[i]; node; node=next) { --- 136,140 ---- old_size = dict->size; dict->size <<= 1; ! new_table = calloc(dict->size, sizeof(new_table[0])); for (i=0; i<old_size; i++) { for (node=dict->table[i]; node; node=next) { Index: dict-splay.c =================================================================== RCS file: /cvsroot/srvx/services/src/dict-splay.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** dict-splay.c 2001/07/15 14:49:25 1.2 --- dict-splay.c 2001/10/02 16:04:36 1.3 *************** *** 20,23 **** --- 20,24 ---- #include "config.h" + #include <assert.h> #include <stdlib.h> #include <string.h> *************** *** 36,40 **** free_f free_keys, free_data; struct dict_node *root; ! unsigned int count; }; --- 37,41 ---- free_f free_keys, free_data; struct dict_node *root; ! size_t count; }; *************** *** 45,54 **** dict_new(void) { ! dict_t dict; ! dict = malloc(sizeof(struct dict)); ! dict->free_keys = NULL; ! dict->free_data = NULL; ! dict->root = NULL; ! dict->count = 0; return dict; } --- 46,51 ---- dict_new(void) { ! dict_t dict = calloc(1, sizeof(*dict)); ! assert(dict != NULL); return dict; } *************** *** 57,61 **** * Return number of entries in the dictionary. */ ! unsigned int dict_size(dict_t dict) { --- 54,58 ---- * Return number of entries in the dictionary. */ ! size_t dict_size(dict_t dict) { *************** *** 94,101 **** { struct dict_node *halter; ! if (!node) return NULL; ! if ((halter = dict_foreach_subtree(node->l, it, extra))) goto out; if (it(node->key, node->data, extra)) { halter = node; goto out; } ! halter = dict_foreach_subtree(node->r, it, extra); out: return halter; --- 91,97 ---- { struct dict_node *halter; ! if (node->l && (halter = dict_foreach_subtree(node->l, it, extra))) goto out; if (it(node->key, node->data, extra)) { halter = node; goto out; } ! halter = node->r ? dict_foreach_subtree(node->r, it, extra) : NULL; out: return halter; *************** *** 113,117 **** { struct dict_node *halter; ! halter = dict_foreach_subtree(dict->root, it, extra); return halter ? halter->key : NULL; } --- 109,113 ---- { struct dict_node *halter; ! halter = dict->root ? dict_foreach_subtree(dict->root, it, extra) : NULL; return halter ? halter->key : NULL; } *************** *** 126,132 **** { struct dict_node N, *l, *r, *y; ! if (!node) return NULL; N.l = N.r = NULL; l = r = &N; while (1) { --- 122,129 ---- { struct dict_node N, *l, *r, *y; ! N.l = N.r = NULL; l = r = &N; + assert(node != NULL); while (1) { *************** *** 174,177 **** --- 171,176 ---- dict_dispose_node(struct dict_node *node, free_f free_keys, free_f free_data) { + if (node->l) dict_dispose_node(node->l, free_keys, free_data); + if (node->r) dict_dispose_node(node->r, free_keys, free_data); if (free_keys && node->key) free_keys((void*)node->key); if (free_data && node->data) free_data(node->data); *************** *** 187,193 **** dict_insert(dict_t dict, const char *key, void *data) { ! struct dict_node *new_node; ! if (!key) return; ! new_node = malloc(sizeof(struct dict_node)); new_node->key = key; new_node->data = data; --- 186,198 ---- dict_insert(dict_t dict, const char *key, void *data) { ! struct dict_node *new_node = NULL; ! if (!key || !(new_node = malloc(sizeof(*new_node)))) { ! if (dict->free_keys) dict->free_keys((void*)key); ! if (dict->free_data) dict->free_data(data); ! if (new_node) free(new_node); ! return; ! } ! new_node->l = NULL; ! new_node->r = NULL; new_node->key = key; new_node->data = data; *************** *** 216,220 **** } } else { - new_node->l = new_node->r = NULL; dict->root = new_node; } --- 221,224 ---- *************** *** 223,231 **** /* ! * Remove an entry from the dictionary. ! * Return non-zero if it was found, or zero if the key was not in the ! * dictionary. */ ! int dict_remove2(dict_t dict, const char *key, int no_dispose) { --- 227,233 ---- /* ! * Remove an entry from the dictionary (if found). */ ! void dict_remove2(dict_t dict, const char *key, int no_dispose) { *************** *** 242,252 **** free(dict->root); } else { dict_dispose_node(dict->root, dict->free_keys, dict->free_data); } dict->root = new_root; dict->count--; - return 1; } - return 0; } --- 244,254 ---- free(dict->root); } else { + dict->root->r = NULL; + dict->root->l = NULL; dict_dispose_node(dict->root, dict->free_keys, dict->free_data); } dict->root = new_root; dict->count--; } } *************** *** 272,287 **** /* - * Delete a subtree. - */ - static void - delete_subtree(struct dict_node *tree, free_f free_keys, free_f free_data) - { - if (!tree) return; - if (tree->l) delete_subtree(tree->l, free_keys, free_data); - if (tree->r) delete_subtree(tree->r, free_keys, free_data); - dict_dispose_node(tree, free_keys, free_data); - } - - /* * Delete an entire dictionary. */ --- 274,277 ---- *************** *** 289,298 **** dict_delete(dict_t dict) { ! delete_subtree(dict->root, dict->free_keys, dict->free_data); free(dict); } struct dict_sanity_struct { ! unsigned int node_count; struct dict_node *bad_node; char error[128]; --- 279,288 ---- dict_delete(dict_t dict) { ! if (dict->root) dict_dispose_node(dict->root, dict->free_keys, dict->free_data); free(dict); } struct dict_sanity_struct { ! size_t node_count; struct dict_node *bad_node; char error[128]; Index: dict.h =================================================================== RCS file: /cvsroot/srvx/services/src/dict.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** dict.h 2001/03/30 21:20:10 1.6 --- dict.h 2001/10/02 16:04:36 1.7 *************** *** 34,42 **** void dict_set_free_keys(dict_t dict, free_f free_keys); void dict_set_free_data(dict_t dict, free_f free_data); ! unsigned int dict_size(dict_t dict); /* if present!=NULL, then *present=1 iff node was found (if node is * not found, return value is NULL, which may be a valid datum) */ void* dict_find(dict_t dict, const char *key, int *present); ! int dict_remove2(dict_t dict, const char *key, int no_dispose); #define dict_remove(DICT, KEY) dict_remove2(DICT, KEY, 0) char *dict_sanity_check(dict_t dict); --- 34,42 ---- void dict_set_free_keys(dict_t dict, free_f free_keys); void dict_set_free_data(dict_t dict, free_f free_data); ! size_t dict_size(dict_t dict); /* if present!=NULL, then *present=1 iff node was found (if node is * not found, return value is NULL, which may be a valid datum) */ void* dict_find(dict_t dict, const char *key, int *present); ! void dict_remove2(dict_t dict, const char *key, int no_dispose); #define dict_remove(DICT, KEY) dict_remove2(DICT, KEY, 0) char *dict_sanity_check(dict_t dict); Index: gline.c =================================================================== RCS file: /cvsroot/srvx/services/src/gline.c,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -r1.17 -r1.18 *** gline.c 2001/09/27 21:58:07 1.17 --- gline.c 2001/10/02 16:04:36 1.18 *************** *** 20,23 **** --- 20,24 ---- #include "config.h" + #include <assert.h> #include <errno.h> #include <stdlib.h> *************** *** 56,60 **** { const struct gline *ga=a, *gb=b; ! return ga->expires - gb->expires; } --- 57,61 ---- { const struct gline *ga=a, *gb=b; ! return (int)(ga->expires - gb->expires); } *************** *** 63,66 **** --- 64,68 ---- { dict_remove(gline_dict, ent->target); + free(ent->issuer); free(ent->target); free(ent->reason); *************** *** 93,98 **** (void)data; ! pthread_mutex_lock(&gline_mutex); ! while (heap_size(gline_heap)) { heap_peek(gline_heap, &argh, &wraa); if (argh <= now) { --- 95,100 ---- (void)data; ! (void)pthread_mutex_lock(&gline_mutex); ! while (heap_size(gline_heap) > 0) { heap_peek(gline_heap, &argh, &wraa); if (argh <= now) { *************** *** 103,107 **** heap_peek(gline_heap, &argh, &wraa); if (wraa) timeq_add(argh, gline_expire, NULL); ! pthread_mutex_unlock(&gline_mutex); } --- 105,109 ---- heap_peek(gline_heap, &argh, &wraa); if (wraa) timeq_add(argh, gline_expire, NULL); ! (void)pthread_mutex_unlock(&gline_mutex); } *************** *** 109,117 **** gline_remove(const char *target, int announce) { ! pthread_mutex_lock(&gline_mutex); if (heap_remove_pred(gline_heap, delete_gline_for_p, (char*)target)) { void *argh; struct gline *new_first; ! heap_peek(gline_heap, 0, &argh); if (argh) { new_first = argh; --- 111,119 ---- gline_remove(const char *target, int announce) { ! (void)pthread_mutex_lock(&gline_mutex); if (heap_remove_pred(gline_heap, delete_gline_for_p, (char*)target)) { void *argh; struct gline *new_first; ! heap_peek(gline_heap, NULL, &argh); if (argh) { new_first = argh; *************** *** 120,124 **** } } ! pthread_mutex_unlock(&gline_mutex); if (announce) irc_ungline(target); } --- 122,126 ---- } } ! (void)pthread_mutex_unlock(&gline_mutex); if (announce) irc_ungline(target); } *************** *** 135,142 **** ent = dict_find(gline_dict, target, NULL); if (ent) { ! heap_remove_pred(gline_heap, gline_for_p, (char*)target); if (ent->expires < (time_t)(now + duration)) ent->expires = now + duration; } else { ent = malloc(sizeof(*ent)); ent->issuer = strdup(issuer); ent->target = strdup(target); --- 137,145 ---- ent = dict_find(gline_dict, target, NULL); if (ent) { ! (void)heap_remove_pred(gline_heap, gline_for_p, (char*)target); if (ent->expires < (time_t)(now + duration)) ent->expires = now + duration; } else { ent = malloc(sizeof(*ent)); + assert(ent != NULL); ent->issuer = strdup(issuer); ent->target = strdup(target); *************** *** 156,162 **** gline_add(const char *issuer, const char *target, unsigned long duration, const char *reason, int announce) { ! pthread_mutex_lock(&gline_mutex); gline_add_int(issuer, target, duration, reason, announce); ! pthread_mutex_unlock(&gline_mutex); } --- 159,165 ---- gline_add(const char *issuer, const char *target, unsigned long duration, const char *reason, int announce) { ! (void)pthread_mutex_lock(&gline_mutex); gline_add_int(issuer, target, duration, reason, announce); ! (void)pthread_mutex_unlock(&gline_mutex); } *************** *** 173,182 **** gline_refresh_all(void) { ! pthread_mutex_lock(&gline_mutex); ! heap_remove_pred(gline_heap, gline_refresh_helper, 0); ! pthread_mutex_unlock(&gline_mutex); } ! unsigned int gline_count(void) { --- 176,185 ---- gline_refresh_all(void) { ! (void)pthread_mutex_lock(&gline_mutex); ! (void)heap_remove_pred(gline_heap, gline_refresh_helper, 0); ! (void)pthread_mutex_unlock(&gline_mutex); } ! size_t gline_count(void) { *************** *** 216,220 **** dict_t db; if ((db = parse_database(GLINE_DB_NAME))) { ! dict_foreach(db, gline_add_record, 0); } } --- 219,224 ---- dict_t db; if ((db = parse_database(GLINE_DB_NAME))) { ! (void)dict_foreach(db, gline_add_record, 0); ! free_database(db); } } *************** *** 240,247 **** FILE *dbfile; dict_t db = alloc_database(); ! heap_remove_pred(gline_heap, gline_insert_entry, db); dbfile = fopen(TEMP_DB_NAME, "w"); write_database(dbfile, db); ! fclose(dbfile); if (rename(TEMP_DB_NAME, GLINE_DB_NAME) == -1) { log(MAIN_LOG, LOG_ERROR, "unable to rename new gline db to old: %s\n", strerror(errno)); --- 244,252 ---- FILE *dbfile; dict_t db = alloc_database(); ! (void)heap_remove_pred(gline_heap, gline_insert_entry, db); dbfile = fopen(TEMP_DB_NAME, "w"); + assert(dbfile != NULL); write_database(dbfile, db); ! (void)fclose(dbfile); if (rename(TEMP_DB_NAME, GLINE_DB_NAME) == -1) { log(MAIN_LOG, LOG_ERROR, "unable to rename new gline db to old: %s\n", strerror(errno)); *************** *** 259,263 **** gline_init(void) { ! pthread_mutex_lock(&gline_mutex); gline_heap = heap_new(gline_comparator); gline_dict = dict_new(); --- 264,268 ---- gline_init(void) { ! (void)pthread_mutex_lock(&gline_mutex); gline_heap = heap_new(gline_comparator); gline_dict = dict_new(); *************** *** 265,269 **** reg_exit_func(gline_db_cleanup); reg_db_write_func(gline_db_write); ! pthread_mutex_unlock(&gline_mutex); } --- 270,274 ---- reg_exit_func(gline_db_cleanup); reg_db_write_func(gline_db_write); ! (void)pthread_mutex_unlock(&gline_mutex); } *************** *** 279,284 **** } ! discrim = malloc(sizeof(*discrim)); ! memset(discrim, 0, sizeof(*discrim)); discrim->limit = 50; --- 284,289 ---- } ! discrim = calloc(1, sizeof(*discrim)); ! assert(discrim != NULL); discrim->limit = 50; *************** *** 350,356 **** search.data = data; search.hits = 0; ! pthread_mutex_lock(&gline_mutex); ! heap_remove_pred(gline_heap, gline_search_helper, &search); ! pthread_mutex_unlock(&gline_mutex); return search.hits; } --- 355,361 ---- search.data = data; search.hits = 0; ! (void)pthread_mutex_lock(&gline_mutex); ! (void)heap_remove_pred(gline_heap, gline_search_helper, &search); ! (void)pthread_mutex_unlock(&gline_mutex); return search.hits; } Index: gline.h =================================================================== RCS file: /cvsroot/srvx/services/src/gline.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** gline.h 2001/08/19 03:06:09 1.8 --- gline.h 2001/10/02 16:04:36 1.9 *************** *** 44,47 **** --- 44,49 ---- unsigned int gline_count(void); + struct userNode; + typedef void (*gline_search_func)(struct gline *gline, void *extra); struct gline_discrim *gline_discrim_create(struct userNode *user, struct userNode *src, unsigned int argc, unsigned char *argv[]); Index: hash.c =================================================================== RCS file: /cvsroot/srvx/services/src/hash.c,v retrieving revision 1.146 retrieving revision 1.147 diff -C2 -r1.146 -r1.147 *** hash.c 2001/09/28 15:21:29 1.146 --- hash.c 2001/10/02 16:04:36 1.147 *************** *** 20,44 **** #include "config.h" ! #ifdef HAVE_STDIO_H #include <stdio.h> - #endif - #ifdef HAVE_STDLIB_H #include <stdlib.h> - #endif - #ifdef HAVE_STRING_H #include <string.h> - #endif - #ifdef HAVE_CTYPE_H #include <ctype.h> - #endif - #ifdef HAVE_TIME_H #include <time.h> - #endif - #include "chanserv.h" #include "common.h" #include "conf.h" #include "dict.h" - #include "global.h" #include "hash.h" #include "log.h" --- 20,33 ---- #include "config.h" ! #include <assert.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <ctype.h> #include <time.h> #include "common.h" #include "conf.h" #include "dict.h" #include "hash.h" #include "log.h" *************** *** 59,74 **** void ! init_structs(void) { /* Initialize data structures */ channels = dict_new(); dict_set_free_data(channels, channel_free); clients = dict_new(); dict_set_free_data(clients, client_free); servers = dict_new(); dict_set_free_data(servers, free); userList_init(&curr_opers); /* Register modules, callbacks, etc. */ hash_module = module_register("hash", HASH_VERSION, NULL, NULL); note_register_target("struct userNode"); note_register_target("struct chanNode"); --- 48,67 ---- void ! hash_init(void) { /* Initialize data structures */ channels = dict_new(); + assert(channels != NULL); dict_set_free_data(channels, channel_free); clients = dict_new(); + assert(clients != NULL); dict_set_free_data(clients, client_free); servers = dict_new(); + assert(servers != NULL); dict_set_free_data(servers, free); userList_init(&curr_opers); /* Register modules, callbacks, etc. */ hash_module = module_register("hash", HASH_VERSION, NULL, NULL); + assert(hash_module != NULL); note_register_target("struct userNode"); note_register_target("struct chanNode"); *************** *** 79,83 **** static server_link_func_t *ns_list; ! static unsigned int ns_size, ns_used; void --- 72,76 ---- static server_link_func_t *ns_list; ! static size_t ns_size, ns_used; void *************** *** 85,89 **** { if (ns_used == ns_size) { ! if (ns_size) { ns_size <<= 1; ns_list = realloc(ns_list, ns_size*sizeof(server_link_func_t)); --- 78,82 ---- { if (ns_used == ns_size) { ! if (ns_list) { ns_size <<= 1; ns_list = realloc(ns_list, ns_size*sizeof(server_link_func_t)); *************** *** 92,95 **** --- 85,89 ---- ns_list = malloc(ns_size*sizeof(server_link_func_t)); } + assert(ns_list != NULL); } ns_list[ns_used++] = handler; *************** *** 97,101 **** static server_link_func_t *slf_list; ! static unsigned int slf_size, slf_used; void --- 91,95 ---- static server_link_func_t *slf_list; ! static size_t slf_size, slf_used; void *************** *** 103,107 **** { if (slf_used == slf_size) { ! if (slf_size) { slf_size <<= 1; slf_list = realloc(slf_list, slf_size*sizeof(server_link_func_t)); --- 97,101 ---- { if (slf_used == slf_size) { ! if (slf_list) { slf_size <<= 1; slf_list = realloc(slf_list, slf_size*sizeof(server_link_func_t)); *************** *** 110,113 **** --- 104,108 ---- slf_list = malloc(slf_size*sizeof(server_link_func_t)); } + assert(slf_list != NULL); } slf_list[slf_used++] = handler; *************** *** 115,125 **** struct server * ! AddServer(struct server *uplink, const char *name, int hops, time_t boot, time_t link, const char *description) { struct server* sNode; ! unsigned int nn; ! sNode = malloc(sizeof(*sNode)); ! memset(sNode, 0, sizeof(*sNode)); sNode->uplink = uplink; safestrncpy(sNode->name, name, sizeof(sNode->name)); --- 110,120 ---- struct server * ! AddServer(struct server *uplink, const char *name, unsigned int hops, time_t boot, time_t link, const char *description) { struct server* sNode; ! size_t nn; ! sNode = calloc(1, sizeof(*sNode)); ! assert(sNode != NULL); sNode->uplink = uplink; safestrncpy(sNode->name, name, sizeof(sNode->name)); *************** *** 136,139 **** --- 131,135 ---- * We won't be in a burst quite yet. */ sNode->in_burst = 0; + self = sNode; } else if (!self->uplink) { /* This must be our uplink.. */ *************** *** 157,161 **** } ! if (hops && !self->uplink->in_burst) { for (nn=0; nn<slf_used; nn++) { slf_list[nn](sNode); --- 153,157 ---- } ! if (hops && self->uplink && !self->uplink->in_burst) { for (nn=0; nn<slf_used; nn++) { slf_list[nn](sNode); *************** *** 168,172 **** static del_server_func_t *dsf_list; ! static unsigned int dsf_used, dsf_size; void --- 164,168 ---- static del_server_func_t *dsf_list; ! static size_t dsf_used, dsf_size; void *************** *** 174,178 **** { if (dsf_used == dsf_size) { ! if (dsf_size) { dsf_size <<= 1; dsf_list = realloc(dsf_list, dsf_size*sizeof(del_server_func_t)); --- 170,174 ---- { if (dsf_used == dsf_size) { ! if (dsf_list) { dsf_size <<= 1; dsf_list = realloc(dsf_list, dsf_size*sizeof(del_server_func_t)); *************** *** 181,184 **** --- 177,181 ---- dsf_list = malloc(dsf_size*sizeof(del_server_func_t)); } + assert(dsf_list != NULL); } dsf_list[dsf_used++] = handler; *************** *** 187,191 **** void DelServer(struct server* serv, int announce, const char *message) { ! unsigned int i; /* If we receive an ERROR command before the SERVER --- 184,189 ---- void DelServer(struct server* serv, int announce, const char *message) { ! unsigned int n; ! size_t i; /* If we receive an ERROR command before the SERVER *************** *** 194,199 **** /* must recursively remove servers linked to this one first */ ! for (i=0; i<serv->children.used; i++) { ! DelServer(serv->children.list[i], 0, "Recursive server delete"); } --- 192,197 ---- /* must recursively remove servers linked to this one first */ ! for (n=0; n<serv->children.used; n++) { ! DelServer(serv->children.list[n], 0, "Recursive server delete"); } *************** *** 210,214 **** /* Take ourself out of our uplink's children list */ if (serv->uplink) { ! serverList_remove(&serv->uplink->children, serv); } --- 208,212 ---- /* Take ourself out of our uplink's children list */ if (serv->uplink) { ! (void)serverList_remove(&serv->uplink->children, serv); } *************** *** 237,241 **** static new_user_func_t *nuf_list; ! static unsigned int nuf_size = 0, nuf_used = 0; void --- 235,239 ---- static new_user_func_t *nuf_list; ! static size_t nuf_size = 0, nuf_used = 0; void *************** *** 243,247 **** { if (nuf_used == nuf_size) { ! if (nuf_size) { nuf_size <<= 1; nuf_list = realloc(nuf_list, nuf_size*sizeof(new_user_func_t)); --- 241,245 ---- { if (nuf_used == nuf_size) { ! if (nuf_list) { nuf_size <<= 1; nuf_list = realloc(nuf_list, nuf_size*sizeof(new_user_func_t)); *************** *** 250,253 **** --- 248,252 ---- nuf_list = malloc(nuf_size*sizeof(new_user_func_t)); } + assert(nuf_list != NULL); } nuf_list[nuf_used++] = handler; *************** *** 255,259 **** static del_user_func_t *duf_list; ! static unsigned int duf_size = 0, duf_used = 0; void --- 254,258 ---- static del_user_func_t *duf_list; ! static size_t duf_size = 0, duf_used = 0; void *************** *** 261,265 **** { if (duf_used == duf_size) { ! if (duf_size) { duf_size <<= 1; duf_list = realloc(duf_list, duf_size*sizeof(del_user_func_t)); --- 260,264 ---- { if (duf_used == duf_size) { ! if (duf_list) { duf_size <<= 1; duf_list = realloc(duf_list, duf_size*sizeof(del_user_func_t)); *************** *** 268,271 **** --- 267,271 ---- duf_list = malloc(duf_size*sizeof(del_user_func_t)); } + assert(duf_list != NULL); } duf_list[duf_used++] = handler; *************** *** 275,284 **** unreg_del_user_func(del_user_func_t handler) { ! unsigned int i; for (i=0; i<duf_used; i++) { if (duf_list[i] == handler) break; } if (i == duf_used) return; ! memmove(duf_list+i, duf_list+i+1, (duf_used-i-1)*sizeof(duf_list[0])); duf_used--; } --- 275,284 ---- unreg_del_user_func(del_user_func_t handler) { ! size_t i; for (i=0; i<duf_used; i++) { if (duf_list[i] == handler) break; } if (i == duf_used) return; ! for (; i<duf_used-1; i++) duf_list[i] = duf_list[i+1]; duf_used--; } *************** *** 288,292 **** { struct userNode *uNode; ! unsigned int n; if ((uNode = GetUser(nick))) { --- 288,292 ---- { struct userNode *uNode; ! size_t n; if ((uNode = GetUser(nick))) { *************** *** 301,314 **** /* create new usernode and set all values */ ! uNode = malloc(sizeof(*uNode)); safestrncpy(uNode->nick, nick, sizeof(uNode->nick)); safestrncpy(uNode->username, ident, sizeof(uNode->username)); safestrncpy(uNode->info, userinfo, sizeof(uNode->info)); safestrncpy(uNode->hostname, hostname, sizeof(uNode->hostname)); - uNode->timestamp=timestamp; modeList_init(&uNode->channels); ! uNode->uplink=uplink; uNode->uplink->clients++; - uNode->modes=0; mod_usermode(uNode, modes); --- 301,314 ---- /* create new usernode and set all values */ ! uNode = calloc(1, sizeof(*uNode)); ! assert(uNode != NULL); safestrncpy(uNode->nick, nick, sizeof(uNode->nick)); safestrncpy(uNode->username, ident, sizeof(uNode->username)); safestrncpy(uNode->info, userinfo, sizeof(uNode->info)); safestrncpy(uNode->hostname, hostname, sizeof(uNode->hostname)); modeList_init(&uNode->channels); ! uNode->timestamp = timestamp; ! uNode->uplink = uplink; uNode->uplink->clients++; mod_usermode(uNode, modes); *************** *** 330,337 **** struct userNode *user = data; unsigned int n; /* Call these in reverse order so ChanServ can update presence information before NickServ nukes the handle_info. */ ! for (n = duf_used; n > 0; ) duf_list[--n](user); user->uplink->clients--; --- 330,338 ---- struct userNode *user = data; unsigned int n; + size_t i; /* Call these in reverse order so ChanServ can update presence information before NickServ nukes the handle_info. */ ! for (i = duf_used; i > 0; ) duf_list[--i](user); user->uplink->clients--; *************** *** 376,381 **** if (mn->modes & MODE_CHANOP) modes[pos++] = 'o'; if (mn->modes & MODE_VOICE) modes[pos++] = 'v'; ! modes[pos] = 0; ! if (modes[1]) ChangeChannelModes(mn->channel, user, modes, user, user); } } --- 377,382 ---- if (mn->modes & MODE_CHANOP) modes[pos++] = 'o'; if (mn->modes & MODE_VOICE) modes[pos++] = 'v'; ! modes[pos] = '\0'; ! if (modes[1] != '\0') ChangeChannelModes(mn->channel, user, modes, user, user); } } *************** *** 404,409 **** } ! new_channel_func_t *ncf_list; ! unsigned int ncf_size, ncf_used; void --- 405,410 ---- } ! static new_channel_func_t *ncf_list; ! static size_t ncf_size, ncf_used; void *************** *** 411,415 **** { if (ncf_used == ncf_size) { ! if (ncf_size) { ncf_size <<= 1; ncf_list = realloc(ncf_list, ncf_size*sizeof(ncf_list[0])); --- 412,416 ---- { if (ncf_used == ncf_size) { ! if (ncf_list) { ncf_size <<= 1; ncf_list = realloc(ncf_list, ncf_size*sizeof(ncf_list[0])); *************** *** 418,421 **** --- 419,423 ---- ncf_list = malloc(ncf_size*sizeof(ncf_list[0])); } + assert(ncf_list != NULL); } ncf_list[ncf_used++] = handler; *************** *** 423,427 **** static join_func_t *jf_list; ! static unsigned int jf_size = 0, jf_used = 0; void --- 425,429 ---- static join_func_t *jf_list; ! static size_t jf_size = 0, jf_used = 0; void *************** *** 429,433 **** { if (jf_used == jf_size) { ! if (jf_size) { jf_size <<= 1; jf_list = realloc(jf_list, jf_size*sizeof(join_func_t)); --- 431,435 ---- { if (jf_used == jf_size) { ! if (jf_list) { jf_size <<= 1; jf_list = realloc(jf_list, jf_size*sizeof(join_func_t)); *************** *** 436,439 **** --- 438,442 ---- jf_list = malloc(jf_size*sizeof(join_func_t)); } + assert(jf_list != NULL); } jf_list[jf_used++] = handler; *************** *** 445,449 **** struct chanNode *cNode; int new; - unsigned int n; if (!IsChannelName(name)) { --- 448,451 ---- *************** *** 455,460 **** if (!cNode) { new = 1; ! cNode = malloc(sizeof(*cNode)); ! memset(cNode, 0, sizeof(*cNode)); safestrncpy(cNode->name, name, sizeof(cNode->name)); banList_init(&cNode->banlist); --- 457,462 ---- if (!cNode) { new = 1; ! cNode = calloc(1, sizeof(*cNode)); ! assert(cNode != NULL); safestrncpy(cNode->name, name, sizeof(cNode->name)); banList_init(&cNode->banlist); *************** *** 468,475 **** if (new || cNode->timestamp > time_) { if (key) { safestrncpy(cNode->key, key, sizeof(cNode->key)); } else { ! cNode->key[0] = 0; } cNode->limit = limit; --- 470,479 ---- if (new || cNode->timestamp > time_) { + unsigned int n; + if (key) { safestrncpy(cNode->key, key, sizeof(cNode->key)); } else { ! cNode->key[0] = '\0'; } cNode->limit = limit; *************** *** 490,493 **** --- 494,498 ---- if (new || !self->uplink || self->uplink->in_burst) { + size_t n; for (n=0; n<ncf_used; n++) { ncf_list[n](cNode); Index: hash.h =================================================================== RCS file: /cvsroot/srvx/services/src/hash.h,v retrieving revision 1.71 retrieving revision 1.72 diff -C2 -r1.71 -r1.72 *** hash.h 2001/09/27 21:58:07 1.71 --- hash.h 2001/10/02 16:04:36 1.72 *************** *** 173,177 **** void reg_server_link_func(server_link_func_t handler); ! struct server *AddServer(struct server *uplink, const char *name, int hops, time_t boot, time_t link, const char *description); typedef void (*del_server_func_t) (struct server *srv); void reg_del_server_func(del_server_func_t handler); --- 173,177 ---- void reg_server_link_func(server_link_func_t handler); ! struct server *AddServer(struct server *uplink, const char *name, unsigned int hops, time_t boot, time_t link, const char *description); typedef void (*del_server_func_t) (struct server *srv); void reg_del_server_func(del_server_func_t handler); *************** *** 182,185 **** --- 182,187 ---- void reg_new_user_func(new_user_func_t handler); struct userNode* AddUser(struct server *uplink, const char *nick, const char *ident, const char *hostname, const char *modes, const char *userinfo, time_t timestamp); + struct userNode *AddService(const char *nick, const char *desc); + struct userNode *AddClone(const char *nick, const char *username, const char *hostname, const char *desc); typedef void (*del_user_func_t) (struct userNode *user); void reg_del_user_func(del_user_func_t handler); *************** *** 229,233 **** #define IsLocal(USER) ((USER)->uplink == self) ! void init_structs(void); #endif --- 231,235 ---- #define IsLocal(USER) ((USER)->uplink == self) ! void hash_init(void); #endif Index: heap.c =================================================================== RCS file: /cvsroot/srvx/services/src/heap.c,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -r1.16 -r1.17 *** heap.c 2001/07/15 14:37:21 1.16 --- heap.c 2001/10/02 16:04:36 1.17 *************** *** 20,29 **** #include "config.h" ! #ifdef HAVE_STDLIB_H ! #include <stdlib.h> /* just for malloc, though, on BSD. */ ! #endif ! #ifdef HAVE_SYS_TIME_H ! #include <sys/time.h> ! #endif #include "common.h" #include "heap.h" --- 20,26 ---- #include "config.h" ! #include <assert.h> ! #include <stdlib.h> ! #include <time.h> #include "common.h" #include "heap.h" *************** *** 50,57 **** { heap_t heap = malloc(sizeof(struct heap)); heap->used = 0; heap->alloc = 8; ! heap->keys = malloc(heap->alloc*sizeof(heap->keys[0])); ! heap->data = malloc(heap->alloc*sizeof(heap->data[0])); return heap; } --- 47,57 ---- { heap_t heap = malloc(sizeof(struct heap)); + assert(heap != NULL); heap->used = 0; heap->alloc = 8; ! heap->keys = malloc(heap->alloc*sizeof(*heap->keys)); ! assert(heap->keys != NULL); ! heap->data = malloc(heap->alloc*sizeof(*heap->data)); ! assert(heap->data != NULL); return heap; } *************** *** 90,95 **** if (heap->used == heap->alloc) { heap->alloc <<= 1; ! heap->keys = realloc(heap->keys, heap->alloc*sizeof(heap->keys[0])); ! heap->data = realloc(heap->data, heap->alloc*sizeof(heap->data[0])); } heap->keys[heap->used] = key; --- 90,97 ---- if (heap->used == heap->alloc) { heap->alloc <<= 1; ! heap->keys = realloc(heap->keys, heap->alloc*sizeof(*heap->keys)); ! assert(heap->keys != NULL); ! heap->data = realloc(heap->data, heap->alloc*sizeof(*heap->data)); ! assert(heap->data != NULL); } heap->keys[heap->used] = key; *************** *** 115,119 **** */ static void ! heap_heapify_down(heap_t heap, int pos) { unsigned int child; --- 117,121 ---- */ static void ! heap_heapify_down(heap_t heap, unsigned int pos) { unsigned int child; *************** *** 173,179 **** */ int ! heap_remove_pred(heap_t heap, int (*pred)(time_t key, void *data, void *extra), void *extra) { ! unsigned int pos=0, rem_first=0; while (pos < heap->used) { if (pred(heap->keys[pos], heap->data[pos], extra)) { --- 175,182 ---- */ int ! heap_remove_pred(heap_t heap, int (*pred)(time_t key, void *data, /*@null@*/void *extra), void *extra) { ! unsigned int pos=0; ! int rem_first=0; while (pos < heap->used) { if (pred(heap->keys[pos], heap->data[pos], extra)) { Index: log.c =================================================================== RCS file: /cvsroot/srvx/services/src/log.c,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -r1.35 -r1.36 *** log.c 2001/09/27 21:58:07 1.35 --- log.c 2001/10/02 16:04:36 1.36 *************** *** 20,41 **** #include "config.h" ! #ifdef HAVE_ERRNO_H #include <errno.h> - #endif - #ifdef HAVE_STDARG_H #include <stdarg.h> - #endif - #ifdef HAVE_STDIO_H #include <stdio.h> - #endif - #ifdef HAVE_STDLIB_H #include <stdlib.h> - #endif - #ifdef HAVE_STRING_H #include <string.h> - #endif - #ifdef HAVE_TIME_H #include <time.h> - #endif #include "common.h" --- 20,30 ---- #include "config.h" ! #include <assert.h> #include <errno.h> #include <stdarg.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> #include "common.h" *************** *** 82,86 **** enum log_type lt; for (lt=1; lt<NUM_LOGS; lt++) { ! if (logs[lt].file) fclose(logs[lt].file); } for (i=0; i<ArrayLength(logEntries); i++) { --- 71,75 ---- enum log_type lt; for (lt=1; lt<NUM_LOGS; lt++) { ! if (logs[lt].file) (void)fclose(logs[lt].file); } for (i=0; i<ArrayLength(logEntries); i++) { *************** *** 97,101 **** for (lt=1; lt<NUM_LOGS;lt++) { if (logs[lt].file) { ! fclose(logs[lt].file); } logs[lt].file = fopen(logs[lt].name, "a"); --- 86,90 ---- for (lt=1; lt<NUM_LOGS;lt++) { if (logs[lt].file) { ! (void)fclose(logs[lt].file); } logs[lt].file = fopen(logs[lt].name, "a"); *************** *** 116,123 **** logEntries[i].size = 80; logEntries[i].text = malloc(logEntries[i].size); ! logEntries[i].text[0] = 0; } reg_exit_func(cleanup_logs); ! return !failed; } --- 105,113 ---- logEntries[i].size = 80; logEntries[i].text = malloc(logEntries[i].size); ! assert(logEntries[i].text != NULL); ! logEntries[i].text[0] = '\0'; } reg_exit_func(cleanup_logs); ! return failed ? 0 : 1; } *************** *** 128,147 **** va_list arg_list; const char *sev; ! unsigned int size; if (!logs[lt].file) return; if (!(logs[lt].severity_mask & (1 << ls))) return; ! entry = logEntries + entries++; entry->type = lt; entry->severity = ls; ! if (entries == ArrayLength(logEntries)) { ! entries = 0; ! } entry->time = now; ! strftime(timestamp, sizeof(timestamp), "[%H:%M:%S %m/%d/%Y] ", localtime(&now)); ! fputs(timestamp, logs[lt].file); switch (ls) { case LOG_INFO: sev = "(info) "; break; --- 118,135 ---- va_list arg_list; const char *sev; ! size_t size; if (!logs[lt].file) return; if (!(logs[lt].severity_mask & (1 << ls))) return; ! entry = logEntries + entries; entry->type = lt; entry->severity = ls; ! if (++entries == ArrayLength(logEntries)) entries = 0; entry->time = now; ! (void)strftime(timestamp, sizeof(timestamp), "[%H:%M:%S %m/%d/%Y] ", localtime(&now)); ! (void)fputs(timestamp, logs[lt].file); switch (ls) { case LOG_INFO: sev = "(info) "; break; *************** *** 150,155 **** case LOG_OTHER: default: sev = ""; break; } ! fputs(sev, logs[lt].file); ! fflush(logs[lt].file); va_start(arg_list, text); --- 138,143 ---- case LOG_OTHER: default: sev = ""; break; } ! (void)fputs(sev, logs[lt].file); ! (void)fflush(logs[lt].file); va_start(arg_list, text); *************** *** 158,164 **** if (size > entry->size) { entry->text = realloc(entry->text, size); entry->size = size; } ! vsprintf(entry->text, text, arg_list); va_end(arg_list); } --- 146,153 ---- if (size > entry->size) { entry->text = realloc(entry->text, size); + assert(entry->text != NULL); entry->size = size; } ! (void)vsprintf(entry->text, text, arg_list); va_end(arg_list); } *************** *** 215,220 **** } ! discrim = malloc(sizeof(struct logSearch)); ! memset(discrim, 0, sizeof(*discrim)); discrim->limit = 25; --- 204,208 ---- } ! discrim = calloc(1, sizeof(*discrim)); discrim->limit = 25; Index: log.h =================================================================== RCS file: /cvsroot/srvx/services/src/log.h,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -r1.13 -r1.14 *** log.h 2001/08/01 22:14:35 1.13 --- log.h 2001/10/02 16:04:36 1.14 *************** *** 56,60 **** char *text; ! unsigned int size; }; --- 56,60 ---- char *text; ! size_t size; }; *************** *** 69,79 **** }; - - #ifdef __GNUC__ - #define PRINTF_LIKE(M,N) __attribute__((format (printf, M, N))) - #else - #define PRINTF_LIKE(M,N) - #endif - int init_logs(void); void reopen_logs(void); --- 69,72 ---- *************** *** 83,87 **** struct logSearch* log_discrim_create(struct userNode *service, struct userNode *user, unsigned int argc, unsigned char *argv[]); - unsigned int log_entry_search(struct logSearch *discrim, entry_search_func esf, void *data); int log_modify_logging(const char *logname, const char *mods); int log_get_mask(const char *logname); --- 76,79 ---- Index: main.c =================================================================== RCS file: /cvsroot/srvx/services/src/main.c,v retrieving revision 1.113 retrieving revision 1.114 diff -C2 -r1.113 -r1.114 *** main.c 2001/09/28 15:18:20 1.113 --- main.c 2001/10/02 16:04:36 1.114 *************** *** 24,41 **** #include "config.h" ! #ifdef HAVE_ERRNO_H #include <errno.h> - #endif - #ifdef HAVE_SIGNAL_H #include <signal.h> - #endif - #ifdef HAVE_STDIO_H #include <stdio.h> - #endif - #ifdef HAVE_STDLIB_H #include <stdlib.h> - #endif - #ifdef HAVE_STRING_H #include <string.h> #endif #ifdef HAVE_UNISTD_H --- 24,36 ---- #include "config.h" ! #include <assert.h> #include <errno.h> #include <signal.h> #include <stdio.h> #include <stdlib.h> #include <string.h> + #include <sys/types.h> + #ifdef HAVE_SYS_SELECT_H + #include <sys/select.h> #endif #ifdef HAVE_UNISTD_H *************** *** 54,58 **** #endif - #include "alias.h" #include "common.h" #include "conf.h" --- 49,52 ---- *************** *** 66,69 **** --- 60,64 ---- #include "proto.h" #include "recdb.h" + #include "service.h" #include "timeq.h" #include "tools.h" *************** *** 89,96 **** struct policer_params *oper_policer_params, *luser_policer_params, *god_policer_params; ! void sigaction_writedb(int x) { - void write_databases(void); - #if defined(HAVE_STRSIGNAL) log(MAIN_LOG, LOG_INFO, "%s -- writing databases.\n", strsignal(x)); --- 84,90 ---- struct policer_params *oper_policer_params, *luser_policer_params, *god_policer_params; ! static void ! sigaction_writedb(int x) { #if defined(HAVE_STRSIGNAL) log(MAIN_LOG, LOG_INFO, "%s -- writing databases.\n", strsignal(x)); *************** *** 101,105 **** } ! void sigaction_rehash(int x) { #if defined(HAVE_STRSIGNAL) --- 95,100 ---- } ! static void ! sigaction_rehash(int x) { #if defined(HAVE_STRSIGNAL) *************** *** 108,122 **** log(MAIN_LOG, LOG_INFO, "Signal %d -- rehashing.\n", x); #endif ! conf_read(services_config); reopen_logs(); } ! static exit_func_t *ef_list; ! static unsigned int ef_size = 0, ef_used = 0; void reg_exit_func(exit_func_t handler) { if (ef_used == ef_size) { ! if (ef_size) { ef_size <<= 1; ef_list = realloc(ef_list, ef_size*sizeof(exit_func_t)); --- 103,117 ---- log(MAIN_LOG, LOG_INFO, "Signal %d -- rehashing.\n", x); #endif ! (void)conf_read(services_config); reopen_logs(); } ! /*@only@*/static exit_func_t *ef_list; ! static size_t ef_size = 0, ef_used = 0; void reg_exit_func(exit_func_t handler) { if (ef_used == ef_size) { ! if (ef_list) { ef_size <<= 1; ef_list = realloc(ef_list, ef_size*sizeof(exit_func_t)); *************** *** 125,135 **** ef_list = malloc(ef_size*sizeof(exit_func_t)); } } ef_list[ef_used++] = handler; } ! void call_exit_funcs(void) { ! unsigned int n = ef_used; /* Call them in reverse order because we initialize logs, then nickserv, --- 120,132 ---- ef_list = malloc(ef_size*sizeof(exit_func_t)); } + assert(ef_list != NULL); } ef_list[ef_used++] = handler; } ! void ! call_exit_funcs(void) { ! size_t n = ef_used; /* Call them in reverse order because we initialize logs, then nickserv, *************** *** 139,156 **** */ ! while (n > 0) { ! ef_list[--n](); ! } free(ef_list); ef_used = ef_size = 0; } ! static db_write_func_t *dw_list; ! static unsigned int dw_size = 0, dw_used = 0; void reg_db_write_func(db_write_func_t handler) { if (dw_used == dw_size) { ! if (dw_size) { dw_size <<= 1; dw_list = realloc(dw_list, dw_size*sizeof(db_write_func_t)); --- 136,151 ---- */ ! while (n > 0) ef_list[--n](); free(ef_list); ef_used = ef_size = 0; } ! /*@only@*/static db_write_func_t *dw_list; ! static size_t dw_size = 0, dw_used = 0; void reg_db_write_func(db_write_func_t handler) { if (dw_used == dw_size) { ! if (dw_list) { dw_size <<= 1; dw_list = realloc(dw_list, dw_size*sizeof(db_write_func_t)); *************** *** 159,177 **** dw_list = malloc(dw_size*sizeof(db_write_func_t)); } } dw_list[dw_used++] = handler; } ! void write_databases(void) { ! unsigned int n = dw_used; ! ! /* Order shouldn't matter, and this is a cut-n-paste hack job anyway. */ ! while (n > 0) { ! dw_list[--n](); ! } } ! void thread_routine(void) { struct timeval select_timeout; --- 154,171 ---- dw_list = malloc(dw_size*sizeof(db_write_func_t)); } + assert(dw_list != NULL); } dw_list[dw_used++] = handler; } ! void ! write_databases(void) { ! size_t n; ! for (n = 0; n < dw_used; n++) dw_list[n](); } ! static void ! thread_routine(void) { struct timeval select_timeout; *************** *** 220,224 **** } } else { ! uplink_connect(); } } --- 214,218 ---- } } else { ! (void)uplink_connect(); } } *************** *** 271,275 **** if ((rd = conf_get_node("rlimits")) && (dict = GET_RECORD_OBJECT(rd))) { ! dict_foreach(dict, set_item_rlimit, values); } dict_delete(values); --- 265,269 ---- if ((rd = conf_get_node("rlimits")) && (dict = GET_RECORD_OBJECT(rd))) { ! (void)dict_foreach(dict, set_item_rlimit, values); } dict_delete(values); *************** *** 285,291 **** #endif ! void main_cleanup(void) { ! unlink(PID_FILE); if (dw_list) free(dw_list); policer_params_delete(oper_policer_params); --- 279,286 ---- #endif ! static void ! main_cleanup(void) { ! (void)unlink(PID_FILE); if (dw_list) free(dw_list); policer_params_delete(oper_policer_params); *************** *** 294,298 **** } ! void usage(char *self) { /* We can assume we have getopt_long(). */ printf("Usage: %s [-c config] [-r log] [-f] [-V] [-v|-h] [-k]\n\ --- 289,294 ---- } ! static void ! usage(char *self) { /* We can assume we have getopt_long(). */ printf("Usage: %s [-c config] [-r log] [-f] [-V] [-v|-h] [-k]\n\ *************** *** 306,310 **** } ! void version() { printf(" --------------------------------------------------\n\ - srvx "VERSION" ("CODENAME"), Built: " __DATE__ ", " __TIME__".\n\ --- 302,307 ---- } ! static void ! version(void) { printf(" --------------------------------------------------\n\ - srvx "VERSION" ("CODENAME"), Built: " __DATE__ ", " __TIME__".\n\ *************** *** 313,317 **** } ! void license() { printf("\n\ This program is free software; you can redistribute it and/or modify\n\ --- 310,315 ---- } ! static void ! license(void) { printf("\n\ This program is free software; you can redistribute it and/or modify\n\ *************** *** 467,473 **** gline_init(); sockcheck_init(); /* could be modularized */ ! init_structs(); proto_init(); ! alias_init(); conf_rlimits(); if (replay_file) log(MAIN_LOG, LOG_INFO, "Beginning replay...\n"); --- 465,471 ---- gline_init(); sockcheck_init(); /* could be modularized */ ! hash_init(); proto_init(); ! service_init(); conf_rlimits(); if (replay_file) log(MAIN_LOG, LOG_INFO, "Beginning replay...\n"); Index: md5.c =================================================================== RCS file: /cvsroot/srvx/services/src/md5.c,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** md5.c 2001/03/13 04:04:44 1.9 --- md5.c 2001/10/02 16:04:36 1.10 *************** *** 28,33 **** #endif #include "common.h" ! #include "md5.h" /* Constants for MD5Transform routine. */ --- 28,97 ---- #endif #include "common.h" ! #ifndef PROTOTYPES ! #define PROTOTYPES 1 ! #endif ! ! /* GLOBAL.H - RSAREF types and constants */ ! ! /* PROTOTYPES should be set to one if and only if the compiler supports ! function argument prototyping. ! The following makes PROTOTYPES default to 0 if it has not already ! been defined with C compiler flags. ! */ ! ! /* POINTER defines a generic pointer type */ ! typedef unsigned char *POINTER; ! ! /* UINT2 defines a two byte word */ ! typedef unsigned short int UINT2; ! ! /* UINT4 defines a four byte word */ ! #if defined(__alpha) ! typedef unsigned int UINT4; ! #else ! typedef unsigned long int UINT4; ! #endif ! ! /* PROTO_LIST is defined depending on how PROTOTYPES is defined above. ! If using PROTOTYPES, then PROTO_LIST returns the list, otherwise it ! returns an empty list. ! */ ! #if PROTOTYPES ! #define PROTO_LIST(list) list ! #else ! #define PROTO_LIST(list) () ! #endif ! ! /* MD5.H - header file for MD5C.C */ ! ! /* Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All ! rights reserved. ! ! License to copy and use this software is granted provided that it ! is identified as... [truncated message content] |
From: Miles P. <pet...@us...> - 2001-09-30 04:04:01
|
Update of /cvsroot/srvx/services/src In directory usw-pr-cvs1:/tmp/cvs-serv14083 Modified Files: Tag: rel-1_0 sockcheck.c Log Message: remove stupid debug messages i put in Index: sockcheck.c =================================================================== RCS file: /cvsroot/srvx/services/src/sockcheck.c,v retrieving revision 1.54.2.31 retrieving revision 1.54.2.32 diff -C2 -r1.54.2.31 -r1.54.2.32 *** sockcheck.c 2001/09/30 04:00:38 1.54.2.31 --- sockcheck.c 2001/09/30 04:03:55 1.54.2.32 *************** *** 236,246 **** if (disable_sockcheck) return; - - printf("%d\n", pending_ip_pipe[1]); - if (pending_ip_pipe[1] == -1) return; /* something went wrong in worker */ name = buff + 1; snprintf(name, sizeof(buff)-1, "%ld.%ld.%ld.%ld", (addr >> 0) & 255, (addr >> 8) & 255, (addr >> 16) & 255, (addr >> 24) & 255); - printf("Name: %s\n", name); if (pthread_mutex_lock(&checked_ip_mutex)) { /* lock failure; this usually means coding error */ --- 236,242 ---- *************** *** 263,267 **** sci->addr = addr; memcpy(sci->hostname, name, namelen); - printf("Added: %s\n", sci->hostname); dict_insert(checked_ip_dict, sci->hostname, sci); } --- 259,262 ---- |
From: Miles P. <pet...@us...> - 2001-09-30 04:00:41
|
Update of /cvsroot/srvx/services/src In directory usw-pr-cvs1:/tmp/cvs-serv13653 Modified Files: Tag: rel-1_0 opserv.c sockcheck.c Log Message: byte order on IP's was confused between hostscan and automatic scans and such. fixed now Index: opserv.c =================================================================== RCS file: /cvsroot/srvx/services/src/opserv.c,v retrieving revision 1.187.2.55 retrieving revision 1.187.2.56 diff -C2 -r1.187.2.55 -r1.187.2.56 *** opserv.c 2001/09/10 19:11:49 1.187.2.55 --- opserv.c 2001/09/30 04:00:38 1.187.2.56 *************** *** 3065,3069 **** { (void)extra; ! sockcheck_queue_address(match->ip); return 0; } --- 3065,3069 ---- { (void)extra; ! sockcheck_queue_address(htonl(match->ip)); return 0; } Index: sockcheck.c =================================================================== RCS file: /cvsroot/srvx/services/src/sockcheck.c,v retrieving revision 1.54.2.30 retrieving revision 1.54.2.31 diff -C2 -r1.54.2.30 -r1.54.2.31 *** sockcheck.c 2001/09/28 02:40:38 1.54.2.30 --- sockcheck.c 2001/09/30 04:00:38 1.54.2.31 *************** *** 236,242 **** if (disable_sockcheck) return; if (pending_ip_pipe[1] == -1) return; /* something went wrong in worker */ name = buff + 1; ! snprintf(name, sizeof(buff)-1, "%ld.%ld.%ld.%ld", (addr >> 24) & 255, (addr >> 16) & 255, (addr >> 8) & 255, (addr >> 0) & 255); if (pthread_mutex_lock(&checked_ip_mutex)) { /* lock failure; this usually means coding error */ --- 236,246 ---- if (disable_sockcheck) return; + + printf("%d\n", pending_ip_pipe[1]); + if (pending_ip_pipe[1] == -1) return; /* something went wrong in worker */ name = buff + 1; ! snprintf(name, sizeof(buff)-1, "%ld.%ld.%ld.%ld", (addr >> 0) & 255, (addr >> 8) & 255, (addr >> 16) & 255, (addr >> 24) & 255); ! printf("Name: %s\n", name); if (pthread_mutex_lock(&checked_ip_mutex)) { /* lock failure; this usually means coding error */ *************** *** 259,262 **** --- 263,267 ---- sci->addr = addr; memcpy(sci->hostname, name, namelen); + printf("Added: %s\n", sci->hostname); dict_insert(checked_ip_dict, sci->hostname, sci); } |
From: Miles P. <pet...@us...> - 2001-09-29 04:37:34
|
Update of /cvsroot/srvx/services/src In directory usw-pr-cvs1:/tmp/cvs-serv20707/src Modified Files: sockcheck.c uplink.c Log Message: need to include netinet/in.h for sockaddr_in/htonl etc. Index: sockcheck.c =================================================================== RCS file: /cvsroot/srvx/services/src/sockcheck.c,v retrieving revision 1.62 retrieving revision 1.63 diff -C2 -r1.62 -r1.63 *** sockcheck.c 2001/09/22 16:12:54 1.62 --- sockcheck.c 2001/09/29 04:37:31 1.63 *************** *** 47,50 **** --- 47,53 ---- #include <sys/poll.h> #endif + #ifdef HAVE_NETINET_IN_H + #include <netinet/in.h> + #endif #ifdef HAVE_SYS_SOCKET_H #include <sys/socket.h> Index: uplink.c =================================================================== RCS file: /cvsroot/srvx/services/src/uplink.c,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -r1.10 -r1.11 *** uplink.c 2001/09/28 15:21:29 1.10 --- uplink.c 2001/09/29 04:37:31 1.11 *************** *** 24,27 **** --- 24,28 ---- #include <stdarg.h> #include <stdlib.h> + #include <netinet/in.h> #include <sys/socket.h> #include <unistd.h> |
From: Entrope <en...@us...> - 2001-09-29 04:18:07
|
Update of /cvsroot/srvx/services In directory usw-pr-cvs1:/tmp/cvs-serv17808 Added Files: ltmain.sh Log Message: add missing libtool file --- NEW FILE --- # ltmain.sh - Provide generalized library-building support services. # NOTE: Changing this file will not affect anything until you rerun configure. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 # Free Software Foundation, Inc. # Originally by Gordon Matzigkeit <go...@gn...>, 1996 # # 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 [...4945 lines suppressed...] If FILE is a libtool library, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; *) $echo "$modename: invalid operation mode \`$mode'" 1>&2 $echo "$help" 1>&2 exit 1 ;; esac echo $echo "Try \`$modename --help' for more information about other modes." exit 0 # Local Variables: # mode:shell-script # sh-indentation:2 # End: |
From: Entrope <en...@us...> - 2001-09-29 04:17:41
|
Update of /cvsroot/srvx/services In directory usw-pr-cvs1:/tmp/cvs-serv17757 Modified Files: configure.ac Log Message: look for <sys/select.h>, too Index: configure.ac =================================================================== RCS file: /cvsroot/srvx/services/configure.ac,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -r1.10 -r1.11 *** configure.ac 2001/09/28 15:18:19 1.10 --- configure.ac 2001/09/29 04:17:37 1.11 *************** *** 86,90 **** dnl Would rather not bail on headers, BSD has alot of the functions elsewhere. -Jedi ! AC_CHECK_HEADERS(arpa/inet.h ctype.h errno.h fcntl.h malloc.h math.h netdb.h netinet/in.h pthread.h setjmp.h signal.h stdarg.h stdio.h stdlib.h sys/resource.h sys/timeb.h sys/times.h string.h sys/param.h sys/poll.h sys/socket.h sys/time.h sys/types.h time.h unistd.h getopt.h memory.h regex.h alloca.h dlfcn.h,,) dnl portability stuff, hurray! -Jedi --- 86,90 ---- dnl Would rather not bail on headers, BSD has alot of the functions elsewhere. -Jedi ! AC_CHECK_HEADERS(arpa/inet.h ctype.h errno.h fcntl.h malloc.h math.h netdb.h netinet/in.h pthread.h setjmp.h signal.h stdarg.h stdio.h stdlib.h sys/resource.h sys/timeb.h sys/times.h sys/select.h string.h sys/param.h sys/poll.h sys/socket.h sys/time.h sys/types.h time.h unistd.h getopt.h memory.h regex.h alloca.h dlfcn.h,,) dnl portability stuff, hurray! -Jedi |
From: Entrope <en...@us...> - 2001-09-28 15:21:32
|
Update of /cvsroot/srvx/services/src In directory usw-pr-cvs1:/tmp/cvs-serv16243/src Modified Files: uplink.c proto_ircu_p10.c proto_bahamut.c proto.h proto.c hash.c Makefile.am Added Files: proto.def Removed Files: proto_ircu_p10.h proto_bahamut.h Log Message: refine protocol modularization ***** Error reading new file: [Errno 2] No such file or directory: 'proto.def' Index: uplink.c =================================================================== RCS file: /cvsroot/srvx/services/src/uplink.c,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** uplink.c 2001/08/19 03:06:09 1.9 --- uplink.c 2001/09/28 15:21:29 1.10 *************** *** 1,2 **** --- 1,22 ---- + /* uplink.c - Network uplink management and state + * Copyright 2000-2001 srvx Development Team + * + * 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$ + */ + #include "config.h" #include <errno.h> *************** *** 4,7 **** --- 24,28 ---- #include <stdarg.h> #include <stdlib.h> + #include <sys/socket.h> #include <unistd.h> Index: proto_ircu_p10.c =================================================================== RCS file: /cvsroot/srvx/services/src/proto_ircu_p10.c,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -r1.23 -r1.24 *** proto_ircu_p10.c 2001/09/27 21:58:07 1.23 --- proto_ircu_p10.c 2001/09/28 15:21:29 1.24 *************** *** 54,60 **** #include "hash.h" #include "log.h" ! #define PROTO_FUNC_TYPE 1 #include "proto.h" - #include "proto_ircu_p10.h" #include "timeq.h" #include "tools.h" --- 54,60 ---- #include "hash.h" #include "log.h" ! #define PROTO_FUNC(retval, name, arglist) retval name arglist; ! #define PROTO_VARIABLE(type, name) extern type name; #include "proto.h" #include "timeq.h" #include "tools.h" *************** *** 65,70 **** --- 65,81 ---- /************************************/ + #define SERVER_NUMERIC_LEN 1 + #define USER_NUMERIC_LEN 2 + #define COMBO_NUMERIC_LEN (SERVER_NUMERIC_LEN+USER_NUMERIC_LEN) + #define USERARRAYSIZE (1 << (USER_NUMERIC_LEN * 6)) + extern int ping_freq, ping_timeout; + const char *proto_user_modes = "dkgh"; + const char *proto_channel_modes = ""; + int proto_chanserv_joins_channels = 1; + unsigned int proto_max_mode_args = 6; + unsigned int proto_max_channel_bans = 30; + static void timed_send_ping(void *data); static void timed_ping_timeout(void *data); *************** *** 612,616 **** for (i=0; i<count; i++) { here_len = strlen(list[i]); ! if ((start < queued+here_len+3) || (queued >= MAXMODEPARAMS)) { while (queued) { buffer[--start] = what[1]; --- 623,627 ---- for (i=0; i<count; i++) { here_len = strlen(list[i]); ! if ((start < queued+here_len+3) || (queued >= proto_max_mode_args)) { while (queued) { buffer[--start] = what[1]; *************** *** 648,652 **** for (i=0; i<count; i++) { len = strlen(UPROTO(list[i])->numeric); ! if ((start < queued+3+len) || (queued >= MAXMODEPARAMS)) { while (queued) { buffer[--start] = what[1]; --- 659,663 ---- for (i=0; i<count; i++) { len = strlen(UPROTO(list[i])->numeric); ! if ((start < queued+3+len) || (queued >= proto_max_mode_args)) { while (queued) { buffer[--start] = what[1]; Index: proto_bahamut.c =================================================================== RCS file: /cvsroot/srvx/services/src/proto_bahamut.c,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -r1.13 -r1.14 *** proto_bahamut.c 2001/09/27 21:58:07 1.13 --- proto_bahamut.c 2001/09/28 15:21:29 1.14 *************** *** 55,64 **** #include "log.h" #include "modules.h" ! #define PROTO_FUNC_TYPE 1 #include "proto.h" #include "timeq.h" #include "tools.h" #include "uplink.h" - #include "proto_bahamut.h" /************************************/ --- 55,64 ---- #include "log.h" #include "modules.h" ! #define PROTO_FUNC(retval, name, arglist) retval name arglist; ! #define PROTO_VARIABLE(type, name) extern type name; #include "proto.h" #include "timeq.h" #include "tools.h" #include "uplink.h" /************************************/ *************** *** 73,76 **** --- 73,83 ---- extern int ping_freq, ping_timeout; + const char *proto_user_modes = " h"; + const char *proto_channel_modes = " rRcO"; + int proto_chanserv_joins_channels = 0; + unsigned int proto_max_mode_args = MAXNUMPARAMS; + unsigned int proto_max_channel_bans = 30; + + static void timed_send_ping(void *data); static void timed_ping_timeout(void *data); *************** *** 436,440 **** for (i=0; i<count; i++) { here_len = strlen(list[i]); ! if ((start < queued+here_len+3) || (queued >= MAXMODEPARAMS)) { while (queued) { buffer[--start] = what[1]; --- 443,447 ---- for (i=0; i<count; i++) { here_len = strlen(list[i]); ! if ((start < queued+here_len+3) || (queued >= proto_max_mode_args)) { while (queued) { buffer[--start] = what[1]; *************** *** 472,476 **** for (i=0; i<count; i++) { len = strlen(list[i]->nick); ! if ((start < queued+3+len) || (queued >= MAXMODEPARAMS)) { while (queued) { buffer[--start] = what[1]; --- 479,483 ---- for (i=0; i<count; i++) { len = strlen(list[i]->nick); ! if ((start < queued+3+len) || (queued >= proto_max_mode_args)) { while (queued) { buffer[--start] = what[1]; *************** *** 1406,1410 **** /* Register things with module registry */ ! proto_module = module_register("proto", MAKE_VERSION(0, 0, 0), NULL, lib); uproto_note_id = note_register_module("struct userNode", proto_module); sproto_note_id = note_register_module("struct server", proto_module); --- 1413,1417 ---- /* Register things with module registry */ ! proto_module = module_register("proto", MAKE_VERSION(PROTO_INTERFACE_MAJOR, PROTO_INTERFACE_MINOR, 0), NULL, lib); uproto_note_id = note_register_module("struct userNode", proto_module); sproto_note_id = note_register_module("struct server", proto_module); Index: proto.h =================================================================== RCS file: /cvsroot/srvx/services/src/proto.h,v retrieving revision 1.43 retrieving revision 1.44 diff -C2 -r1.43 -r1.44 *** proto.h 2001/09/27 21:58:07 1.43 --- proto.h 2001/09/28 15:21:29 1.44 *************** *** 24,33 **** #include <stdarg.h> #include <sys/types.h> - #ifdef HAVE_NETINET_IN_H - #include <netinet/in.h> - #endif - #ifdef HAVE_SYS_SOCKET_H - #include <sys/socket.h> - #endif struct server; --- 24,27 ---- *************** *** 46,51 **** #define MAXLEN 512 #define MAXNUMPARAMS 200 ! #define MAXBANS 30 ! #define MAXMODEPARAMS 6 #define MIN_LINE_SIZE 40 #define MAX_LINE_SIZE 450 --- 40,44 ---- #define MAXLEN 512 #define MAXNUMPARAMS 200 ! #define MIN_LINE_SIZE 40 #define MAX_LINE_SIZE 450 *************** *** 59,122 **** /********************/ ! #if PROTO_FUNC_TYPE == 1 ! /* For protocol modules */ ! #define PROTO_FUNC(retval, name) retval name ! #elif PROTO_FUNC_TYPE == 2 ! /* For proto.c, the generic binder */ ! #define PROTO_FUNC(retval, name) retval (*name) ! #else ! /* For other files */ ! #define PROTO_FUNC(retval, name) extern retval (*name) #endif - - /* connection maintenance */ - PROTO_FUNC(void, irc_server)(struct server *srv); - PROTO_FUNC(void, irc_user)(struct userNode *user); - PROTO_FUNC(void, irc_nick)(struct userNode *user); - PROTO_FUNC(void, irc_introduce)(const char *passwd); - PROTO_FUNC(void, irc_quit)(struct userNode *user, const char *message); - PROTO_FUNC(void, irc_squit)(struct server *srv, const char *message); - - /* messages */ - PROTO_FUNC(void, irc_privmsg)(struct userNode *from, const char *to, const char *message); - PROTO_FUNC(void, irc_notice)(struct userNode *from, const char *to, const char *message); - - /* channel maintenance */ - PROTO_FUNC(void, irc_join)(struct userNode *who, struct chanNode *what); - PROTO_FUNC(void, irc_invite)(struct userNode *from, struct userNode *who, struct chanNode *to); - PROTO_FUNC(void, irc_mode)(struct userNode *from, struct chanNode *target, const char *modes); - PROTO_FUNC(void, irc_kick)(struct userNode *actor, struct userNode *who, struct chanNode *from, const char *msg); - PROTO_FUNC(void, irc_part)(struct userNode *who, struct chanNode *what, const char *reason); - PROTO_FUNC(void, irc_topic)(struct userNode *who, struct chanNode *what, const char *topic); - PROTO_FUNC(void, irc_fetchtopic)(struct userNode *from, struct chanNode *what); - - /* network maintenance */ - PROTO_FUNC(void, irc_gline)(const char *host, unsigned long duration, const char *message); - PROTO_FUNC(void, irc_ungline)(const char *mask); - PROTO_FUNC(void, irc_error)(const char *to, const char *message); - PROTO_FUNC(void, irc_kill)(struct userNode *from, struct userNode *target, const char *message); - PROTO_FUNC(void, irc_raw)(const char *what); - PROTO_FUNC(void, irc_stats)(struct userNode *from, struct server *target, char type); ! /********************/ ! /* PROTOCOL PARSING */ ! /********************/ ! PROTO_FUNC(void, reg_chanmsg_func)(unsigned char prefix, struct userNode *service, chanmsg_func_t handler); ! PROTO_FUNC(void, reg_privmsg_func)(struct userNode *user, privmsg_func_t handler); ! PROTO_FUNC(void, reg_notice_func)(struct userNode *user, privmsg_func_t handler); ! PROTO_FUNC(void, reg_mode_change_func)(mode_change_func_t handler); ! PROTO_FUNC(int, parse_line)(unsigned char *line); ! ! /**********************/ ! /* MISCELLANEOUS GUNK */ ! /**********************/ ! ! PROTO_FUNC(struct userNode*, add_local_user)(const char *nick, const char *ident, const char *hostname, const char *modes, const char *userinfo, time_t timestamp); ! PROTO_FUNC(void, chan_apply_bans)(struct userNode *who, struct chanNode *channel, char *what, unsigned int count, char **list); ! PROTO_FUNC(void, chan_apply_mode)(struct userNode *who, struct chanNode *channel, char *what, unsigned int count, struct userNode **list); ! PROTO_FUNC(void, irc_change_channel_modes)(struct chanNode *channel, struct userNode *source, const unsigned char *modes, va_list args); #undef PROTO_FUNC #endif /* !defined(PROTO_H) */ --- 52,67 ---- /********************/ ! #ifndef PROTO_FUNC ! #define PROTO_FUNC(retval, name, arglist) extern retval (*name) arglist; #endif ! #ifndef PROTO_VARIABLE ! #define PROTO_VARIABLE(type, name) extern type name; ! #endif ! #include "proto.def" #undef PROTO_FUNC + #undef PROTO_VARIABLE #endif /* !defined(PROTO_H) */ Index: proto.c =================================================================== RCS file: /cvsroot/srvx/services/src/proto.c,v retrieving revision 1.73 retrieving revision 1.74 diff -C2 -r1.73 -r1.74 *** proto.c 2001/09/27 21:58:07 1.73 --- proto.c 2001/09/28 15:21:29 1.74 *************** *** 24,28 **** #include "common.h" #include "log.h" ! #define PROTO_FUNC_TYPE 2 #include "proto.h" --- 24,29 ---- #include "common.h" #include "log.h" ! #define PROTO_FUNC(retval, name, arglist) retval (*name) arglist; ! #define PROTO_VARIABLE(type, name) type name; #include "proto.h" *************** *** 32,35 **** --- 33,37 ---- struct module *pmod; int failed = 0; + void *addr; pmod = module_find_loaded("proto"); *************** *** 38,42 **** return; } ! #define BIND_PROTO(name) if (!(name = get_module_symbol(pmod, #name))) { log(MAIN_LOG, LOG_ERROR, "Protocol module does not export symbol %s\n", #name); failed++; } if (failed) { log(MAIN_LOG, LOG_ERROR, "%d unresolved protocol functions\n", failed); --- 40,48 ---- return; } ! #define PROTO_FUNC(rettype, name, arglist) if (!(name = get_module_symbol(pmod, #name))) { log(MAIN_LOG, LOG_ERROR, "Protocol module does not export symbol %s\n", #name); failed++; } ! #define PROTO_VARIABLE(type, name) if ((addr = get_module_symbol(pmod, #name))) { name = *(type*)addr; } else { log(MAIN_LOG, LOG_ERROR, "Protocol module does not export symbol %s\n", #name); failed++; } ! #include "proto.def" ! #undef PROTO_FUNC ! #undef PROTO_VARIABLE if (failed) { log(MAIN_LOG, LOG_ERROR, "%d unresolved protocol functions\n", failed); Index: hash.c =================================================================== RCS file: /cvsroot/srvx/services/src/hash.c,v retrieving revision 1.145 retrieving revision 1.146 diff -C2 -r1.145 -r1.146 *** hash.c 2001/09/27 21:58:07 1.145 --- hash.c 2001/09/28 15:21:29 1.146 *************** *** 766,770 **** */ for (n=0; n<num; n++) { ! if (channel->banlist.used >= MAXBANS) break; bNode = malloc(sizeof(struct banNode)); --- 766,770 ---- */ for (n=0; n<num; n++) { ! if (channel->banlist.used >= proto_max_channel_bans) break; bNode = malloc(sizeof(struct banNode)); Index: Makefile.am =================================================================== RCS file: /cvsroot/srvx/services/src/Makefile.am,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -r1.39 -r1.40 *** Makefile.am 2001/09/27 21:58:08 1.39 --- Makefile.am 2001/09/28 15:21:29 1.40 *************** *** 1,3 **** - AM_CPPFLAGS = -DTRY_SAXDB LIBS = @INTLLIBS@ @LIBS@ --- 1,2 ---- *************** *** 23,27 **** modules.c modules.h \ policer.c policer.h \ ! proto.c proto.h \ recdb.c recdb.h \ rules.c rules.h \ --- 22,26 ---- modules.c modules.h \ policer.c policer.h \ ! proto.c proto.h proto.def \ recdb.c recdb.h \ rules.c rules.h \ *************** *** 38,45 **** libproto_bahamut_la_SOURCES = \ ! proto_bahamut.c proto_bahamut.h libproto_ircu_p10_la_SOURCES = \ ! proto_ircu_p10.c proto_ircu_p10.h checkdb_SOURCES = checkdb.c recdb.c recdb.h dict-hash.c dict.h log.h saxdb.c saxdb.h --- 37,46 ---- libproto_bahamut_la_SOURCES = \ ! proto.h proto.def \ ! proto_bahamut.c libproto_ircu_p10_la_SOURCES = \ ! proto.h proto.def \ ! proto_ircu_p10.c checkdb_SOURCES = checkdb.c recdb.c recdb.h dict-hash.c dict.h log.h saxdb.c saxdb.h --- proto_ircu_p10.h DELETED --- --- proto_bahamut.h DELETED --- |
From: Entrope <en...@us...> - 2001-09-28 15:20:32
|
Update of /cvsroot/srvx/services/src In directory usw-pr-cvs1:/tmp/cvs-serv15958/src Modified Files: modules.c Log Message: create note_targets dict Index: modules.c =================================================================== RCS file: /cvsroot/srvx/services/src/modules.c,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -r1.15 -r1.16 *** modules.c 2001/09/27 21:58:07 1.15 --- modules.c 2001/09/28 15:20:30 1.16 *************** *** 267,269 **** --- 267,270 ---- loaded_libs = dict_new(); loaded_modules = dict_new(); + note_targets = dict_new(); } |
From: Entrope <en...@us...> - 2001-09-28 15:18:22
|
Update of /cvsroot/srvx/services/src In directory usw-pr-cvs1:/tmp/cvs-serv15382/src Modified Files: config.h.in main.c Log Message: clean up some defines Index: config.h.in =================================================================== RCS file: /cvsroot/srvx/services/src/config.h.in,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -r1.25 -r1.26 *** config.h.in 2001/09/27 21:58:07 1.25 --- config.h.in 2001/09/28 15:18:20 1.26 *************** *** 15,18 **** --- 15,21 ---- #undef C_ALLOCA + /* Define to enable various debug behaviors. */ + #undef DEBUG + /* Define to 1 if translation of program messages to the user's native language is requested. */ Index: main.c =================================================================== RCS file: /cvsroot/srvx/services/src/main.c,v retrieving revision 1.112 retrieving revision 1.113 diff -C2 -r1.112 -r1.113 *** main.c 2001/09/27 21:58:07 1.112 --- main.c 2001/09/28 15:18:20 1.113 *************** *** 20,23 **** --- 20,25 ---- #define PID_FILE "srvx.pid" + /* Stupid glibc !#@^*%& freaks and their hidden declarations of strsignal() */ + #define _GNU_SOURCE 1 #include "config.h" *************** *** 91,98 **** void write_databases(void); ! #ifndef HAVE_STRSIGNAL ! log(MAIN_LOG, LOG_INFO, "Signal %d -- writing databases.\n", x); ! #else log(MAIN_LOG, LOG_INFO, "%s -- writing databases.\n", strsignal(x)); #endif write_databases(); --- 93,100 ---- void write_databases(void); ! #if defined(HAVE_STRSIGNAL) log(MAIN_LOG, LOG_INFO, "%s -- writing databases.\n", strsignal(x)); + #else + log(MAIN_LOG, LOG_INFO, "Signal %d -- writing databases.\n", x); #endif write_databases(); *************** *** 101,108 **** void sigaction_rehash(int x) { ! #ifndef HAVE_STRSIGNAL ! log(MAIN_LOG, LOG_INFO, "Signal %d -- rehashing.\n", x); ! #else log(MAIN_LOG, LOG_INFO, "%s -- rehashing.\n", strsignal(x)); #endif conf_read(services_config); --- 103,110 ---- void sigaction_rehash(int x) { ! #if defined(HAVE_STRSIGNAL) log(MAIN_LOG, LOG_INFO, "%s -- rehashing.\n", strsignal(x)); + #else + log(MAIN_LOG, LOG_INFO, "Signal %d -- rehashing.\n", x); #endif conf_read(services_config); *************** *** 223,227 **** } ! #ifdef HAVE_SYS_RESOURCE_H static int --- 225,229 ---- } ! #if defined(HAVE_SYS_RESOURCE_H) static int *************** *** 262,272 **** dict_insert(values, "data", (void*)RLIMIT_DATA); dict_insert(values, "stack", (void*)RLIMIT_STACK); ! #ifdef RLIMIT_VMEM dict_insert(values, "vmem", (void*)RLIMIT_VMEM); ! #else ! #ifdef RLIMIT_AS dict_insert(values, "vmem", (void*)RLIMIT_AS); #endif - #endif if ((rd = conf_get_node("rlimits")) && (dict = GET_RECORD_OBJECT(rd))) { --- 264,272 ---- dict_insert(values, "data", (void*)RLIMIT_DATA); dict_insert(values, "stack", (void*)RLIMIT_STACK); ! #if defined(RLIMIT_VMEM) dict_insert(values, "vmem", (void*)RLIMIT_VMEM); ! #elif defined(RLIMIT_AS) dict_insert(values, "vmem", (void*)RLIMIT_AS); #endif if ((rd = conf_get_node("rlimits")) && (dict = GET_RECORD_OBJECT(rd))) { *************** *** 367,376 **** break; case 'k': ! if(conf_read(services_config)) ! { printf("%s appears to be a valid configuration file.\n", services_config); ! } ! else ! { printf("%s is an invalid configuration file.\n", services_config); } --- 367,373 ---- break; case 'k': ! if (conf_read(services_config)) { printf("%s appears to be a valid configuration file.\n", services_config); ! } else { printf("%s is an invalid configuration file.\n", services_config); } *************** *** 404,416 **** version(); ! #ifdef __CYGWIN__ ! if(daemon) ! { fprintf(stderr, "Daemon mode not supported under Cygwin.\n"); daemon = 0; ! } #endif ! ! if (daemon) silent = 1; if (replay_file) { --- 401,412 ---- version(); ! if (daemon) { ! #if defined(__CYGWIN__) fprintf(stderr, "Daemon mode not supported under Cygwin.\n"); daemon = 0; ! #else ! silent = 1; #endif ! } if (replay_file) { *************** *** 464,477 **** reg_exit_func(conf_close); tools_init(); - tmp = conf_server_ping_freq(); - if (tmp != -1) ping_freq = tmp; - tmp = conf_server_ping_timeout(); - if (tmp != -1) ping_timeout = tmp; timeq_init(); gline_init(); ! sockcheck_init(); init_structs(); - modules_init(); proto_init(); alias_init(); --- 460,471 ---- reg_exit_func(conf_close); + if ((tmp = conf_server_ping_freq()) != -1) ping_freq = tmp; + if ((tmp = conf_server_ping_timeout()) != -1) ping_timeout = tmp; + modules_init(); tools_init(); timeq_init(); gline_init(); ! sockcheck_init(); /* could be modularized */ init_structs(); proto_init(); alias_init(); |
From: Entrope <en...@us...> - 2001-09-28 15:18:22
|
Update of /cvsroot/srvx/services In directory usw-pr-cvs1:/tmp/cvs-serv15382 Modified Files: configure.ac Log Message: clean up some defines Index: configure.ac =================================================================== RCS file: /cvsroot/srvx/services/configure.ac,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** configure.ac 2001/09/27 21:58:08 1.9 --- configure.ac 2001/09/28 15:18:19 1.10 *************** *** 50,56 **** EXTRA_DEFINE="-fno-builtin" ;; - *-linux*) - EXTRA_DEFINE="-D_GNU_SOURCE" - ;; *) EXTRA_DEFINE="-ansi" --- 50,53 ---- *************** *** 229,233 **** AC_ARG_ENABLE(debug, [ --enable-debug Enables debugging behaviors], ! [ CPPFLAGS="$CPPFLAGS -DDEBUG" AC_MSG_RESULT(yes)], [ AC_MSG_RESULT(no)]) --- 226,230 ---- AC_ARG_ENABLE(debug, [ --enable-debug Enables debugging behaviors], ! [ AC_DEFINE(DEBUG, 1, [Define to enable various debug behaviors.]) AC_MSG_RESULT(yes)], [ AC_MSG_RESULT(no)]) |
From: Entrope <en...@us...> - 2001-09-28 02:40:41
|
Update of /cvsroot/srvx/services/src In directory usw-pr-cvs1:/tmp/cvs-serv13791/src Modified Files: Tag: rel-1_0 sockcheck.c Log Message: fix a stupid typo that breaks sockcheck Index: sockcheck.c =================================================================== RCS file: /cvsroot/srvx/services/src/sockcheck.c,v retrieving revision 1.54.2.29 retrieving revision 1.54.2.30 diff -C2 -r1.54.2.29 -r1.54.2.30 *** sockcheck.c 2001/09/10 19:11:49 1.54.2.29 --- sockcheck.c 2001/09/28 02:40:38 1.54.2.30 *************** *** 261,265 **** dict_insert(checked_ip_dict, sci->hostname, sci); } ! if (write(pending_ip_pipe[1], name, namelen) < namelen) { log(PC_LOG, LOG_ERROR, "Error: write(pending_ip_pipe[1]) returned errno %d (%s)\n", errno, strerror(errno)); } --- 261,265 ---- dict_insert(checked_ip_dict, sci->hostname, sci); } ! if (write(pending_ip_pipe[1], buff, namelen) < namelen) { log(PC_LOG, LOG_ERROR, "Error: write(pending_ip_pipe[1]) returned errno %d (%s)\n", errno, strerror(errno)); } |
From: Entrope <en...@us...> - 2001-09-27 21:58:25
|
Update of /cvsroot/srvx/services/docs In directory usw-pr-cvs1:/tmp/cvs-serv11746/docs Added Files: opserv.help nickserv.help nickserv-not.help global.help chanserv.help Makefile.am Log Message: first step at modularizing services - the old four are gone, to be repartitioned and using a better common framework help files are moved from src/ to doc/ directory protocol backends are made dynamically loadable --- NEW FILE --- "<INDEX>" ("$b$O Help$b", "$b$O$b is the IRC Operator service, designed to give authorized users extensive information and control over the IRC network.", "${index}"); "ACCESS" ("$bACCESS$b", "/msg $O ACCESS [handle]", "Displays the access level on $b$O$b for the specified handle.", "$uSee Also:$u none"); "ADDALERT" ("$bADDALERT$b", "/msg $O ADDALERT <name> <reaction> <criteria>", "Adds the specified alert to the $b$O$b alert list.", "$uSee Also:$u delalert, alert reaction, trace criteria"); "ALERT REACTION" ("$bALERT REACTION$b", "Valid alert actions (to be taken when an alert is hit) are:", "$bNOTICE$b: Send a notice to the $b$O$b alert channel", "$bGLINE$b: Gline the user that tripped the alert", "$uSee Also:$u addalert, delalert"); "ADDBAD" ("$bADDBAD$b", "/msg $O ADDBAD <keyword>", "Adds a bad word to $b$O's$b bad word list. Bad words make any channel that has a bad word anywhere in a channel's name illegal. A list of current bad words can be displayed by $bstats bad$b.", "$uSee Also:$u delbad, stats"); "ADDSECRET" ("$bADDSECRET$b", "/msg $O ADDSECRET <keyword>", "Adds a secret channel keyword to $b$O$b's secret channel keyword list. A channel joined that has a secret channel keyword in its name is set +s by $b$O$b. A list of currently secret channel keywords is displayed by $bstats secret$b.", "$uSee Also:$u delsecret, stats"); "ADDTRUST" ("$bADDTRUST$b", "/msg $O ADDTRUST <host> <number>", "Allows the specified host to $b$O's$b have the specified amount of clones before being removed. A trusted host is exempted from normal client limits. A list of currently trusted hosts is displayed by $bstats trusted$b.", "$uSee Also:$u deltrust, stats"); "ALIAS" ("$bALIAS$b", "/msg $O ALIAS <service> <alias> <command>", "Creates an alias for the specified service's command. If the given alias is currently pointing at a different command, it will be modified.", "$bservice$b must be the canonical name of the service, not its current nick.", "$uSee Also:$u aliases, unalias"); "ALIASES" ("$bALIASES$b", "/msg $O ALIASES [service]", "Displays all active aliases for each service. If a service is provided, only aliases for that service will be shown.", "$uSee Also:$u alias, unalias"); "BAN" ("$bBAN$b", "/msg $O BAN <#channel> <hostmask>", "Bans the specified hostmask from the specified channel. If the channel is omited, then $bban$b will be done in the channel where the command was given.", "$uSee Also:$u kickban, kickbanall, nickban, unban"); "BLOCK" ("$bBLOCK$b", "/msg $O BLOCK <nick> [reason]", "GLINES the host of the specified nick for one hour. If no reason is given, uses a default reason.", "$uSee Also:$u gline, ungline"); "BROADCAST" ("$bBROADCAST$b", "/msg $O BROADCAST <message>", "Notices the specified message to all users on the network.", "Note: Usage of this command is deprecated. Use the $b$G$b service instead."); "CHANINFO" ("$bCHANINFO$b", "/msg $O CHANINFO <#channel> ", "Displays very detailed information on the specified channel. If the channel is omited, then $bchaninfo$b will be done on the channel where the command was given."); "CHLEVEL" ("$bCHLEVEL$b", "/msg $O CHLEVEL <command> <new level>", "Changes the access level an oper must have on $b$O$b to use the specified command."); "CLEARBANS" ("$bCLEARBANS$b", "/msg $O CLEARBANS <#channel> ", "Clears all bans in the specified channel. If the channel is omited, then $bclearbans$b will be done in the channel where the command was given.", "$uSee Also:$u ban, unban"); "CLEARHOST" ("$bCLEARHOST$b", "/msg $O CLEARHOST <host/nick>", "Removes any data for the given host in sockcheck's proxy test result cache.", "$uSee Also:$u hostscan"); "CLEARMODES" ("$bCLEARMODES$b", "/msg $O CLEARMODES <#channel> ", "Clears the specified channel of all modes. If the channel is omited, then $bclearmodes$b will be done in the channel where the command was given.", "$uSee Also:$u mode"); "CLONE" ("$bCLONE$b", "/msg $O CLONE <sub-command> <sub-command arguments>", "Creats and manipulates a fake user. Sub-commands for $bclone$b are:", "$bADD$b: Adds a new clone. Arguments: <nickname> <user@host> <info>", "$bREMOVE$b: Removes a clone. Arguments: <nickname>", "$bJOIN$b: Joins a clone to a channel. Arguments: <nickname> <channel>", "$bPART$b: Parts a clone from a channel. Arguments: <nickname> <channel>", "$bOP$b: Ops a clone in a channel. Arguments: <nickname> <channel>", "$bSAY$b: Makes a clone say something to a channel. Arguments: <nickname> <channel> <text>"); "COLLIDE" ("$bCOLLIDE$b", "/msg $O COLLIDE <nick> <username> <host> <description>", "Creates a clone with the specified properties, colliding any existing user with the same nick.", "$uSee Also:$u clone"); "DEFPROXY" ("$bDEFPROXY$b", "/msg $O DEFPROXY <definition>", "Inserts a proxy check definition into the sockcheck database. Extreme care should be used with this command."); "DELALERT" ("$bDELALERT$b", "/msg $O DELALERT <alert> [alert]...", "Remove the specified alerts from the $b$O$b alert list.", "$uSee Also:$u addalert, stats"); "DELBAD" ("$bDELBAD$b", "/msg $O DELBAD <keyword>", "Deletes a bad word from $b$O's$b bad word list. Bad words make any channel that has a bad word anywhere in a channel's name illegal. A list of current bad words can be displayed by $bstats bad$b.", "$uSee Also:$u addbad, stats"); "DELSECRET" ("$bDELSECRET$b", "/msg $O DELSECRET <keyword>", "Deletes a secret channel keyword from $b$O's$b secret channel keyword list. A channel joined that has a secret channel keyword in its name is set +s by $b$O$b. A list of currently secret channel keywords is displayed by $bstats secret$b.", "$uSee Also:$u addsecret, stats"); "DELTRUST" ("$bDELTRUST$b", "/msg $O DELTRUST <host>", "Deletes a trusted host from $b$O's$b trusted hosts list. A trusted host is exempted from normal client limits. A list of currently trusted hosts is displayed by $bstats trusted$b.", "$uSee Also:$u addtrust, stats"); "DEOP" ("$bDEOP$b", "/msg $O DEOP <#channel> <nick> ...", "Deops the specified user from the specified channel. If the channel is omited, then $bdeop$b will be done in the channel where the command was given.", "$uSee Also:$u deopall, op, opall"); "DEOPALL" ("$bDEOPALL$b", "/msg $O DEOPALL <#channel> ", "Deops all members of the specified channel. If the channel is omited, then $bdeopall$b will be done in the channel where the command was given.", "$uSee Also:$u deop, op, opall"); "DIE" ("$bDIE$b", "/msg $O DIE <reason>", "SQUIT srvx with the given reason and shuts it down.", "$uSee Also:$u reconnect, restart"); "DISABLECOM" ("$bDISABLECOM$b", "/msg $O DISABLECOM <command>", "Disables an $b$O$b command completely. You cannot disable the $benablecom$b command for obvious reasons.", "$uSee Also:$u enablecom, showdiscom"); "DUMP" ("$bDUMP$b", "/msg $O DUMP <raw line>", "Dumps a raw server message into the stream. Unlike $braw$b, $bdump$b checks line syntax before sending it, making it much safer to use then $braw$b. If $bdump$b detects a syntax error in the line, it is not sent. It is $bHIGHLY$b suggested that you use $bdump$b instead of $braw$b.", "$uSee Also:$u raw"); "ENABLECOM" ("$bENABLECOM$b", "/msg $O ENABLECOM <command>", "Enables the specified disabled $b$O$b command. A list of disabled $b$O$b commands can be found from $bshowdiscom$b.", "$uSee Also:$u disablecom, showdiscom"); "GAG" ("$bGAG$b", "/msg $O GAG <mask> <reason>", "Sets a complete services-wide ignore on all users matching the provided mask. All services will completely ignore all private messages or notices from gagged users, who are only notified when a gag goes into effect, or they sign onto the network. Gags have no effect on opers, and as a safety feature, only affect the first 250 matching users.", "$uSee Also:$u gag, ungag, trace"); "GAGS" ("$bGAGS$b", "/msg $O GAGS ", "Displays all active gags and relevant information.", "$uSee Also:$u gag, ungag"); "GLINE" ("$bGLINE$b", "/msg $O GLINE <user@host> <duration in seconds> <reason>", "Issues a GLINE (network ban) on the network for the speicified user@host for the specified duration (making the expiration time: net time + duration).", "$uSee Also:$u trace, ungline"); "GTRACE" ("$bGTRACE$b", "/msg $O GTRACE <action> <criteria>", "Searches through the glines, much like $bTRACE$b does for users.", "$uSee Alsu:$u trace, gtrace action, gtrace criteria"); "GTRACE ACTION" ("$bGTRACE ACTION$b", "Options for the action in $bgtrace$b are:", "$bprint$b: Display the glines (mask, issuer, expiration time, reason)", "$bcount$b: Count the number of matching glines"); "GTRACE CRITERIA" ("$bGTRACE CRITERIA$b", "Criteria and values for $bgtrace$b (a search with $bgtrace$b must match all the criteria you give):", "$bMASK$b user@host Specifies a mask to search for.", "$bLIMIT$b count Limits the number of matching glines.", "$bREASON$b reason Looks for glines with the given reason.", "$bISSUER$b handle Looks for glines issued by the given handle.", "$bAFTER$b interval Looks for glines that expire more than $binterval$b in the future."); "HELP" ("$bHELP$b", "/msg $O HELP [topic/command]", "Displays help information for the specified topic or command. If no topic or command is specified, help returns basic $bhelp$b information for $b$O$b."); "HOSTSCAN" ("$bHOSTSCAN$b", "/msg $O HOSTSCAN <host/nick>", "Adds the speicified host to the proxycheck queue. If the host is found to have a running proxy, then that host is GLINED for an hour.", "$uSee Also:$u trace"); "INVITEME" ("$bINVITEME$b", "/msg $O INVITEME [nick]", "Invites the specified user to $b$O's$b message channel. If no nick is given, the user who issued the command is invited."); "ISON" ("$bISON$b", "/msg $O ISON <nick>", "Lists all channels the specified user is in."); "JOIN" ("$bJOIN$b", "/msg $O JOIN <#channel> ", "Makes $b$O$b join the specified channel.", "$uSee Also:$u part"); "JUMP" ("$bJUMP$b", "/msg $O JUMP <uplink>", "Causes srvx to connect to the specified uplink.", "$uSee Also:$u die, reconnect, restart"); "KICK" ("$bKICK$b", "/msg $O KICK <#channel> <nick> [reason]", "Kicks the specified user from the specified channel. If the channel is omited, then $bkick$b will be done in the channel where the command was given.", "$uSee Also:$u ban, kickall, kickban, kickbanall"); "KICKALL" ("$bKICKALL$b", "/msg $O KICKALL <#channel> [reason]", "Kicks all users in the specified channel except for the user issueing the command. If the channel is omited, then $bkickall$b will be done in the channel where the command was given.", "$uSee Also:$u ban, kick, kickbanall"); "KICKBAN" ("$bKICKBAN$b", "/msg $O KICKBAN <#channel> <nick> [reason]", "Kicks and bans the specified user. $b$O$b determines the hostmask to ban from the nick specified. If the channel is omited, then $bkickban$b will be done in the channel where the command was given.", "$uSee Also:$u ban, kickall, kickbanall, nickban"); "KICKBANALL" ("$bKICKBANALL$b", "/msg $O KICKBANALL <#channel> [reason]", "Kick and bans all members of the specified channel except for the user issuing the command. If the channel is omited, then $bkickbanall$b will be done in the channel where the command was given.", "$uSee Also:$u ban, kick, kickban"); "LOG" ("$bLOG$b", "/msg $O LOG <criteria> <value> [<criteria> <value> ...]", "Searches services logs based on critera specified and displays the results. A list of criteria can be found in $bhelp log criteria$b."); "LOG CRITERIA" ("$bLOG CRITERIA$b", "Criteria and values for $blog$b (a search with $blog$b must match all specified items):", "$bSEVERITY$b -", " $bINFO$b: Displays info log.", " $bWARNING$b: Displays warning log.", " $bERROR$b: Displays error log.", " $bOTHER$b: Displays other logs.", "$bTYPE$b -", " $bMAIN$b: Displays main log.", " $bDEBUG$b: Displays debug log.", " $bCHANSERV$b: Displays $b$C$b log.", " $bOPSERV$b: Displays $b$O$b log.", " $bNICKSERV$b: Displays $b$N$b log.", " $bGLOBAL$b: Displays $b$G$b log.", " $bPROXYCHECK$b: Displays proxycheck log.", "$bTEXT$b: Displays results that match the value of $btext$b.", "$bLIMIT$b: Limits results printed by $b$O$b to that of the value of $blimit$b."); "LOGINFO" ("$bLOGINFO$b", "/msg $O LOGINFO <log>", "Shows the currently logged severity levels for $blog$b, which is one of the logs listed in $bhelp log criteria$b.", "$uSee Also:$u MODLOG"); "MODE" ("$bMODE$b", "/msg $O MODE <#channel> <+/- mode>", "Sets the specified modes on a channel. If the channel is omited, then $bmode$b will be done in the channel where the command was given.", "$uSee Also:$u ban, deop, kickban, nickban, op"); "MODERATE" ("$bMODERATE$b", "/msg $O MODERATE <#channel> ", "Sets the speicified channel to +m and all present users in that channel will be set to +v. If the channel is omited, then $bmoderate$b will be done in the channel where the command was given.", "$uSee Also:$u unmoderate"); "MODLOG" ("$bMODLOG$b", "/msg $O MODLOG <log> <level-modifiers>", "Modifies the set of severity levels logged for the specified log file. See $bhelp log criteria$b for the list of logs and severity levels.", "The $blevel-modifiers$b may be of the form $b+error-info$b to enable error-level logging and disable info-level logging.", "$uSee Also:$u LOGINFO"); "NICKBAN" ("$bNICKBAN$b", "/msg $O NICKBAN <#channel> <nick>", "Bans the specified user. $b$O$b will find the hostmask of the specified nick and ban it in the specified channel. If the channel is omited, then $bnickban$b will be done in the channel where the command was given.", "$uSee Also:$u ban, kickban"); "OP" ("$bOP$b", "/msg $O OP <#channel> <nick> [<nick> ...]", "Ops specified nicknames the specified channel. If the channel is omited, then $bop$b will be done in the channel where the command was given.", "$uSee Also:$u deop, deopall, opall"); "OPALL" ("$bOPALL$b", "/msg $O OPALL <#channel> ", "Ops all members of the specified channel. If the channel is omited, then $bopall$b will be done in the channel where the command was given.", "$uSee Also:$u deopall"); "OPERMSG" ("$bOPERMSG$b", "/msg $O OPERMSG <message>", "Sends the specified message to all operators that are online.", "Note: Usage of this command is deprecated, use the $b$G$b service instead."); "PART" ("$bPART$b", "/msg $O PART <#channel> ", "Makes $b$O$b leave the specified channel. If the channel is omited, then $bpart$b will be done in the channel where the command was given.", "$uSee Also:$u join"); "QUERY" ("$bQUERY$b", "/msg $O QUERY <option>", "Displays the value or subvalues of the given option.", "$uSee Also:$u set"); "RAW" ("$bRAW$b", "/msg $O RAW <raw line>", "Dumps a raw server message into the stream. Unlike $bdump$b, $braw$b does $bNOT$b check line syntax before sending it, making $braw$b dangerous. It will however, after the line is sent, warn of a parse error if there is a problem with the line. It is $bHIGHLY$b suggested that $bdump$b be used instead of $braw$b because it is much safer.", "$uSee Also:$u dump"); "READHELP" ("$bREADHELP$b", "/msg $O READHELP ", "Re-reads the $b$O$b help file from disk."); "RECONNECT" ("$bRECONNECT$b", "/msg $O RECONNECT ", "Forces srvx to reconnect to its current uplink.", "$uSee Also:$u die, jump, restart"); "REFRESHG" ("$bREFRESHG$b", "/msg $O REFRESHG ", "Re-issues all GLINES in $b$O's$b database. Usually used for newly joining or desynched servers.", "$uSee Also:$u gline, ungline"); "REOPEN" ("$bREOPEN$b", "/msg $O REOPEN", "Close and re-open all the log files.", "$uSee Also:$u log, loginfo, modlog"); "RESERVE" ("$bRESERVE$b", "/msg $O RESERVE <nickname> <user> <host> <comment>", "Used to ban, protect, or jupe a given nick.", "$uSee Also:$u unreserve"); "RESTART" ("$bRESTART$b", "/msg $O RESTART <reason>", "Causes srvx to SQUIT with the reason you specified and restart. You $bmust$b provide a reason.", "$uSee Also:$u die, reconnect"); "SET" ("$bSET$b", "/msg $O SET <option> <value>", "Modifies the internal configuration database. Currently, only keys that have been previously set may be modified.", "$uSee Also:$u query"); "SHOWDISCOM" ("$bSHOWDISCOM$b", "/msg $O SHOWDISCOM ", "Displays a list of disabled $b$O$b commands.", "$uSee Also:$u disablecom, enablecom"); "STATS" ("$bSTATS$b", "/msg $O STATS <subject>", "Displays statistics about a specified subject. Subjects include:", "$bBAD$b: Current list of bad words.", "$bGLINES$b: Reports the current number of glines.", "$bLINKS$b: Information about the link to the network.", "$bMAX$b: The max clients seen on the network.", "$bNETWORK$b: Displays network information such as total users and how many users are on each server.", "$bOPERS$b: A list of users that are currently +o.", "$bRESERVED$b: The list of currently reserved nicks.", "$bSECRET$b: The list of current secret channel words.", "$bTRUSTED$b: The list of currently trusted hosts.", "$bUPTIME$b: Srvx uptime, lines processed, and CPU time.", "$bPROXYCHECK$b: Information about proxy checking in srvx.", "$bALERTS$b: The list of current \"alerts\"."); "TIMECMD" ("$bTIMECMD$b", "/msg $O TIMECMD <command>", "Determines how long it takes for the specified $b$O$b command to complete."); "TRACE" ("$bTRACE$b", "/msg $O TRACE <action> <criteria> <value> [<criteria> <value> ...]", "Searchs through the current users for those matching the specified criteria, and appies the specified action to them. A list of actions can be found in $bhelp trace action$b and a list of criteria in $bhelp trace criteria$b.", "$uSee Also:$u help trace action, help trace criteria"); "TRACE ACTION" ("$bTRACE ACTION$b", "Options for action in $btrace$b are:", "$bPRINT$b: Display the hostmask to you.", "$bCOUNT$b: Count all matching users.", "$bSCAN$b: Perform a proxy scan on the host.", "$bKILL$b: Kill matching clients.", "$bGLINE$b: Issue a 1-hour gline to the host.", "$bGAG$b: Gag all matching users."); "TRACE CRITERIA" ("$bTRACE CRITERIA$b", "Criteria and values for $btrace$b (a search with $btrace$b must match all specified items):", "$bMASK$b nick!user@host Specifies a full hostmask to search for.", "$bNICK$b nick Specifies a nick to search for.", "$bIDENT$b user Specifies a username to search for.", "$bHOST$b host Specifies a hostname to search for.", "$bINFO$b infoline Specifies a user's info to search for.", "$bIP$b 127.0.0.1 Specifies an IP to search for (independent of hostname).", "$bCHANNEL$b #target Specifies a channel the client must be in..", "$bLIMIT$b 50 Limits the number of responses to a certain number.", "$bREASON$b reason Reason for kill or gline (must be listed last)."); "UNALIAS" ("$bUNALIAS$b", "/msg $O UNALIAS <service> <alias>", "Removes an alias from the specified services. You can get a list of aliases in use for all services with $baliases$b.", "$uSee Also:$u alias, aliases"); "UNBAN" ("$bUNBAN$b", "/msg $O UNBAN <#channel> <hostmask>", "Removes a banned hostmask from a channel's banlist. If the channel is omited, then $bunban$b will be done in the channel where the command was given.", "$uSee Also:$u ban"); "UNGAG" ("$bUNGAG$b", "/msg $O UNGAG <hostmask>", "Ungags a gaged hostmask and displays how many users were affected by $bungag$b. You can get a list of gaged hostmasks from $bgags$b.", "$uSee Also:$u gag, gags"); "UNGLINE" ("$bUNGLINE$b", "/msg $O UNGLINE <user@host>", "Removes a gline from the network before it expires.", "$uSee Also:$u gline"); "UNMODERATE" ("$bUNMODERATE$b", "/msg $O UNMODERATE <#channel> ", "Sets mode -m to the channel specified. If the channel is omited, then $bunmoderate$b will be done in the channel where the command was given.", "$uSee Also:$u moderate"); "UNRESERVE" ("$bUNRESERVE$b", "/msg $O UNRESERVE <nick>", "Removes a nick from $b$O's$b reserve list.", "$uSee Also:$u reserve"); "UNWARN" ("$bUNWARN$b", "/msg $O UNWARN <channel>", "Deletes the activity warning for a channel.", "$uSee Also:$u warn, warnlist"); "VERSION" ("$bVERSION$b", "/msg $O VERSION ", "Sends you the srvx version and all version information for $b$C$b, $b$O$b, $b$N$b, and $b$G$b."); "WARN" ("$bWARN$b", "/msg $O WARN <channel> [reason]", "Adds an activity warning to the channel.", "$uSee Also:$u unwarn, warnlist"); "WARNLIST" ("$bWARNLIST$b", "/msg $O WARNLIST", "Lists all channels whom have activity warnings placed on them.", "$uSee Also:$u warn, unwarn"); "WHOIS" ("$bWHOIS$b", "/msg $O WHOIS <nick>", "Displays information on a user."); "WRITE" ("$bWRITE$b", "/msg $O WRITE ", "Writes the $b$O$b database to disk.", "$uSee Also:$u writeall"); "WRITEALL" ("$bWRITEALL$b", "/msg $O WRITEALL ", "Writes the all databases to disk.", "$uSee Also:$u write"); --- NEW FILE --- "<INDEX>" ("$b$N Help$b", "$b$N$b is a nickname and authentication service, intended to serve as a central authentication point for all other network services. $b$C$b, $b$O$b, and $b$G$b all depend on $b$N$b to verify that users are valid. The other component allows for ownership of a nickname, but is not necessarily enabled.", "$b$N$b command categories:", " HANDLE Handle management.", " NICK Nick management.", " OTHERS Other functions.", " COMMANDS A list of all available commands.", ); "HANDLE" ("Handles are the way that $b$C$b identifies you for access to channels. They are similar to IRC nicks, but only have meaning to $b$C$b and $b$N$b. Until you authenticate to $b$N$b on a handle, you can only use the $bREGISTER$b and $bAUTH$b commands.", "Handle management commands are:", " REGISTER Register a new handle.", " AUTH Authenticate yourself to $b$N$b using an existing handle.", " PASS Change your handle's password.", " ADDMASK Add a hostmask to your handle.", " DELMASK Remove a hostmask from your handle.", " SET Set per-handle options.", " UNREGISTER Unregister a handle.", " RENAME Renames a handle" ); "NICK" ("Nick registration may be either enabled or disabled, based upon the $b$N$b configuration. If it is enabled, people may register IRC nicknames to be associated with their handles, and will be able to request a KILL for anyone using a registered nickname.", "Nick management commands are:", " REGNICK Register a nickname.", " UNREGNICK Unregister a nickname.", " KILL Request a KILL for someone using your nick." ); "OTHERS" ("Other commands are:", " USERINFO Displays the handle a user is authenticated to.", " HANDLEINFO Displays information about a handle.", " VERSION $b$N$b version information.", " STATUS $b$N$b status.", " SEARCH Search for handles by various criteria.", " HELP Get help on $b$N$b." ); "COMMANDS" ("${index}"); "ADDMASK" ("$bADDMASK$b", "/msg $N ADDMASK [<user@host>]", "Adds the specified user@host to the handle you are authenticated to with $b$N$b. If no mask is given, it uses your current mask.", "$uSee Also:$u auth, delmask"); "ALLOWAUTH" ("$bALLOWAUTH$b", "/msg $N ALLOWAUTH <nick> <handle>", "Allows the specified nick to $bauth$b to the specified handle. $bAllowauth$b does NOT add the hostmask of that nick to the specified handle.", "$uSee Also:$u addmask, auth"); "AUTH" ("$bAUTH$b", "/msg $n AUTH [<handle>] <password>", "Authenticates yourself with $b$N$b to the specified handle. You must use $bauth$b before you have any access to network services, including channels that are registered with $b$C$b.", "If you omit the handle, it uses your current nick as your handle.", "NOTE: It is strongly recommended that you use the long form ($n) rather than just nick ($N) for this command, to protect against impersonators. Most IRC clients can be set to send this command whenever you join the network, which saves you typing.", "$uSee Also:$u pass"); "DELMASK" ("$bDELMASK$b", "/msg $N DELMASK <user@host>", "Removes a hostmask from the handle you are authenticated on.", "$uSee Also:$u addmask"); "HANDLEINFO" ("$bHANDLEINFO$b", "/msg $N HANDLEINFO <nick|*handle>", "Displays infomation on the specified handle, including the date the handle was registered, the last time that person was seen, the handle's $b$N$b info, its flags, its hostmask(s), its channels, and the handle's current nickname.", "You may use *Handle instead of Nick as the name argument; the * makes $N use the name of a handle directly (useful if the user is not online).", "$uSee Also:$u nickinfo, userinfo, handle flags"); "HANDLE FLAGS" ("$bHANDLE FLAGS$b", "The following flags on handles are defined:", "$bS$b $O access suspended", "$bp$b Use PRIVMSG for messages rather than NOTICE", "$bh$b User is a helper (can turn god mode on/off for self)", "$bg$b God mode (security override for IRC staff)", "$bs$b Handle suspended", "$bc$b Use mIRC color codes in responses", "$bf$b Handle frozen/on vacation (will not be unregistered for inactivity; cleared when handle is authenticated against)", "$bn$b No-delete (will never be unregistered for inactivity)", "$uSee Also:$u handleinfo, set"); "HELP" ("$bHELP$b", "/msg $N HELP [topic/command]", "Displays help information for the specified topic or command. If no topic or command is specified, $bhelp$b returns basic help information for $b$N$b."); "KILL" ("$bKILL$b", "/msg $N KILL <nick>", "Kills the specified nick. You must be authenticated to the handle that has ownership of the specified nick."); "NICKINFO" ("$bNICKINFO$b", "/msg $N NICKINFO <nick>", "Displays information on the nick specified.", "$uSee Also:$u handleinfo, userinfo"); "OADDMASK" ("$bOADDMASK$b", "/msg $N OADDMASK <nick|*handle> <user@host>", "Adds a hostmask to the specified handle.", "You may use *Handle instead of Nick as the name argument; the * makes $N use the name of a handle directly (useful if the user is not online).", "$uSee Also:$u odelmask"); "ODELMASK" ("$bODELMASK$b", "/msg $N ODELMASK <nick|*handle> <user@host>", "Removes a hostmask from the specified handle.", "You may use *Handle instead of Nick as the name argument; the * makes $N use the name of a handle directly (useful if the user is not online).", "$uSee Also:$u oaddmask"); "OREGISTER" ("$bOREGISTER$b", "/msg $n OREGISTER <handle> <password> <user@host/nick>", "Registers a handle with $b$N$b using the specified handle, password, and user@host. If a nick of an online user is specified, then that user's user@host is used.", "$uSee Also:$u oregnick, ounregister, ounregnick"); "OREGNICK" ("$bOREGNICK$b", "/msg $N OREGNICK [<nick> <nick|*handle>]", "Registers specified nick to the specified handle. If nick and handle are not specified, then $boregnick$b registers your current nick to the handle you are authenticated to.", "You may use *Handle instead of Nick as the name argument; the * makes $N use the name of a handle directly (useful if the user is not online).", "$uSee Also:$u oregister, ounregister, ounregnick"); "OSET" ("$bOSET$b", "/msg $N OSET <nick|*handle> [<setting> <value>]", "Changes a handle's settings for srvx. Settings are:", "$bINFO$b: Sets infoline for $b$N$b which can be viewed with $bhandleinfo$b.", "$bWIDTH$b: Sets the width srvx will wrap text to.", "$bCOLOR$b: Sets whether srvx will use $bbold$b in text it sends to that handle.", "$bSTYLE$b: Sets what style srvx will use for text it sends. $bSTYLE$b can be either $bDef$b or $bZoot$b (default).", "$bPASSWORD$b: Sets user's password.", "$bFLAGS$b: Changes handle flags for user.", "$bLEVEL$b: Sets $O access level.", "You may use *Handle instead of Nick as the name argument; the * makes $N use the name of a handle directly (useful if the user is not online).", "$uSee Also:$u handleinfo, nickinfo, userinfo, handle flags"); "OUNREGISTER" ("$bOUNREGISTER$b", "/msg $N OUNREGISTER <nick|*handle>", "Un-registers the specified handle, and any nicks that have been registered to that handle.", "You may use *Handle instead of Nick as the name argument; the * makes $N use the name of a handle directly (useful if the user is not online).", "$uSee Also:$u oregister, oregnick, ounregnick"); "OUNREGNICK" ("$bOUNREGNICK$b", "/msg $N OUNREGNICK <nick>", "Un-registers a nick that was previously registered to a handle.", "$uSee Also:$u oregister, oregnick, ounregister"); "PASS" ("$bPASS$b", "/msg $n PASS <oldpass> <newpass>", "Changes your $b$N$b password.", "$uSee Also:$u auth"); "READHELP" ("$bREADHELP$b", "/msg $N READHELP ", "Re-reads the $b$N$b help file from disk. You must be an IRC operator to use this command."); "REGISTER" ("$bREGISTER$b", "/msg $n REGISTER <handle> <password>", "Registers a specified handle with $b$N$b, adding your current user@host to your new handle. You will be required to know the password you specify with $bregister$b in order to be able to use $bauth$b to authenticate to your handle.", "NOTE: It is strongly recommended that you use the long form ($n) rather than just nick ($N) for this command, to protect against impersonators.", "$uSee Also:$u auth, regnick, unregister, unregnick"); "REGNICK" ("$bREGNICK$b", "/msg $N REGNICK ", "Registers your current nick to the handle you are authenticated to.", "$uSee Also:$u register, unregister, unregnick"); "SET" ("$bSET$b", "/msg $N SET [<setting> <value>]", "Changes your handle settings for srvx. Settings are:", "$bINFO$b: Your infoline for $b$N$b (which can be viewed with the $bhandleinfo$b command).", "$bWIDTH$b: The width you want srvx to wrap text it sends you.", "$bCOLOR$b: If set, $b$N$b and $b$C$b will use $bbold$b and $uunderlines$u in text they send you.", "$bPRIVMSG$b: If set, $b$N$b and $b$C$b will send text to you using PRIVMSGs rather than NOTICEs.", "$bSTYLE$b: The style you want srvx to use for channel userlists it sends you. $bSTYLE$b can be either $bDef$b or $bZoot$b (default).", " ", "$bset$b with no arguments returns your current settings.", "$uSee Also:$u handleinfo, nickinfo, userinfo"); "STATUS" ("$bSTATUS$b", "/msg $N STATUS ", "Displays information about the status of $b$N$b, including the total number of handles and nicks that are registered in its database, and how many nicks are registered to your handle (if you are authenticated to one)."); "UNREGISTER" ("$bUNREGISTER$b", "/msg $n UNREGISTER <password>", "Un-registers the handle you are authenticated with, and any nicks that have been registered to that handle.", "$uSee Also:$u register, regnick, unregnick"); "UNREGNICK" ("$bUNREGNICK$b", "/msg $N UNREGNICK [nick]", "Un-registers a nick that was previously registered to your handle. If you do not specify a nick, your current nick will be un-registered.", "$uSee Also:$u register, regnick, unregister"); "USERINFO" ("$bUSERINFO$b", "/msg $N USERINFO <nick>", "Shows what handle the nick specified is authenticated to.", "$uSee Also:$u auth, handleinfo"); "VERSION" ("$bVERSION$b", "/msg $N VERSION", "Sends you the srvx version and some additional version information that is specific to $b$N$b."); "WRITE" ("$bWRITE$b", "/msg $N WRITE", "Writes the $b$N$b database to disk."); "RENAME" ("$bRENAME$b", "/msg $N RENAME <current-handle> <new-handle>", "Renames a handle. This command is only accessible to helpers and IRC operators."); "VACATION" ("$bVACATION$b", "/msg $N VACATION", "Marks your handle as \"on vacation\" until the next time you authenticate to $N.", "While you are \"on vacation\", your handle will not be deleted for inactivity."); "SEARCH" ("$bSEARCH$b", "/msg $N SEARCH <action> <criteria>", "Searches for handles matching the critera, and then does something to them.", "$uSee Also:$u search action, search criteria"); "SEARCH ACTION" ("$bSEARCH ACTION$b", "The following actions are valid:", " PRINT - Print matching handles", " COUNT - Count matching handles", " UNREGISTER - Unregister matching handles", "$uSee Also:$u search, search criteria"); "SEARCH CRITERIA" ("$bSEARCH CRITERIA$b", "The following handle search criteria are valid. Each takes an additional argument, giving the actual criteria:", " LIMIT - Limits the number of matches", " FLAGS - Bits that must be turned on (e.g. +h) and/or off (e.g. -S) in a handle", " REGISTERED - Handles registered at least this long ago", " SEEN - Handles not seen for at least this long", " HANDLEMASK - A glob that must match the handle name", " NICKMASK - A glob that must match a nick registered to the handle", " HOSTMASK - A glob that must match a hostmask for the handle", "$uSee Also:$u search, search action"); --- NEW FILE --- "<INDEX>" ("$b$N Help$b", "$b$N$b is a nickname and authentication service, intended to serve as a central authentication point for all other network services. $b$C$b, $b$O$b, and $b$G$b all depend on $b$N$b to verify that users are valid.", "$b$N$b command categories:", " HANDLE Handle management.", " OTHERS Other functions.", " COMMANDS A list of all available commands.", " NOT NICKSERV A note on what this service does and does not do." ); "HANDLE" ("Handles are the way that $b$C$b identifies you for access to channels. They are similar to IRC nicks, but only have meaning to $b$C$b and $b$N$b. Until you authenticate to $b$N$b on a handle, you can only use the $bREGISTER$b and $bAUTH$b commands.", "Handle management commands are:", " REGISTER Register a new handle.", " AUTH Authenticate yourself to $b$N$b using an existing handle.", " PASS Change your handle's password.", " ADDMASK Add a hostmask to your handle.", " DELMASK Remove a hostmask from your handle.", " SET Set per-handle options.", " UNREGISTER Unregister a handle.", " RENAME Renames a handle" ); "OTHERS" ("Other commands are:", " USERINFO Displays the handle a user is authenticated to.", " HANDLEINFO Displays information about a handle.", " VERSION $b$N$b version information.", " STATUS $b$N$b status.", " SEARCH Search for handles by various criteria.", " HELP Get help on $b$N$b." ); "COMMANDS" ("${index}"); "NOT NICKSERV" ("$bNOT NICKSERV$b", "This $b$N$b is not a standard NickServ.", "Most NickServs provide \"nick ownership\", and will either issue a /KILL or a forced nick change if you try to use a registered nick without providing the password.", "This $b$N$b will not do this. It only allows you to register a $bhandle$b, which identifies users to $b$C$b. In a way, it is a virtual nick. When you authenticate to $b$N$b, it does not care what your IRC nick is -- only what your handle is.", "$b$N$b can tell you what handle a user is authenticated to using the $bUSERINFO$b command. Any problems with handle registration or $b$N$b should be directed to the normal support channel."); "ADDMASK" ("$bADDMASK$b", "/msg $N ADDMASK [<user@host>]", "Adds the specified user@host to the handle you are authenticated to with $b$N$b. If no mask is given, it uses your current mask.", "$uSee Also:$u auth, delmask"); "ALLOWAUTH" ("$bALLOWAUTH$b", "/msg $N ALLOWAUTH <nick> <handle>", "Allows the specified user to $bauth$b to the specified handle. $bAllowauth$b does NOT add the hostmask of that nick to the specified handle.", "$uSee Also:$u addmask, auth"); "AUTH" ("$bAUTH$b", "/msg $n AUTH [<handle>] <password>", "Authenticates yourself with $b$N$b to the specified handle. You must use $bauth$b before you have any access to network services, including channels that are registered with $b$C$b.", "If you omit the handle, it uses your current nick as your handle.", "$uSee Also:$u pass"); "DELMASK" ("$bDELMASK$b", "/msg $N DELMASK <user@host>", "Removes a hostmask from the handle you are authenticated on.", "$uSee Also:$u addmask"); "HANDLEINFO" ("$bHANDLEINFO$b", "/msg $N HANDLEINFO <nick|*handle>", "Displays infomation on the specified handle, including the date the handle was registered, the last time that person was seen, the handle's $b$N$b info, its flags, its hostmask(s), its channels, and the handle's current nickname.", "You may use *Handle instead of Nick as the name argument; the * makes $N use the name of a handle directly (useful if the user is not online).", "$uSee Also:$u userinfo, handle flags"); "HANDLE FLAGS" ("$bHANDLE FLAGS$b", "The following flags on handles are defined:", "$bS$b $O access suspended", "$bp$b Use PRIVMSG for messages rather than NOTICE", "$bh$b User is a helper (can turn god mode on/off for self)", "$bg$b God mode (security override for IRC staff)", "$bs$b Handle suspended", "$bc$b Use mIRC color codes in responses", "$bf$b Handle frozen/on vacation (will not be unregistered for inactivity; cleared when handle is authenticated against)", "$bn$b No-delete (will never be unregistered for inactivity)", "$uSee Also:$u handleinfo, set"); "HELP" ("$bHELP$b", "/msg $N HELP [topic/command]", "Displays help information for the specified topic or command. If no topic or command is specified, $bhelp$b returns basic help information for $b$N$b."); "OADDMASK" ("$bOADDMASK$b", "/msg $N OADDMASK <nick|*handle> <user@host>", "Adds a hostmask to the specified handle.", "You may use *Handle instead of Nick as the name argument; the * makes $N use the name of a handle directly (useful if the user is not online).", "$uSee Also:$u odelmask"); "ODELMASK" ("$bODELMASK$b", "/msg $N ODELMASK <nick|*handle> <user@host>", "Removes a hostmask from the specified handle.", "You may use *Handle instead of Nick as the name argument; the * makes $N use the name of a handle directly (useful if the user is not online).", "$uSee Also:$u oaddmask"); "OREGISTER" ("$bOREGISTER$b", "/msg $n OREGISTER <handle> <password> <user@host/nick>", "Registers a handle with $b$N$b using the specified handle, password, and user@host. If a nick of an online user is specified, then that user's user@host is used.", "$uSee Also:$u ounregister"); "OSET" ("$bOSET$b", "/msg $N OSET <nick|*handle> [<setting> <value>]", "Changes a handle's settings for srvx. Settings are:", "$bINFO$b: Sets infoline for $b$N$b which can be viewed with $bhandleinfo$b.", "$bWIDTH$b: Sets the width srvx will wrap text to.", "$bCOLOR$b: Sets whether srvx will use $bbold$b in text it sends to that handle.", "$bSTYLE$b: Sets what style srvx will use for text it sends. $bSTYLE$b can be either $bDef$b or $bZoot$b (default).", "You may use *Handle instead of Nick as the name argument; the * makes $N use the name of a handle directly (useful if the user is not online).", "$uSee Also:$u handleinfo, userinfo"); "OUNREGISTER" ("$bOUNREGISTER$b", "/msg $N OUNREGISTER <nick|*handle>", "Un-registers the specified handle.", "You may use *Handle instead of Nick as the name argument; the * makes $N use the name of a handle directly (useful if the user is not online).", "$uSee Also:$u oregister"); "PASS" ("$bPASS$b", "/msg $n PASS <oldpass> <newpass>", "Changes your $b$N$b password.", "$uSee Also:$u auth"); "READHELP" ("$bREADHELP$b", "/msg $N READHELP ", "Re-reads the $b$N$b help file from disk. You must be an IRC operator to use this command."); "REGISTER" ("$bREGISTER$b", "/msg $n REGISTER <handle> <password>", "Registers a specified handle with $b$N$b, adding your current user@host to your new handle. You will be required to know the password you specify with $bregister$b in order to be able to use $bauth$b to authenticate to your handle.", "$uSee Also:$u auth, unregister"); "SET" ("$bSET$b", "/msg $N SET [<setting> <value>]", "Changes your handle settings for srvx. Settings are:", "$bINFO$b: Your infoline for $b$N$b (which can be viewed with the $bhandleinfo$b command).", "$bWIDTH$b: The width you want srvx to wrap text it sends you.", "$bCOLOR$b: If set, $b$N$b and $b$C$b will use $bbold$b and $uunderlines$u in text they send you.", "$bPRIVMSG$b: If set, $b$N$b and $b$C$b will send text to you using PRIVMSGs rather than NOTICEs.", "$bSTYLE$b: The style you want srvx to use for channel userlists it sends you. $bSTYLE$b can be either $bDef$b or $bZoot$b (default).", " ", "$bset$b with no arguments returns your current settings.", "$uSee Also:$u handleinfo, userinfo"); "STATUS" ("$bSTATUS$b", "/msg $N STATUS ", "Displays information about the status of $b$N$b, including the total number of handles are registered in its database."); "UNREGISTER" ("$bUNREGISTER$b", "/msg $n UNREGISTER <password>", "Un-registers the handle you are authenticated with.", "$uSee Also:$u register"); "USERINFO" ("$bUSERINFO$b", "/msg $N USERINFO <nick>", "Shows what handle the nick specified is authenticated to.", "$uSee Also:$u auth, handleinfo"); "VERSION" ("$bVERSION$b", "/msg $N VERSION", "Sends you the srvx version and some additional version information that is specific to $b$N$b."); "WRITE" ("$bWRITE$b", "/msg $N WRITE", "Writes the $b$N$b database to disk."); "RENAME" ("$bRENAME$b", "/msg $N RENAME <current-handle> <new-handle>", "Renames a handle. This command is only accessible to helpers and IRC operators."); "VACATION" ("$bVACATION$b", "/msg $N VACATION", "Marks your handle as \"on vacation\" until the next time you authenticate to $N.", "While you are \"on vacation\", your handle will not be deleted for inactivity."); "SEARCH" ("$bSEARCH$b", "/msg $N SEARCH <action> <criteria>", "Searches for handles matching the critera, and then does something to them.", "$uSee Also:$u search action, search criteria"); "SEARCH ACTION" ("$bSEARCH ACTION$b", "The following actions are valid:", " PRINT - Print matching handles", " COUNT - Count matching handles", " UNREGISTER - Unregister matching handles", "$uSee Also:$u search, search criteria"); "SEARCH CRITERIA" ("$bSEARCH CRITERIA$b", "The following handle search criteria are valid. Each takes an additional argument, giving the actual criteria:", " LIMIT - Limits the number of matches", " FLAGS - Bits that must be turned on (e.g. +h) and/or off (e.g. -S) in a handle", " REGISTERED - Handles registered at least this long ago", " SEEN - Handles not seen for at least this long", " HANDLEMASK - A glob that must match the handle name", " HOSTMASK - A glob that must match a hostmask for the handle", "$uSee Also:$u search, search action"); --- NEW FILE --- "<INDEX>" ("$b$G Help$b", "The $b$G$b service allows network administrators to manage and send important notices to users. It also allows users to retrieve, at once, all messages addressed to them.", "$bUser Commands:$b", " MESSAGES Sends you all messages addressed to your user class.", " VERSION Prints the srvx and $G version information.", "$bPrivileged Commands:$b", " NOTICE Immediately sends a message.", " MESSAGE Adds a message to $G's database.", " LIST Displays active messages.", " REMOVE Removes a message."); "HELP" ("$bHELP$b", "/msg $G HELP [topic/command]", "Displays help information for the specified topic or command. If no topic or command is specified, $bhelp$b returns basic help information for $b$G$b."); "LIST" ("$bLIST$b", "/msg $G LIST ", "Displays all active messages and information pertaining to them, such as the target, message ID, expiration time, and who the message is from.", "$uSee Also:$u message, messages, remove"); "MESSAGE" ("$bMESSAGE$b", "/msg $G MESSAGE [<options> <value>] text <message>", "Adds a notice to the $b$G$b database. Messages are sent to users as they enter the network or the target class. $bMessage$b takes several options, which must be preceded by the name of the option being used. Options include:", "$bTARGET$b: Controls the recipients of the message. This option may be used multiple times. See the $bTARGET$b help entry for details.", "$bDURATION$b: This option sets the length of time for which the message is valid. After this time, the message will be deleted from the $b$G$b database.", "$uSee Also:$u list, messages, remove, target"); "MESSAGES" ("$bMESSAGES$b", "/msg $G MESSAGES ", "Sends you all messages addressed to your user class."); "NOTICE" ("$bNOTICE$b", "/msg $G NOTICE <target> <message>", "Immediately sends a notice to a specific target. See $btarget$b for a list of targets.", "$uSee Also:$u target"); "READHELP" ("$bREADHELP$b", "/msg $G READHELP ", "Re-reads the $b$G$b help file from disk.", "$uSee Also:$u help"); "REMOVE" ("$bREMOVE$b", "/msg $G REMOVE <message id>", "Remove a message before it expires. The message ID can be found in the message you received when using $bsend$b to first add the message, or by using $blist$b.", "$uSee Also:$u list, message"); "TARGET" ("$bTARGET$b", "$bTarget$b is used as a sub-command in many commands. It's values are:", "$bUSERS$b: The message will be sent to all users on the network including opers and helpers, but not channels.", "$bHELPERS$b: The message will be sent to helpers only.", "$bOPERS$b: The message will be sent to opers only.", "$bPRIVLEDGED$b: The message will be sent to helpers and opers.", "$bCHANNELS$b: The message will be sent to all channels.", "$bALL$b: A combination of USERS and CHANNELS."); "VERSION" ("$bVERSION$b", "/msg $G VERSION ", "$bVERSION$b causes $b$G$b to to send you the srvx version and some additional version information that is specific to $b$G$b."); "WRITE" ("$bWRITE$b", "/msg $G WRITE ", "Writes the $b$G$b database to disk."); --- NEW FILE --- "<INDEX>" ("$b$C Help$b", "$b$C$b is a channel service bot, intended primarily to prevent and defend against channel takeovers. It also includes convenience features aimed at making it easier to maintain control over all aspects of your channel.", "$b$C$b command categories:", " USER User management.", " CHANNEL Channel management.", " BAN MANAGEMENT Ban management.", " INFORMATION Informative commands.", " OPER Helper/Operator commands." ); "USER" ("$bUser commands:$b", " ACCESS Check your own or another person's access to a channel.", " ADDCOOWNER Give another person coowner status in a channel.", " ADDMASTER master status in a channel.", " ADDOP op status in a channel.", " ADDPEON peon status in a channel.", " CLVL Change a person's access level in a channel.", " DELCOOWNER Remove a person's coowner status from a channel.", " DELMASTER master status from a channel.", " DELOP op status from a channel.", " DELPEON peon status from a channel.", " MDELCOOWNER Remove multiple coowners by hostmask.", " MDELMASTER masters by hostmask.", " MDELOP ops by hostmask.", " MDELPEON peons by hostmask.", " UP Obtain ops in a channel you have access to.", " DOWN Remove ops.", " UPALL Obtain ops in all channels you have access to.", " DOWNALL Remove ops in all.", " OP Give ops to the specified user.", " DEOP Remove ops from the specified user.", " VOICE Give voice to the speicifed user.", " DEVOICE Remove voice from the specified user." ); "BAN MANAGEMENT" ("$bBan Management Commands:$b", " KICK Kick a user from a channel.", " BAN Ban a user from a channel.", " KICKBAN Kick and ban a user from a channel.", " ADDBAN Add a permanent ban for a user.", " ADDTIMEDBAN Add a ban that expires in the specified time.", " UNBAN Remove the specified ban from the channel.", " DELBAN Remove the specified permanent ban from memory.", " UNBANME Remove a ban matching your hostmask from specified channel.", " UNBANALL Remove all bans from a channel." ); "CHANNEL" ("$bChannel Management Commands:$b", " OPEN Remove +ilk channel modes and any bans on you from a channel.", " USERS List all users of a channel.", " CLIST coowners of a channel.", " MLIST masters of a channel.", " OLIST ops of a channel.", " PLIST peons of a channel.", " BANS List all the bans for a channel.", " TOPIC Set a new topic or reset the default topic.", " MODE Change a channel mode.", " INVITE Invite new users to your channel.", " INFO Show numerical information about the users in a channel.", " SET Change various channel settings.", " SETINFO Give yourself an info line for when you join your channel.", " EVENTS View a list of events relevant to a channel." ); "INFORMATION" ("$bInformative Commands:$b", " VERSION Check the current running version of $C", " NETINFO Check current network-wide information.", " STAFF Get a list of all the current staff.", " IRCOPS IRC operators.", " HELPERS support helpers.", " PEEK Reveal information on a channel's modes, topic and ops.", " SEEN Find out the last time a user was in a channel.", " COMMAND Display some information about a command." ); "OPER" ("$bHelper/IRC Operator commands:$b", " SAY Have $C say a message in a channel.", " EMOTE Equivalent to $C doing a /me in a channel.", " LAST View a list of all commands recently executed.", " GOD Turn security override on/off.", " EXPIRE Automatically unregister old channels.", " SUSPEND Remove $C from a channel saving user data.", " UNSUSPEND Restore $C to a channel that was suspended.", " UNVISITED List all channels that have not been visited in specified duration.", " READHELP Read in $C helpfile from disk.", " WRITE Write out all $C data to disk.", " MOVE Transition one channel's registration to a new channel name.", " OPCHAN Force $C to op itself in a channel.", " REGISTER Register a new channel with $C.", " UNREGISTER Remove $C from a registered channel.", " ADDOWNER Add a new owner to a channel.", " DELOWNER Remove a current owner from a channel.", " MDELOWNER Remove multiple owners by hostmask from a channel." ); "ACCESS" ("$bACCESS$b", "/msg $C ACCESS <#channel> [nick|*handle]", "${command/ACCESS/access}", "Reports various pieces of information about a channel user, including channel and network access level, and the user's info line. If no nick or handle is provided, $C returns your own information.", "You may use *Handle instead of Nick as the name argument; the * makes $C use the name of a handle directly (useful if the user is not online).", "$uSee Also:$u users"); "ADDBAN" ("$bADDBAN$b", "/msg $C ADDBAN <#channel> <mask|nick> [Reason]", "${command/ADDBAN/access}", "Adds a ban to the channels permanent ban list, remaining in effect until removed with the DELBAN command.", "$uSee Also:$u bans, delban, mdelban"); "ADDCOOWNER" ("$bADDCOOWNER$b", "/msg $C ADDCOOWNER <#channel> <nick|*handle>", "${command/ADDCOOWNER/access}", "Adds a coowner to the channel user list.", "You may use *Handle instead of Nick as the name argument; the * makes $C use the name of a handle directly (useful if the user is not online).", "$uSee Also:$u clist, delcoowner, mdelcoowner, users"); "ADDMASTER" ("$bADDMASTER$b", "/msg $C ADDMASTER <#channel> <nick|*handle>", "${command/ADDMASTER/access}", "This command adds a master to the user list of the channel.", "You may use *Handle instead of Nick as the name argument; the * makes $C use the name of a handle directly (useful if the user is not online).", "$uSee Also:$u delcoowner, mdelcoowner, mlist, users"); "ADDOP" ("$bADDOP$b", "/msg $C ADDOP <#channel> <nick|*handle>", "${command/ADDOP/access}", "This command adds an op to the user list of the channel.", "You may use *Handle instead of Nick as the name argument; the * makes $C use the name of a handle directly (useful if the user is not online).", "$uSee Also:$u delop, mdelop, olist, users"); "ADDOWNER" ("$bADDOWNER$b", "/msg $C ADDOWNER <#channel> <handle>]", "${command/ADDOWNER/access}", "This command adds an owner to the user list of the channel.", "You may use *Handle instead of Nick as the name argument; the * makes $C use the name of a handle directly (useful if the user is not online).", "$uSee Also:$u delowner, mdelowner, users, wlist"); "ADDPEON" ("$bADDPEON$b", "/msg $C ADDPEON <#channel> <nick|*handle>", "${command/ADDPEON/access}", "This command adds a peon to the user list of the channel.", "You may use *Handle instead of Nick as the name argument; the * makes $C use the name of a handle directly (useful if the user is not online).", "$uSee Also:$u delpeon, mdelpeon, plist, users"); "ADDTIMEDBAN" ("$bADDTIMEDBAN$b", "/msg $C ADDTIMEDBAN <#channel> <mask|nick> <Duration> [Reason]", "${command/ADDTIMEDBAN/access}", "Adds an automatically expiring ban to the channel ban list. This command behaves in the exact same fashion as ADDBAN with the exception that the bans are automatically removed after the user-supplied duration. Timed bans can be removed with the DELBAN command, as with permanent bans.", "$uSee Also:$u addban, bans, delban"); "BAN" ("$bBAN$b", "/msg $C BAN <#channel> <mask|nick>", "${command/BAN/access}", "This command will temporarily add a ban for the user specified as the parameter. Masks are to be supplied in the format <Nick>!<Ident>@<Host> and usually contain wildcards. If a nick is specified, a mask is automatically generated (though not completely foolproof). This ban is removed either by removing it from the channel ban list using any irc client, or sending the UNBAN or UNBANALL commands. If you are banned with this method, the UNBANME command can be used.", "$uFor assistance, please join to #support$u", "Example: *!*serv@*.gamesnet.net would ban anyone with ident 'serv' and a gamesnet.net hostname from joining the channel.", "$uSee Also:$u unban, unbanall, unbanme"); "BANS" ("$bBANS$b", "/msg $C BANS <#channel> ", "${command/BANS/access}", "This command lists all permanent and timed bans in the channel.", "$uSee Also:$u addban, delban, mdelban"); "CLIST" ("$bCLIST$b", "/msg $C CLIST <#channel> ", "${command/CLIST/access}", "This command lists all users of level $bCoowner$b in on a channel's userlist.", "$uSee Also:$u addcoowner, delcoowner, mdelcoowner, users"); "CLVL" ("$bCLVL$b", "/msg $C CLVL <#channel> <nick|*handle> <level>", "${command/CLVL/access}", "Modifies a channel user's access level. You cannot give users access greater than or equal to your own.", "You may use *Handle instead of Nick as the name argument; the * makes $C use the name of a handle directly (useful if the user is not online).", "$uSee Also:$u access, users"); "COMMAND" ("$bCOMMAND$b", "/msg $C COMMAND <command> [<setting> <value>]", "${command/COMMAND/access}", "Displays some information about a command, including its aliases, access restrictions and usage count.", "The optional <setting> and <value> may be provided by an IRC operator. See $bcommand settings$b for the possible settings... [truncated message content] |
Update of /cvsroot/srvx/services/src In directory usw-pr-cvs1:/tmp/cvs-serv11746/src Modified Files: tools.h tools.c service.h service.c rules.c recdb.c proto_ircu_p10.c proto_bahamut.c proto.h policer.h policer.c opserv.c nickserv.h nickserv.c modules.h modules.c main.c log.c hash.h hash.c global.c gline.c config.h.in common.h chanserv.c alias.c Makefile.am Added Files: proto.c mod_common.h mod_common.c Removed Files: test-module.so.deps test-module.c opserv.help nickserv.help helpfile.h helpfile.c global.help chanserv.help Log Message: first step at modularizing services - the old four are gone, to be repartitioned and using a better common framework help files are moved from src/ to doc/ directory protocol backends are made dynamically loadable ***** Error reading new file: [Errno 2] No such file or directory: 'mod_common.h' ***** Error reading new file: [Errno 2] No such file or directory: 'mod_common.c' Index: tools.h =================================================================== RCS file: /cvsroot/srvx/services/src/tools.h,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -r1.13 -r1.14 *** tools.h 2001/09/18 02:13:08 1.13 --- tools.h 2001/09/27 21:58:07 1.14 *************** *** 33,39 **** extern unsigned char channel_inverse_modes[256]; - typedef void (*oper_func_t) (struct userNode *user); - void reg_oper_func(oper_func_t handler); - void tools_init(void); --- 33,36 ---- *************** *** 74,83 **** void intervalString(char *output, time_t interval); int getipbyname(const char *name, unsigned long *ip); - void stripColor(char *src); ! const char * preposition(char *word); int ban_match_user(struct userNode *user, char *ban); int ban_match_user_host(struct userNode *user, char *hostmask, char *ban); - int set_policer_param(const char *param, void *data, void *extra); DECLARE_LIST(string_buffer, char); --- 71,78 ---- void intervalString(char *output, time_t interval); int getipbyname(const char *name, unsigned long *ip); ! const char *preposition(char *word); int ban_match_user(struct userNode *user, char *ban); int ban_match_user_host(struct userNode *user, char *hostmask, char *ban); DECLARE_LIST(string_buffer, char); Index: tools.c =================================================================== RCS file: /cvsroot/srvx/services/src/tools.c,v retrieving revision 1.95 retrieving revision 1.96 diff -C2 -r1.95 -r1.96 *** tools.c 2001/09/22 16:12:54 1.95 --- tools.c 2001/09/27 21:58:07 1.96 *************** *** 53,66 **** #include "hash.h" #include "log.h" - #include "policer.h" #include "proto.h" #include "recdb.h" #include "tools.h" ! extern struct policer_params *oper_policer_params, *luser_policer_params; ! ! static const unsigned char *user_modes = RFC1459_USER_MODE_CHARS PROTO_USER_MODE_CHARS; static unsigned char user_inverse_modes[256]; ! static const unsigned char *channel_modes = RFC1459_CHANNEL_MODE_CHARS PROTO_CHANNEL_MODE_CHARS; unsigned char channel_inverse_modes[256]; --- 53,63 ---- #include "hash.h" #include "log.h" #include "proto.h" #include "recdb.h" #include "tools.h" ! static const unsigned char *user_modes = RFC1459_USER_MODE_CHARS; static unsigned char user_inverse_modes[256]; ! static const unsigned char *channel_modes = RFC1459_CHANNEL_MODE_CHARS; unsigned char channel_inverse_modes[256]; *************** *** 790,794 **** } ! const char * preposition(char *word) { switch(word[0]) --- 787,792 ---- } ! const char * ! preposition(char *word) { switch(word[0]) *************** *** 803,815 **** return "a"; } - } - - int - set_policer_param(const char *param, void *data, void *extra) - { - struct record_data *rd = data; - const char *str = GET_RECORD_QSTRING(rd); - if (str) policer_params_set(extra, param, str); - return 0; } --- 801,804 ---- Index: service.h =================================================================== RCS file: /cvsroot/srvx/services/src/service.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** service.h 2001/09/22 16:12:54 1.1 --- service.h 2001/09/27 21:58:07 1.2 *************** *** 22,27 **** #define SERVICE_H - #include "common.h" #include "dict.h" int service_create(const char *templ_name, dict_t defn); --- 22,34 ---- #define SERVICE_H #include "dict.h" + #include "modules.h" + + struct userNode; + + struct service_template { + dict_t commands; /* string->struct service_command* */ + struct annotations notes; + }; int service_create(const char *templ_name, dict_t defn); Index: service.c =================================================================== RCS file: /cvsroot/srvx/services/src/service.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** service.c 2001/09/22 16:12:54 1.1 --- service.c 2001/09/27 21:58:07 1.2 *************** *** 25,33 **** #include "service.h" - struct service_template { - dict_t commands; /* string->struct service_command* */ - struct annotations notes; - }; - static dict_t service_templates; --- 25,28 ---- Index: rules.c =================================================================== RCS file: /cvsroot/srvx/services/src/rules.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** rules.c 2001/09/22 16:12:54 1.1 --- rules.c 2001/09/27 21:58:07 1.2 *************** *** 21,24 **** --- 21,25 ---- #include "config.h" #include <ctype.h> + #include <stdlib.h> #include "dict.h" Index: recdb.c =================================================================== RCS file: /cvsroot/srvx/services/src/recdb.c,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -r1.31 -r1.32 *** recdb.c 2001/08/19 03:06:09 1.31 --- recdb.c 2001/09/27 21:58:07 1.32 *************** *** 367,371 **** if (c != '(') ABORT(recdb, EXPECTED_OPEN_PAREN, c); slist = alloc_string_list(4); ! while (true) { c = parse_skip_ws(recdb); if (c == EOF || c == ')') break; --- 367,371 ---- if (c != '(') ABORT(recdb, EXPECTED_OPEN_PAREN, c); slist = alloc_string_list(4); ! while (1) { c = parse_skip_ws(recdb); if (c == EOF || c == ')') break; Index: proto_ircu_p10.c =================================================================== RCS file: /cvsroot/srvx/services/src/proto_ircu_p10.c,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -r1.22 -r1.23 *** proto_ircu_p10.c 2001/09/22 16:12:54 1.22 --- proto_ircu_p10.c 2001/09/27 21:58:07 1.23 *************** *** 54,58 **** --- 54,60 ---- #include "hash.h" #include "log.h" + #define PROTO_FUNC_TYPE 1 #include "proto.h" + #include "proto_ircu_p10.h" #include "timeq.h" #include "tools.h" *************** *** 63,69 **** /************************************/ - extern new_channel_func_t *ncf_list; - extern unsigned int ncf_size, ncf_used; extern int ping_freq, ping_timeout; static void timed_send_ping(void *data); static void timed_ping_timeout(void *data); --- 65,70 ---- /************************************/ extern int ping_freq, ping_timeout; + static void timed_send_ping(void *data); static void timed_ping_timeout(void *data); *************** *** 72,79 **** --- 73,83 ---- static unsigned int next_numeric; static unsigned int highest_numeric; + static struct module *proto_module; struct userNode_proto { char numeric[COMBO_NUMERIC_LEN+1]; }; + static unsigned int uproto_note_id; + #define UPROTO(USER) ((struct userNode_proto*)get_note(&(USER)->notes, uproto_note_id)) struct serverNode_proto { *************** *** 81,84 **** --- 85,90 ---- struct userNode *users[USERARRAYSIZE]; /* flat indexed by numeric */ }; + static unsigned int sproto_note_id; + #define SPROTO(SERVER) ((struct serverNode_proto*)get_note(&(SERVER)->notes, sproto_note_id)) /**************************************/ *************** *** 286,302 **** void irc_server(struct server *srv) - { - putsock("%s %s %d %li %li P10 %s]] :%s", - CMD_SERVER, srv->name, srv->hops, srv->boot, srv->link, srv->proto->numeric, srv->description); - } - - void - irc_jserver(struct server *srv) { ! putsock("%s %s %d %li %li J10 %s]] :%s", ! CMD_SERVER, srv->name, srv->hops + 1, srv->boot, srv->link, srv->proto->numeric, srv->description); } ! void irc_uptime(struct userNode *user) { --- 292,301 ---- void irc_server(struct server *srv) { ! putsock("%s %s %d %li %li %c10 %s]] :%s", ! CMD_SERVER, srv->name, srv->hops + 1, srv->boot, srv->link, (srv->in_burst?'J':'P'), SPROTO(srv)->numeric, srv->description); } ! static void irc_uptime(struct userNode *user) { *************** *** 309,313 **** } ! void irc_whois(struct userNode *from, struct userNode *who) { --- 308,312 ---- } ! static void irc_whois(struct userNode *from, struct userNode *who) { *************** *** 329,336 **** make_usermode(user, modes, sizeof(modes)); putsock("%s %s %s %d "FMT_TIME_T" %s %s %s %s %s :%s", ! user->uplink->proto->numeric, CMD_NICK, user->nick, user->uplink->hops+1, user->timestamp, user->username, user->hostname, modes, b64ip, user->proto->numeric, user->info); } else { putsock("%s %s %s %d "FMT_TIME_T" %s %s %s %s :%s", ! user->uplink->proto->numeric, CMD_NICK, user->nick, user->uplink->hops+1, user->timestamp, user->username, user->hostname, b64ip, user->proto->numeric, user->info); } } --- 328,335 ---- make_usermode(user, modes, sizeof(modes)); putsock("%s %s %s %d "FMT_TIME_T" %s %s %s %s %s :%s", ! SPROTO(user->uplink)->numeric, CMD_NICK, user->nick, user->uplink->hops+1, user->timestamp, user->username, user->hostname, modes, b64ip, UPROTO(user)->numeric, user->info); } else { putsock("%s %s %s %d "FMT_TIME_T" %s %s %s %s :%s", ! SPROTO(user->uplink)->numeric, CMD_NICK, user->nick, user->uplink->hops+1, user->timestamp, user->username, user->hostname, b64ip, UPROTO(user)->numeric, user->info); } } *************** *** 339,343 **** irc_nick(struct userNode *user) { ! putsock("%s %s %s "FMT_TIME_T, user->proto->numeric, CMD_NICK, user->nick, now); } --- 338,342 ---- irc_nick(struct userNode *user) { ! putsock("%s %s %s "FMT_TIME_T, UPROTO(user)->numeric, CMD_NICK, user->nick, now); } *************** *** 356,366 **** /* Quit all local users. */ ! for (i = 0; i < ArrayLength(self->proto->users); i++) { ! if (!self->proto->users[i]) continue; ! irc_quit(self->proto->users[i], message); } } ! putsock("%s %s %s %d :%s", self->proto->numeric, CMD_SQUIT, srv->name, 0, message); if (srv == self->uplink) { --- 355,365 ---- /* Quit all local users. */ ! for (i = 0; i < ArrayLength(SPROTO(self)->users); i++) { ! if (!SPROTO(self)->users[i]) continue; ! irc_quit(SPROTO(self)->users[i], message); } } ! putsock("%s %s %s %d :%s", SPROTO(self)->numeric, CMD_SQUIT, srv->name, 0, message); if (srv == self->uplink) { *************** *** 372,376 **** irc_notice(struct userNode *from, const char *to, const char *message) { ! putsock("%s %s %s :%s", from->proto->numeric, CMD_NOTICE, to, message); } --- 371,375 ---- irc_notice(struct userNode *from, const char *to, const char *message) { ! putsock("%s %s %s :%s", UPROTO(from)->numeric, CMD_NOTICE, to, message); } *************** *** 379,414 **** { if (IsChannelName(to)) { ! putsock("%s %s %s :%s", from->proto->numeric, CMD_PRIVMSG, to, message); } else { struct userNode *user = GetUser(to); ! if (user) putsock("%s %s %s :%s", from->proto->numeric, CMD_PRIVMSG, user->proto->numeric, message); } } ! void irc_eob(void) { ! putsock("%s %s", self->proto->numeric, CMD_EOB); } ! void irc_eob_ack(void) { ! putsock("%s %s", self->proto->numeric, CMD_EOB_ACK); } ! void irc_ping(const char *something) { ! putsock("%s %s :%s", self->proto->numeric, CMD_PING, something); } ! void irc_pong(const char *data) { ! putsock("%s %s %s :%s", self->proto->numeric, CMD_PONG, self->name, data); } ! void irc_pass(const char *passwd) { --- 378,413 ---- { if (IsChannelName(to)) { ! putsock("%s %s %s :%s", UPROTO(from)->numeric, CMD_PRIVMSG, to, message); } else { struct userNode *user = GetUser(to); ! if (user) putsock("%s %s %s :%s", UPROTO(from)->numeric, CMD_PRIVMSG, UPROTO(user)->numeric, message); } } ! static void irc_eob(void) { ! putsock("%s %s", SPROTO(self)->numeric, CMD_EOB); } ! static void irc_eob_ack(void) { ! putsock("%s %s", SPROTO(self)->numeric, CMD_EOB_ACK); } ! static void irc_ping(const char *something) { ! putsock("%s %s :%s", SPROTO(self)->numeric, CMD_PING, something); } ! static void irc_pong(const char *data) { ! putsock("%s %s %s :%s", SPROTO(self)->numeric, CMD_PONG, self->name, data); } ! static void irc_pass(const char *passwd) { *************** *** 424,431 **** irc_pass(passwd); - irc_jserver(self); self->in_burst = 1; burst_begin = now; burst_length = 0; timeq_add(now + ping_freq, timed_send_ping, 0); } --- 423,430 ---- irc_pass(passwd); self->in_burst = 1; burst_begin = now; burst_length = 0; + irc_server(self); timeq_add(now + ping_freq, timed_send_ping, 0); } *************** *** 434,438 **** irc_gline(const char *mask, unsigned long duration, const char *message) { ! putsock("%s %s * +%s %lu :%s", self->proto->numeric, CMD_GLINE, mask, duration, message); } --- 433,437 ---- irc_gline(const char *mask, unsigned long duration, const char *message) { ! putsock("%s %s * +%s %lu :%s", SPROTO(self)->numeric, CMD_GLINE, mask, duration, message); } *************** *** 440,444 **** irc_ungline(const char *mask) { ! putsock("%s %s * -%s", self->proto->numeric, CMD_GLINE, mask); } --- 439,443 ---- irc_ungline(const char *mask) { ! putsock("%s %s * -%s", SPROTO(self)->numeric, CMD_GLINE, mask); } *************** *** 446,450 **** irc_jupe(const char *server, unsigned long duration, const char *reason) { ! putsock("%s %s * +%s %lu "FMT_TIME_T" :%s", self->proto->numeric, CMD_JUPE, server, duration, now, reason); } --- 445,449 ---- irc_jupe(const char *server, unsigned long duration, const char *reason) { ! putsock("%s %s * +%s %lu "FMT_TIME_T" :%s", SPROTO(self)->numeric, CMD_JUPE, server, duration, now, reason); } *************** *** 452,456 **** irc_unjupe(const char *server) { ! putsock("%s %s * -%s 0 "FMT_TIME_T" :Unjuping.", self->proto->numeric, CMD_JUPE, server, now); } --- 451,455 ---- irc_unjupe(const char *server) { ! putsock("%s %s * -%s 0 "FMT_TIME_T" :Unjuping.", SPROTO(self)->numeric, CMD_JUPE, server, now); } *************** *** 465,469 **** unsigned int n; ! base_len = sprintf(burst_line, "%s %s %s " FMT_TIME_T " ", self->proto->numeric, CMD_BURST, chan->name, chan->timestamp); len = make_chanmode(chan, burst_line+base_len, sizeof(burst_line)-base_len); pos = base_len + len - 1; --- 464,468 ---- unsigned int n; ! base_len = sprintf(burst_line, "%s %s %s " FMT_TIME_T " ", SPROTO(self)->numeric, CMD_BURST, chan->name, chan->timestamp); len = make_chanmode(chan, burst_line+base_len, sizeof(burst_line)-base_len); pos = base_len + len - 1; *************** *** 479,484 **** last_mode = -1; } ! memcpy(burst_line+pos, mn->user->proto->numeric, 5); ! pos += strlen(mn->user->proto->numeric); if (mn->modes && (mn->modes != last_mode)) { last_mode = mn->modes; --- 478,483 ---- last_mode = -1; } ! memcpy(burst_line+pos, UPROTO(mn->user)->numeric, 5); ! pos += strlen(UPROTO(mn->user)->numeric); if (mn->modes && (mn->modes != last_mode)) { last_mode = mn->modes; *************** *** 520,524 **** irc_quit(struct userNode *user, const char *message) { ! putsock("%s %s :%s", user->proto->numeric, CMD_QUIT, message); } --- 519,523 ---- irc_quit(struct userNode *user, const char *message) { ! putsock("%s %s :%s", UPROTO(user)->numeric, CMD_QUIT, message); } *************** *** 537,543 **** { if (from) { ! putsock("%s %s %s :%s!%s (%s)", from->proto->numeric, CMD_KILL, target->proto->numeric, self->name, from->nick, message); } else { ! putsock("%s %s %s :%s (%s)", self->proto->numeric, CMD_KILL, target->proto->numeric, self->name, message); } } --- 536,542 ---- { if (from) { ! putsock("%s %s %s :%s!%s (%s)", UPROTO(from)->numeric, CMD_KILL, UPROTO(target)->numeric, self->name, from->nick, message); } else { ! putsock("%s %s %s :%s (%s)", SPROTO(self)->numeric, CMD_KILL, UPROTO(target)->numeric, self->name, message); } } *************** *** 549,555 **** const char *src; if ((mn = GetUserMode(target, from)) && (mn->modes & MODE_CHANOP)) { ! src = from->proto->numeric; } else { ! src = self->proto->numeric; } putsock("%s %s %s %s "FMT_TIME_T, src, CMD_MODE, target->name, modes, target->timestamp); --- 548,554 ---- const char *src; if ((mn = GetUserMode(target, from)) && (mn->modes & MODE_CHANOP)) { ! src = UPROTO(from)->numeric; } else { ! src = SPROTO(self)->numeric; } putsock("%s %s %s %s "FMT_TIME_T, src, CMD_MODE, target->name, modes, target->timestamp); *************** *** 566,572 **** { if (what->members.used == 1) { ! putsock("%s %s %s %lu", who->proto->numeric, CMD_CREATE, what->name, what->timestamp); } else { ! putsock("%s %s %s", who->proto->numeric, CMD_JOIN, what->name); } } --- 565,571 ---- { if (what->members.used == 1) { ! putsock("%s %s %s %lu", UPROTO(who)->numeric, CMD_CREATE, what->name, what->timestamp); } else { ! putsock("%s %s %s", UPROTO(who)->numeric, CMD_JOIN, what->name); } } *************** *** 575,579 **** irc_kick(struct userNode *actor, struct userNode *who, struct chanNode *from, const char *msg) { ! putsock("%s %s %s %s :%s", actor->proto->numeric, CMD_KICK, from->name, who->proto->numeric, msg); } --- 574,578 ---- irc_kick(struct userNode *actor, struct userNode *who, struct chanNode *from, const char *msg) { ! putsock("%s %s %s %s :%s", UPROTO(actor)->numeric, CMD_KICK, from->name, UPROTO(who)->numeric, msg); } *************** *** 587,591 **** irc_stats(struct userNode *from, struct server *target, char type) { ! putsock("%s STATS %c :%s", from->proto->numeric, type, target->proto->numeric); } --- 586,590 ---- irc_stats(struct userNode *from, struct server *target, char type) { ! putsock("%s STATS %c :%s", UPROTO(from)->numeric, type, SPROTO(target)->numeric); } *************** *** 593,597 **** irc_part(struct userNode *who, struct chanNode *what, const char *reason) { ! putsock("%s %s %s :%s", who->proto->numeric, CMD_PART, what->name, reason); } --- 592,596 ---- irc_part(struct userNode *who, struct chanNode *what, const char *reason) { ! putsock("%s %s %s :%s", UPROTO(who)->numeric, CMD_PART, what->name, reason); } *************** *** 648,652 **** for (i=0; i<count; i++) { ! len = strlen(list[i]->proto->numeric); if ((start < queued+3+len) || (queued >= MAXMODEPARAMS)) { while (queued) { --- 647,651 ---- for (i=0; i<count; i++) { ! len = strlen(UPROTO(list[i])->numeric); if ((start < queued+3+len) || (queued >= MAXMODEPARAMS)) { while (queued) { *************** *** 659,663 **** } start -= len; ! memcpy(buffer+start, list[i]->proto->numeric, len); buffer[--start] = ' '; queued++; --- 658,662 ---- } start -= len; ! memcpy(buffer+start, UPROTO(list[i])->numeric, len); buffer[--start] = ' '; queued++; *************** *** 700,708 **** case 'o': user = va_arg(args, struct userNode *); ! arg_text = user->proto->numeric; goto add_arg; case 'v': user = va_arg(args, struct userNode *); ! arg_text = user->proto->numeric; goto add_arg; case 'b': --- 699,707 ---- case 'o': user = va_arg(args, struct userNode *); ! arg_text = UPROTO(user)->numeric; goto add_arg; case 'v': user = va_arg(args, struct userNode *); ! arg_text = UPROTO(user)->numeric; goto add_arg; case 'b': *************** *** 802,807 **** } n = base64toint(numeric+SERVER_NUMERIC_LEN, USER_NUMERIC_LEN); ! un = GetServerN(numeric)->proto->users[n]; ! if (!(un = s->proto->users[n])) { log(DEBUG_LOG, LOG_WARNING, "GetUserN(%s) couldn't find user!\n", numeric); } --- 801,806 ---- } n = base64toint(numeric+SERVER_NUMERIC_LEN, USER_NUMERIC_LEN); ! un = SPROTO(s)->users[n]; ! if (!(un = SPROTO(s)->users[n])) { log(DEBUG_LOG, LOG_WARNING, "GetUserN(%s) couldn't find user!\n", numeric); } *************** *** 844,850 **** /* burst local nicks */ ! for (i=0; i<ArrayLength(self->proto->users); i++) { ! if (!self->proto->users[i]) continue; ! irc_user(self->proto->users[i]); } --- 843,849 ---- /* burst local nicks */ ! for (i=0; i<ArrayLength(SPROTO(self)->users); i++) { ! if (!SPROTO(self)->users[i]) continue; ! irc_user(SPROTO(self)->users[i]); } *************** *** 902,909 **** { struct server *new_server; new_server = AddServer(uplink, name, hops, boot, link, description); servers_num[base64toint(numeric, SERVER_NUMERIC_LEN)] = new_server; ! new_server->proto = calloc(1, sizeof(*new_server->proto)); ! safestrncpy(new_server->proto->numeric, numeric, sizeof(new_server->proto->numeric)); return new_server; } --- 901,911 ---- { struct server *new_server; + struct serverNode_proto *sproto; + new_server = AddServer(uplink, name, hops, boot, link, description); servers_num[base64toint(numeric, SERVER_NUMERIC_LEN)] = new_server; ! sproto = calloc(1, sizeof(*sproto)); ! safestrncpy(sproto->numeric, numeric, sizeof(sproto->numeric)); ! put_note(&new_server->notes, sproto_note_id, sproto); return new_server; } *************** *** 1081,1089 **** if (uNode) { unsigned long num_local; ! uNode->proto = calloc(1, sizeof(*uNode->proto)); ! safestrncpy(uNode->proto->numeric, numeric, sizeof(uNode->proto->numeric)); uNode->ip = base64toint(realip, 6); num_local = base64toint(numeric+SERVER_NUMERIC_LEN, USER_NUMERIC_LEN); ! GetServerN(numeric)->proto->users[num_local] = uNode; if (uplink == self) irc_user(uNode); } else { --- 1083,1094 ---- if (uNode) { unsigned long num_local; ! struct userNode_proto *uproto; ! ! uproto = calloc(1, sizeof(*uproto)); ! safestrncpy(uproto->numeric, numeric, sizeof(uproto->numeric)); ! put_note(&uNode->notes, uproto_note_id, uproto); uNode->ip = base64toint(realip, 6); num_local = base64toint(numeric+SERVER_NUMERIC_LEN, USER_NUMERIC_LEN); ! SPROTO(GetServerN(numeric))->users[num_local] = uNode; if (uplink == self) irc_user(uNode); } else { *************** *** 1093,1097 **** * comparisons. If this other user is +k, then somebody * screwed up. */ ! sprintf(kill, "%s KILL %s :%s (Nick collision.)", self->proto->numeric, numeric, self->name); irc_raw(kill); } --- 1098,1102 ---- * comparisons. If this other user is +k, then somebody * screwed up. */ ! sprintf(kill, "%s KILL %s :%s (Nick collision.)", SPROTO(self)->numeric, numeric, self->name); irc_raw(kill); } *************** *** 1104,1108 **** unsigned int last = next_numeric; do { ! if (!self->proto->users[next_numeric++]) { if (next_numeric > highest_numeric) { highest_numeric = next_numeric; --- 1109,1113 ---- unsigned int last = next_numeric; do { ! if (!SPROTO(self)->users[next_numeric++]) { if (next_numeric > highest_numeric) { highest_numeric = next_numeric; *************** *** 1121,1125 **** int local_num; if ((local_num = get_local_numeric()) == -1) return NULL; ! safestrncpy(numeric, self->proto->numeric, SERVER_NUMERIC_LEN+1); inttobase64(numeric+SERVER_NUMERIC_LEN, local_num, USER_NUMERIC_LEN); numeric[COMBO_NUMERIC_LEN] = 0; --- 1126,1130 ---- int local_num; if ((local_num = get_local_numeric()) == -1) return NULL; ! safestrncpy(numeric, SPROTO(self)->numeric, SERVER_NUMERIC_LEN+1); inttobase64(numeric+SERVER_NUMERIC_LEN, local_num, USER_NUMERIC_LEN); numeric[COMBO_NUMERIC_LEN] = 0; *************** *** 1439,1443 **** */ if (user) { ! DelUser(user, NULL, false, argv[2]); } return 1; --- 1444,1448 ---- */ if (user) { ! DelUser(user, NULL, 0, argv[2]); } return 1; *************** *** 1459,1463 **** } ! DelUser(user, NULL, false, argv[2]); return 1; } --- 1464,1468 ---- } ! DelUser(user, NULL, 0, argv[2]); return 1; } *************** *** 1501,1505 **** part_helper(struct chanNode *cn, void *data) { ! DelChannelUser(data, cn, false, 0); } --- 1506,1510 ---- part_helper(struct chanNode *cn, void *data) { ! DelChannelUser(data, cn, 0, 0); } *************** *** 1574,1578 **** { struct privmsg_desc *pd = data; ! int num = base64toint(un->proto->numeric+SERVER_NUMERIC_LEN, USER_NUMERIC_LEN); if (!pd->is_notice) { if (privmsg_funcs[num]) { --- 1579,1583 ---- { struct privmsg_desc *pd = data; ! int num = base64toint(UPROTO(un)->numeric+SERVER_NUMERIC_LEN, USER_NUMERIC_LEN); if (!pd->is_notice) { if (privmsg_funcs[num]) { *************** *** 1652,1656 **** ircu_del_user(struct userNode *user) { ! user->uplink->proto->users[base64toint(user->proto->numeric+SERVER_NUMERIC_LEN, USER_NUMERIC_LEN)] = NULL; } --- 1657,1661 ---- ircu_del_user(struct userNode *user) { ! SPROTO(user->uplink)->users[base64toint(UPROTO(user)->numeric+SERVER_NUMERIC_LEN, USER_NUMERIC_LEN)] = NULL; } *************** *** 1661,1675 **** /* clean up server's user hash tables */ for (i=0; i<USERARRAYSIZE; i++) { ! if (srv->proto->users[i]) { ! DelUser(srv->proto->users[i], NULL, false, "Server delinked"); ! srv->proto->users[i] = NULL; } } /* delete from servers_num array */ ! servers_num[base64toint(srv->proto->numeric, SERVER_NUMERIC_LEN)] = NULL; } ! void ! init_proto(void) { extern time_t boot_time; --- 1666,1679 ---- /* clean up server's user hash tables */ for (i=0; i<USERARRAYSIZE; i++) { ! if (SPROTO(srv)->users[i]) { ! DelUser(SPROTO(srv)->users[i], NULL, 0, "Server delinked"); ! SPROTO(srv)->users[i] = NULL; } } /* delete from servers_num array */ ! servers_num[base64toint(SPROTO(srv)->numeric, SERVER_NUMERIC_LEN)] = NULL; } ! LIB_LOAD_FUNC(mod_init) { extern time_t boot_time; *************** *** 1677,1680 **** --- 1681,1689 ---- char numer[COMBO_NUMERIC_LEN+1]; + /* Register things with module registry */ + proto_module = module_register("proto", MAKE_VERSION(0, 0, 0), NULL, lib); + uproto_note_id = note_register_module("struct userNode", proto_module); + sproto_note_id = note_register_module("struct server", proto_module); + /* initialize data structures */ for (i=0; i<ArrayLength(servers_num); i++) { *************** *** 1781,1784 **** --- 1790,1794 ---- /* register exit functions */ reg_exit_func(free_parse_misc); + return 0; } *************** *** 1790,1794 **** static cmd_func_t *func; ! argc = split_line(line, true, MAXNUMPARAMS, argv); cmd_arg = self->uplink ? 1 : 0; func = dict_find(irc_func_dict, argv[cmd_arg], NULL); --- 1800,1804 ---- static cmd_func_t *func; ! argc = split_line(line, 1, MAXNUMPARAMS, argv); cmd_arg = self->uplink ? 1 : 0; func = dict_find(irc_func_dict, argv[cmd_arg], NULL); *************** *** 1804,1808 **** reg_privmsg_func(struct userNode *user, privmsg_func_t handler) { ! unsigned long numeric = base64toint(user->proto->numeric+SERVER_NUMERIC_LEN, USER_NUMERIC_LEN); if (numeric > num_privmsg_funcs) { int newnum = numeric + 8; --- 1814,1818 ---- reg_privmsg_func(struct userNode *user, privmsg_func_t handler) { ! unsigned long numeric = base64toint(UPROTO(user)->numeric+SERVER_NUMERIC_LEN, USER_NUMERIC_LEN); if (numeric > num_privmsg_funcs) { int newnum = numeric + 8; *************** *** 1820,1824 **** reg_notice_func(struct userNode *user, privmsg_func_t handler) { ! unsigned int numeric = base64toint(user->proto->numeric+SERVER_NUMERIC_LEN, USER_NUMERIC_LEN); if (numeric > num_notice_funcs) { int newnum = numeric + 8; --- 1830,1834 ---- reg_notice_func(struct userNode *user, privmsg_func_t handler) { ! unsigned int numeric = base64toint(UPROTO(user)->numeric+SERVER_NUMERIC_LEN, USER_NUMERIC_LEN); if (numeric > num_notice_funcs) { int newnum = numeric + 8; Index: proto_bahamut.c =================================================================== RCS file: /cvsroot/srvx/services/src/proto_bahamut.c,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -r1.12 -r1.13 *** proto_bahamut.c 2001/09/22 16:12:54 1.12 --- proto_bahamut.c 2001/09/27 21:58:07 1.13 *************** *** 54,61 **** --- 54,64 ---- #include "hash.h" #include "log.h" + #include "modules.h" + #define PROTO_FUNC_TYPE 1 #include "proto.h" #include "timeq.h" #include "tools.h" #include "uplink.h" + #include "proto_bahamut.h" /************************************/ *************** *** 68,74 **** typedef void (*foreach_nonuser) (char *name, void *data); - extern new_channel_func_t *ncf_list; - extern unsigned int ncf_size, ncf_used; extern int ping_freq, ping_timeout; static void timed_send_ping(void *data); static void timed_ping_timeout(void *data); --- 71,76 ---- typedef void (*foreach_nonuser) (char *name, void *data); extern int ping_freq, ping_timeout; + static void timed_send_ping(void *data); static void timed_ping_timeout(void *data); *************** *** 103,114 **** --- 105,122 ---- } uplink; + static struct module *proto_module; + struct userNode_proto { privmsg_func_t privmsg_func; privmsg_func_t notice_func; }; + static unsigned int uproto_note_id; + #define UPROTO(USER) ((struct userNode_proto*)get_note(&(USER)->notes, uproto_note_id)) struct serverNode_proto { dict_t clients; }; + static unsigned int sproto_note_id; + #define SPROTO(SERVER) ((struct serverNode_proto*)get_note(&(SERVER)->notes, sproto_note_id)) /********************/ *************** *** 198,202 **** } ! void irc_uptime(struct userNode *user) { --- 206,210 ---- } ! static void irc_uptime(struct userNode *user) { *************** *** 209,213 **** } ! void irc_whois(struct userNode *from, struct userNode *who) { --- 217,221 ---- } ! static void irc_whois(struct userNode *from, struct userNode *who) { *************** *** 253,259 **** putsock("%s %s %d :%s", CMD_SQUIT, self->name, 0, message); ! if (srv == self->uplink) { ! close_socket(); ! } } --- 261,265 ---- putsock("%s %s %d :%s", CMD_SQUIT, self->name, 0, message); ! if (srv == self->uplink) close_socket(); } *************** *** 270,274 **** } ! void irc_ping(const char *something) { --- 276,280 ---- } ! static void irc_ping(const char *something) { *************** *** 276,280 **** } ! void irc_pong(const char *data) { --- 282,286 ---- } ! static void irc_pong(const char *data) { *************** *** 282,286 **** } ! void irc_pass(const char *passwd) { --- 288,292 ---- } ! static void irc_pass(const char *passwd) { *************** *** 592,597 **** bahamut_new_server(struct server *server) { ! server->proto = calloc(1, sizeof(*server->proto)); ! server->proto->clients = dict_new(); } --- 598,605 ---- bahamut_new_server(struct server *server) { ! struct serverNode_proto *pserver; ! pserver = calloc(1, sizeof(*pserver)); ! pserver->clients = dict_new(); ! put_note(&server->notes, sproto_note_id, pserver); } *************** *** 601,606 **** struct userNode *user = data; (void)key; (void)extra; ! printf("in bahamut_del_server_client(\"%s\", ....)\n", key); ! DelUser(user, NULL, false, "Server delinked"); return 0; } --- 609,613 ---- struct userNode *user = data; (void)key; (void)extra; ! DelUser(user, NULL, 0, "Server delinked"); return 0; } *************** *** 609,615 **** bahamut_del_server(struct server *server) { ! printf("in bahamut_del_server(\"%s\")\n", server->name); ! dict_foreach(server->proto->clients, bahamut_del_server_client, NULL); ! dict_delete(server->proto->clients); } --- 616,621 ---- bahamut_del_server(struct server *server) { ! dict_foreach(SPROTO(server)->clients, bahamut_del_server_client, NULL); ! dict_delete(SPROTO(server)->clients); } *************** *** 617,621 **** bahamut_new_user(struct userNode *user) { ! dict_insert(user->uplink->proto->clients, user->nick, user); return 0; } --- 623,627 ---- bahamut_new_user(struct userNode *user) { ! dict_insert(SPROTO(user->uplink)->clients, user->nick, user); return 0; } *************** *** 627,631 **** bahamut_del_user(struct userNode *user) { ! dict_remove(user->uplink->proto->clients, user->nick); } --- 633,637 ---- bahamut_del_user(struct userNode *user) { ! dict_remove(SPROTO(user->uplink)->clients, user->nick); } *************** *** 686,690 **** /* burst local nicks */ ! dict_foreach(self->proto->clients, burst_send_nick, 0); } --- 692,696 ---- /* burst local nicks */ ! dict_foreach(SPROTO(self)->clients, burst_send_nick, 0); } *************** *** 723,734 **** { struct privmsg_desc *pd = data; ! if (!un->proto) return; if (!pd->is_notice) { ! if (un->proto->privmsg_func) { ! un->proto->privmsg_func(un, pd->user, pd->text); } } else { ! if (un->proto->notice_func) { ! un->proto->notice_func(un, pd->user, pd->text); } } --- 729,741 ---- { struct privmsg_desc *pd = data; ! struct userNode_proto *uproto = UPROTO(un); ! if (!uproto) return; if (!pd->is_notice) { ! if (uproto->privmsg_func) { ! uproto->privmsg_func(un, pd->user, pd->text); } } else { ! if (uproto->notice_func) { ! uproto->notice_func(un, pd->user, pd->text); } } *************** *** 1088,1092 **** /* Sometimes we get a KILL then a QUIT or the like, so we don't want to * call DelUser unless we have the user in our grasp. */ ! if (user) DelUser(user, NULL, false, argv[1]); return 1; } --- 1095,1099 ---- /* Sometimes we get a KILL then a QUIT or the like, so we don't want to * call DelUser unless we have the user in our grasp. */ ! if (user) DelUser(user, NULL, 0, argv[1]); return 1; } *************** *** 1273,1277 **** } ! DelUser(user, NULL, false, argv[2]); return 1; } --- 1280,1284 ---- } ! DelUser(user, NULL, 0, argv[2]); return 1; } *************** *** 1315,1319 **** part_helper(struct chanNode *cn, void *data) { ! DelChannelUser(data, cn, false, 0); } --- 1322,1326 ---- part_helper(struct chanNode *cn, void *data) { ! DelChannelUser(data, cn, 0, 0); } *************** *** 1394,1402 **** } ! void ! init_proto(void) { extern time_t boot_time; /* set up command dictionary */ irc_func_dict = dict_new(); --- 1401,1412 ---- } ! LIB_LOAD_FUNC(mod_init) { extern time_t boot_time; + /* Register things with module registry */ + proto_module = module_register("proto", MAKE_VERSION(0, 0, 0), NULL, lib); + uproto_note_id = note_register_module("struct userNode", proto_module); + sproto_note_id = note_register_module("struct server", proto_module); /* set up command dictionary */ irc_func_dict = dict_new(); *************** *** 1459,1462 **** --- 1469,1473 ---- /* create self server */ self = AddServer(NULL, conf_server_name(), 0, boot_time, now, conf_server_desc()); + return 0; }; *************** *** 1469,1473 **** cmd_arg = (*line == ':') ? 1 : 0; ! argc = split_line(line, true, ArrayLength(argv)-cmd_arg, argv+1-cmd_arg); argv[0] = (cmd_arg == 0) ? NULL : (argv[0]+1); func = dict_find(irc_func_dict, argv[1], NULL); --- 1480,1484 ---- cmd_arg = (*line == ':') ? 1 : 0; ! argc = split_line(line, 1, ArrayLength(argv)-cmd_arg, argv+1-cmd_arg); argv[0] = (cmd_arg == 0) ? NULL : (argv[0]+1); func = dict_find(irc_func_dict, argv[1], NULL); *************** *** 1483,1488 **** reg_privmsg_func(struct userNode *user, privmsg_func_t handler) { ! if (!user->proto) user->proto = calloc(1, sizeof(*user->proto)); ! user->proto->privmsg_func = handler; } --- 1494,1503 ---- reg_privmsg_func(struct userNode *user, privmsg_func_t handler) { ! struct userNode_proto *uproto = UPROTO(user); ! if (!uproto) { ! uproto = calloc(1, sizeof(*uproto)); ! put_note(&user->notes, uproto_note_id, uproto); ! } ! uproto->privmsg_func = handler; } *************** *** 1490,1495 **** reg_notice_func(struct userNode *user, privmsg_func_t handler) { ! if (!user->proto) user->proto = calloc(1, sizeof(*user->proto)); ! user->proto->notice_func = handler; } --- 1505,1514 ---- reg_notice_func(struct userNode *user, privmsg_func_t handler) { ! struct userNode_proto *uproto = UPROTO(user); ! if (!uproto) { ! uproto = calloc(1, sizeof(*uproto)); ! put_note(&user->notes, uproto_note_id, uproto); ! } ! uproto->notice_func = handler; } Index: proto.h =================================================================== RCS file: /cvsroot/srvx/services/src/proto.h,v retrieving revision 1.42 retrieving revision 1.43 diff -C2 -r1.42 -r1.43 *** proto.h 2001/09/22 16:12:54 1.42 --- proto.h 2001/09/27 21:58:07 1.43 *************** *** 22,28 **** #define PROTO_H ! #ifdef HAVE_SYS_TYPES_H #include <sys/types.h> - #endif #ifdef HAVE_NETINET_IN_H #include <netinet/in.h> --- 22,27 ---- #define PROTO_H ! #include <stdarg.h> #include <sys/types.h> #ifdef HAVE_NETINET_IN_H #include <netinet/in.h> *************** *** 45,123 **** #define MODE_CHANGE_BAN 0x008 - #include PROTO_INCLUDE - - #ifndef PROTO_HAS_NUMERIC - #define PROTO_HAS_NUMERIC 0 - #endif - - #ifndef MAXLEN #define MAXLEN 512 - #endif - - #ifndef MAXNUMPARAMS #define MAXNUMPARAMS 200 - #endif - - #ifndef MAXBANS #define MAXBANS 30 ! #endif - #ifndef MAXMODEPARAMS - #define MAXMODEPARAMS MAXNUMPARAMS - #endif - - #ifndef PROTO_MODENODE_MODE_CHARS - #define PROTO_MODENODE_MODE_CHARS "" - #endif - - #ifndef PROTO_CHANNEL_MODE_CHARS - #define PROTO_CHANNEL_MODE_CHARS "" - #endif - - #ifndef PROTO_USER_MODE_CHARS - #define PROTO_USER_MODE_CHARS "" - #endif - - #ifndef CHANSERV_JOINS_CHANNELS - #define CHANSERV_JOINS_CHANNELS 1 - #endif - /********************/ /* PROTOCOL SPEWING */ /********************/ /* connection maintenance */ ! void irc_server(struct server *srv); ! void irc_uptime(struct userNode *user); ! void irc_whois(struct userNode *from, struct userNode *who); ! void irc_user(struct userNode *user); ! void irc_nick(struct userNode *user); ! void irc_pass(const char *passwd); ! void irc_introduce(const char *passwd); ! void irc_ping(const char *something); ! void irc_pong(const char *data); ! void irc_quit(struct userNode *user, const char *message); ! void irc_squit(struct server *srv, const char *message); /* messages */ ! void irc_privmsg(struct userNode *from, const char *to, const char *message); ! void irc_notice(struct userNode *from, const char *to, const char *message); /* channel maintenance */ ! void irc_join(struct userNode *who, struct chanNode *what); ! void irc_invite(struct userNode *from, struct userNode *who, struct chanNode *to); ! void irc_mode(struct userNode *from, struct chanNode *target, const char *modes); ! void irc_kick(struct userNode *actor, struct userNode *who, struct chanNode *from, const char *msg); ! void irc_part(struct userNode *who, struct chanNode *what, const char *reason); ! void irc_topic(struct userNode *who, struct chanNode *what, const char *topic); ! void irc_fetchtopic(struct userNode *from, struct chanNode *what); /* network maintenance */ ! void irc_gline(const char *host, unsigned long duration, const char *message); ! void irc_ungline(const char *mask); ! void irc_error(const char *to, const char *message); ! void irc_kill(struct userNode *from, struct userNode *target, const char *message); ! void irc_raw(const char *what); ! void irc_stats(struct userNode *from, struct server *target, char type); /********************/ --- 44,101 ---- #define MODE_CHANGE_BAN 0x008 #define MAXLEN 512 #define MAXNUMPARAMS 200 #define MAXBANS 30 ! #define MAXMODEPARAMS 6 ! #define MIN_LINE_SIZE 40 ! #define MAX_LINE_SIZE 450 ! ! typedef char *(*expand_func_t)(const char *variable); ! int send_message(struct userNode *dest, struct userNode *src, const char *format, ...); ! void proto_init(void); /********************/ /* PROTOCOL SPEWING */ /********************/ + #if PROTO_FUNC_TYPE == 1 + /* For protocol modules */ + #define PROTO_FUNC(retval, name) retval name + #elif PROTO_FUNC_TYPE == 2 + /* For proto.c, the generic binder */ + #define PROTO_FUNC(retval, name) retval (*name) + #else + /* For other files */ + #define PROTO_FUNC(retval, name) extern retval (*name) + #endif + /* connection maintenance */ ! PROTO_FUNC(void, irc_server)(struct server *srv); ! PROTO_FUNC(void, irc_user)(struct userNode *user); ! PROTO_FUNC(void, irc_nick)(struct userNode *user); ! PROTO_FUNC(void, irc_introduce)(const char *passwd); ! PROTO_FUNC(void, irc_quit)(struct userNode *user, const char *message); ! PROTO_FUNC(void, irc_squit)(struct server *srv, const char *message); /* messages */ ! PROTO_FUNC(void, irc_privmsg)(struct userNode *from, const char *to, const char *message); ! PROTO_FUNC(void, irc_notice)(struct userNode *from, const char *to, const char *message); /* channel maintenance */ ! PROTO_FUNC(void, irc_join)(struct userNode *who, struct chanNode *what); ! PROTO_FUNC(void, irc_invite)(struct userNode *from, struct userNode *who, struct chanNode *to); ! PROTO_FUNC(void, irc_mode)(struct userNode *from, struct chanNode *target, const char *modes); ! PROTO_FUNC(void, irc_kick)(struct userNode *actor, struct userNode *who, struct chanNode *from, const char *msg); ! PROTO_FUNC(void, irc_part)(struct userNode *who, struct chanNode *what, const char *reason); ! PROTO_FUNC(void, irc_topic)(struct userNode *who, struct chanNode *what, const char *topic); ! PROTO_FUNC(void, irc_fetchtopic)(struct userNode *from, struct chanNode *what); /* network maintenance */ ! PROTO_FUNC(void, irc_gline)(const char *host, unsigned long duration, const char *message); ! PROTO_FUNC(void, irc_ungline)(const char *mask); ! PROTO_FUNC(void, irc_error)(const char *to, const char *message); ! PROTO_FUNC(void, irc_kill)(struct userNode *from, struct userNode *target, const char *message); ! PROTO_FUNC(void, irc_raw)(const char *what); ! PROTO_FUNC(void, irc_stats)(struct userNode *from, struct server *target, char type); /********************/ *************** *** 125,151 **** /********************/ ! void reg_chanmsg_func(unsigned char prefix, struct userNode *service, chanmsg_func_t handler); ! void reg_privmsg_func(struct userNode *user, privmsg_func_t handler); ! void reg_notice_func(struct userNode *user, privmsg_func_t handler); ! void reg_mode_change_func(mode_change_func_t handler); - int parse_line(unsigned char *line); - /**********************/ /* MISCELLANEOUS GUNK */ /**********************/ ! void init_proto(void); ! struct userNode *add_local_user(const char *nick, const char *ident, const char *hostname, const char *modes, const char *userinfo, time_t timestamp); ! /* These next three functions could almost be put in hash.c, ! * since they are very similar for each protocol. However, ! * it would require exposing the innards of the per-protocol ! * fooNode_proto structs to hash.c, and I don't want to do ! * that. (In particular, ircu_p10 needs to know the numeric ! * when changing chanmode for a user.) ! */ ! void chan_apply_bans(struct userNode *who, struct chanNode *channel, char *what, unsigned int count, char **list); ! void chan_apply_mode(struct userNode *who, struct chanNode *channel, char *what, unsigned int count, struct userNode **list); ! void irc_change_channel_modes(struct chanNode *channel, struct userNode *source, const unsigned char *modes, va_list args); #endif /* !defined(PROTO_H) */ --- 103,122 ---- /********************/ ! PROTO_FUNC(void, reg_chanmsg_func)(unsigned char prefix, struct userNode *service, chanmsg_func_t handler); ! PROTO_FUNC(void, reg_privmsg_func)(struct userNode *user, privmsg_func_t handler); ! PROTO_FUNC(void, reg_notice_func)(struct userNode *user, privmsg_func_t handler); ! PROTO_FUNC(void, reg_mode_change_func)(mode_change_func_t handler); ! PROTO_FUNC(int, parse_line)(unsigned char *line); /**********************/ /* MISCELLANEOUS GUNK */ /**********************/ + + PROTO_FUNC(struct userNode*, add_local_user)(const char *nick, const char *ident, const char *hostname, const char *modes, const char *userinfo, time_t timestamp); + PROTO_FUNC(void, chan_apply_bans)(struct userNode *who, struct chanNode *channel, char *what, unsigned int count, char **list); + PROTO_FUNC(void, chan_apply_mode)(struct userNode *who, struct chanNode *channel, char *what, unsigned int count, struct userNode **list); + PROTO_FUNC(void, irc_change_channel_modes)(struct chanNode *channel, struct userNode *source, const unsigned char *modes, va_list args); ! #undef PROTO_FUNC #endif /* !defined(PROTO_H) */ Index: policer.h =================================================================== RCS file: /cvsroot/srvx/services/src/policer.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** policer.h 2001/03/30 21:20:10 1.5 --- policer.h 2001/09/27 21:58:07 1.6 *************** *** 41,44 **** --- 41,46 ---- int policer_conforms(struct policer *pol, policer_time_t reqtime, double weight); void policer_delete(struct policer *pol); + /* For use with dict_foreach() and dicts containing policer params */ + int set_policer_param(const char *param, void *data, void *extra); #endif /* ndef POLICER_H */ Index: policer.c =================================================================== RCS file: /cvsroot/srvx/services/src/policer.c,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -r1.12 -r1.13 *** policer.c 2001/03/30 21:20:10 1.12 --- policer.c 2001/09/27 21:58:07 1.13 *************** *** 28,31 **** --- 28,32 ---- #include "common.h" + #include "recdb.h" #include "policer.h" *************** *** 89,91 **** --- 90,101 ---- { free(pol); + } + + int + set_policer_param(const char *param, void *data, void *extra) + { + struct record_data *rd = data; + const char *str = GET_RECORD_QSTRING(rd); + if (str) policer_params_set(extra, param, str); + return 0; } Index: opserv.c =================================================================== RCS file: /cvsroot/srvx/services/src/opserv.c,v retrieving revision 1.212 retrieving revision 1.213 diff -C2 -r1.212 -r1.213 *** opserv.c 2001/09/22 16:12:54 1.212 --- opserv.c 2001/09/27 21:58:07 1.213 *************** *** 388,394 **** const char *OSMSG_VERSION_ID = "$Id$"; ! #define opserv_notice(target, format...) send_message(target , opserv , ## format) ! #define opserv_debug(format...) do { if (opserv_conf.debug_channel) send_channel_notice(opserv_conf.debug_channel , opserv, ## format); } while (0) ! #define opserv_alert(format...) do { if (opserv_conf.alert_channel) send_channel_notice(opserv_conf.alert_channel , opserv, ## format); } while (0) /* This function is called when a channel command (or --- 388,394 ---- const char *OSMSG_VERSION_ID = "$Id$"; ! #define opserv_notice(target, format...) send_message(target, opserv , ## format) ! #define opserv_debug(format...) do { if (opserv_conf.debug_channel) send_target_message(0, opserv_conf.debug_channel, opserv , ## format); } while (0) ! #define opserv_alert(format...) do { if (opserv_conf.alert_channel) send_target_message(0, opserv_conf.alert_channel, opserv , ## format); } while (0) /* This function is called when a channel command (or *************** *** 421,425 **** argv_shift = 1; ! argc = split_line(text, false, ArrayLength(argv)-argv_shift, argv+argv_shift); if(!argc) return; --- 421,425 ---- argv_shift = 1; ! argc = split_line(text, 0, ArrayLength(argv)-argv_shift, argv+argv_shift); if(!argc) return; *************** *** 510,514 **** { char *mask; ! OPSERV_MIN_PARMS(2, true); mask = argv[1]; if (!is_ircmask(mask)) { --- 510,514 ---- { char *mask; ! OPSERV_MIN_PARMS(2, 1); mask = argv[1]; if (!is_ircmask(mask)) { *************** *** 593,597 **** char *reason, *message; ! OPSERV_MIN_PARMS(2, false); if (argv[-1] && IsChannelName(argv[-1])) { --- 593,597 ---- char *reason, *message; ! OPSERV_MIN_PARMS(2, 0); if (argv[-1] && IsChannelName(argv[-1])) { *************** *** 627,631 **** /* This was 1 originally...but that doesn't seem right. */ ! OPSERV_MIN_PARMS(2, false); if (argv[-1] && IsChannelName(argv[-1])) { --- 627,631 ---- /* This was 1 originally...but that doesn't seem right. */ ! OPSERV_MIN_PARMS(2, 0); if (argv[-1] && IsChannelName(argv[-1])) { *************** *** 689,693 **** unsigned int count, next; ! OPSERV_MIN_PARMS(2, true); for (count=0, next=1; next<argc; next++) { if (!(list[count] = GetUser(argv[next]))) continue; --- 689,693 ---- unsigned int count, next; ! OPSERV_MIN_PARMS(2, 1); for (count=0, next=1; next<argc; next++) { if (!(list[count] = GetUser(argv[next]))) continue; *************** *** 770,774 **** void uplink_select(char *name); ! OPSERV_MIN_PARMS(2, false); unsplit_string(argv+1, argc-1); --- 770,774 ---- void uplink_select(char *name); ! OPSERV_MIN_PARMS(2, 0); unsplit_string(argv+1, argc-1); *************** *** 786,790 **** char *reason; ! OPSERV_MIN_PARMS(2, false); unsplit_string(argv+1, argc-1); --- 786,790 ---- char *reason; ! OPSERV_MIN_PARMS(2, 0); unsplit_string(argv+1, argc-1); *************** *** 804,808 **** char **restart_argv, *reason; ! OPSERV_MIN_PARMS(2, false); unsplit_string(argv+1, argc-1); --- 804,808 ---- char **restart_argv, *reason; ! OPSERV_MIN_PARMS(2, 0); unsplit_string(argv+1, argc-1); *************** *** 846,850 **** struct userNode *target; (void)channel; /* irrelevant to this command */ ! OPSERV_MIN_PARMS(2, false); target = GetUser(argv[1]); if (!target) { --- 846,850 ---- struct userNode *target; (void)channel; /* irrelevant to this command */ ! OPSERV_MIN_PARMS(2, 0); target = GetUser(argv[1]); if (!target) { *************** *** 869,873 **** { unsigned long duration; ! OPSERV_MIN_PARMS(4, false); unsplit_string(argv+3, argc-3); --- 869,873 ---- { unsigned long duration; ! OPSERV_MIN_PARMS(4, 0); unsplit_string(argv+3, argc-3); *************** *** 889,893 **** static OPSERV_FUNC(cmd_ungline) { ! OPSERV_MIN_PARMS(2, false); gline_remove(argv[1], 1); opserv_notice(user, OSMSG_GLINE_REMOVED, argv[1]); --- 889,893 ---- static OPSERV_FUNC(cmd_ungline) { ! OPSERV_MIN_PARMS(2, 0); gline_remove(argv[1], 1); opserv_notice(user, OSMSG_GLINE_REMOVED, argv[1]); *************** *** 980,984 **** struct userNode *target; ! OPSERV_MIN_PARMS(2, false); target = GetUser(argv[1]); if (!target) { --- 980,984 ---- struct userNode *target; ! OPSERV_MIN_PARMS(2, 0); target = GetUser(argv[1]); if (!target) { *************** *** 995,999 **** char *reason; ! OPSERV_MIN_PARMS(2, true); if (argc < 3) { reason = alloca(strlen(OSMSG_KICK_REQUESTED)+strlen(user->nick)+1); --- 995,999 ---- char *reason; ! OPSERV_MIN_PARMS(2, 1); if (argc < 3) { reason = alloca(strlen(OSMSG_KICK_REQUESTED)+strlen(user->nick)+1); *************** *** 1050,1054 **** char *mask; ! OPSERV_MIN_PARMS(2, true); if (argc == 2) { reason = alloca(strlen(OSMSG_KICK_REQUESTED)+strlen(user->nick)+1); --- 1050,1054 ---- char *mask; ! OPSERV_MIN_PARMS(2, 1); if (argc == 2) { reason = alloca(strlen(OSMSG_KICK_REQUESTED)+strlen(user->nick)+1); *************** *** 1139,1143 **** static OPSERV_FUNC(cmd_mode) { ! OPSERV_MIN_PARMS(2, true); unsplit_string(argv+1, argc-1); if (channel->key[0]) ChangeChannelModes(channel, opserv, "-k", channel->key); --- 1139,1143 ---- static OPSERV_FUNC(cmd_mode) { ! OPSERV_MIN_PARMS(2, 1); unsplit_string(argv+1, argc-1); if (channel->key[0]) ChangeChannelModes(channel, opserv, "-k", channel->key); *************** *** 1152,1156 **** struct userNode *target; char *usermask; ! OPSERV_MIN_PARMS(2, true); target = GetUser(argv[1]); if (!target) { --- 1152,1156 ---- struct userNode *target; char *usermask; ! OPSERV_MIN_PARMS(2, 1); target = GetUser(argv[1]); if (!target) { *************** *** 1171,1175 **** unsigned int count, next; ! OPSERV_MIN_PARMS(2, true); for (count=0, next=1; next<argc; next++) { if (!(list[count] = GetUser(argv[next]))) continue; --- 1171,1175 ---- unsigned int count, next; ! OPSERV_MIN_PARMS(2, 1); for (count=0, next=1; next<argc; next++) { if (!(list[count] = GetUser(argv[next]))) continue; *************** *** 1219,1223 **** char buffer[128]; ! OPSERV_MIN_PARMS(2, false); target = GetUser(argv[1]); if (!target) { --- 1219,1223 ---- char buffer[128]; ! OPSERV_MIN_PARMS(2, 0); target = GetUser(argv[1]); if (!target) { *************** *** 1248,1252 **** static OPSERV_FUNC(cmd_unban) { ! OPSERV_MIN_PARMS(2, true); DelChannelBan(argc-1, (char**)argv+1, channel, opserv, 1); opserv_notice(user, OSMSG_UNBAN_DONE, channel->name); --- 1248,1252 ---- static OPSERV_FUNC(cmd_unban) { ! OPSERV_MIN_PARMS(2, 1); DelChannelBan(argc-1, (char**)argv+1, channel, opserv, 1); opserv_notice(user, OSMSG_UNBAN_DONE, channel->name); *************** *** 1300,1304 **** int level; ! OPSERV_MIN_PARMS(3, false); unsplit_string(argv+1, argc-2); --- 1300,1304 ---- int level; ! OPSERV_MIN_PARMS(3, 0); unsplit_string(argv+1, argc-2); *************** *** 1318,1322 **** struct opserv_cmd *cmd; ! OPSERV_MIN_PARMS(2, false); unsplit_string(argv+1, argc-1); --- 1318,1322 ---- struct opserv_cmd *cmd; ! OPSERV_MIN_PARMS(2, 0); unsplit_string(argv+1, argc-1); *************** *** 1335,1339 **** struct opserv_cmd *cmd; ! OPSERV_MIN_PARMS(2, false); cmd = dict_find(opserv_func_dict, argv[1], NULL); if (!cmd) { --- 1335,1339 ---- struct opserv_cmd *cmd; ! OPSERV_MIN_PARMS(2, 0); cmd = dict_find(opserv_func_dict, argv[1], NULL); if (!cmd) { *************** *** 1350,1354 **** struct opserv_cmd *cmd; ! OPSERV_MIN_PARMS(2, false); cmd = dict_find(opserv_func_dict, argv[1], NULL); if (!cmd) { --- 1350,1354 ---- struct opserv_cmd *cmd; ! OPSERV_MIN_PARMS(2, 0); cmd = dict_find(opserv_func_dict, argv[1], NULL); if (!cmd) { *************** *** 1590,1594 **** static OPSERV_FUNC(cmd_stats) { ! OPSERV_MIN_PARMS(2, false); if (!strcasecmp(argv[1], "bad")) cmd_stats_bad(user); else if (!strcasecmp(argv[1], "glines")) cmd_stats_glines(user); --- 1590,1594 ---- static OPSERV_FUNC(cmd_stats) { ! OPSERV_MIN_PARMS(2, 0); if (!strcasecmp(argv[1], "bad")) cmd_stats_bad(user); else if (!strcasecmp(argv[1], "glines")) cmd_stats_glines(user); *************** *** 1617,1621 **** unsigned long addr; ! OPSERV_MIN_PARMS(2, false); for (n=1; n<argc; n++) { struct userNode *un = GetUser(argv[n]); --- 1617,1621 ---- unsigned long addr; ! OPSERV_MIN_PARMS(2, 0); for (n=1; n<argc; n++) { struct userNode *un = GetUser(argv[n]); *************** *** 1641,1645 **** unsigned int n, i; ! OPSERV_MIN_PARMS(2, false); for (n=1; n<argc; n++) { --- 1641,1645 ---- unsigned int n, i; ! OPSERV_MIN_PARMS(2, 0); for (n=1; n<argc; n++) { *************** *** 1665,1669 **** { char *linedup; ! OPSERV_MIN_PARMS(2, false); unsplit_string(argv+1, argc-1); --- 1665,1669 ---- { char *linedup; ! OPSERV_MIN_PARMS(2, 0); unsplit_string(argv+1, argc-1); *************** *** 1683,1687 **** { char *linedup; ! OPSERV_MIN_PARMS(2, false); unsplit_string(argv+1, argc-1); --- 1683,1687 ---- { char *linedup; ! OPSERV_MIN_PARMS(2, 0); unsplit_string(argv+1, argc-1); *************** *** 1711,1715 **** return NULL; } ! DelUser(resv, opserv, true, OSMSG_NICK_RESERVED); } resv = AddClone(nick, username, host, desc); --- 1711,1715 ---- return NULL; } ! DelUser(resv, opserv, 1, OSMSG_NICK_RESERVED); } resv = AddClone(nick, username, host, desc); *************** *** 1722,1726 **** struct userNode *resv; ! OPSERV_MIN_PARMS(5, false); unsplit_string(argv+4, argc-4); --- 1722,1726 ---- struct userNode *resv; ! OPSERV_MIN_PARMS(5, 0); unsplit_string(argv+4, argc-4); *************** *** 1738,1742 **** struct userNode *resv; ! OPSERV_MIN_PARMS(5, false); unsplit_string(argv+4, argc-4); --- 1738,1742 ---- struct userNode *resv; ! OPSERV_MIN_PARMS(5, 0); unsplit_string(argv+4, argc-4); *************** *** 1753,1757 **** static OPSERV_FUNC(cmd_unreserve) { ! OPSERV_MIN_PARMS(2, false); if (dict_remove(opserv_reserved_nick_dict, argv[1])) { --- 1753,1757 ---- static OPSERV_FUNC(cmd_unreserve) { ! OPSERV_MIN_PARMS(2, 0); if (dict_remove(opserv_reserved_nick_dict, argv[1])) { *************** *** 1768,1772 **** const char *reason; ! OPSERV_MIN_PARMS(2, false); unsplit_string(argv+1, argc-1); --- 1768,1772 ---- const char *reason; ! OPSERV_MIN_PARMS(2, 0); unsplit_string(argv+1, argc-1); *************** *** 1940,1944 **** unsigned int m, n; ! OPSERV_MIN_PARMS(2, false); for (n=1; n<argc; n++) { --- 1940,1944 ---- unsigned int m, n; ! OPSERV_MIN_PARMS(2, 0); for (n=1; n<argc; n++) { *************** *** 1961,1965 **** unsigned int m, n; ! OPSERV_MIN_PARMS(2, false); for (n=1; n<argc; n++) { --- 1961,1965 ---- unsigned int m, n; ! OPSERV_MIN_PARMS(2, 0); for (n=1; n<argc; n++) { *************** ***... [truncated message content] |
From: Entrope <en...@us...> - 2001-09-27 21:58:25
|
Update of /cvsroot/srvx/services In directory usw-pr-cvs1:/tmp/cvs-serv11746 Modified Files: configure.ac autogen.sh aclocal.m4 Makefile.am Log Message: first step at modularizing services - the old four are gone, to be repartitioned and using a better common framework help files are moved from src/ to doc/ directory protocol backends are made dynamically loadable Index: configure.ac =================================================================== RCS file: /cvsroot/srvx/services/configure.ac,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** configure.ac 2001/09/26 02:34:25 1.8 --- configure.ac 2001/09/27 21:58:08 1.9 *************** *** 1,5 **** dnl Process this file with autoconf to create a configure script. dnl Then invoke that configure script using a command line like this: ! dnl ./configure --enable-maintainer-mode --enable-transition --enable-debug --enable-proto=ircu_p10 dnl General initialization. --- 1,5 ---- dnl Process this file with autoconf to create a configure script. dnl Then invoke that configure script using a command line like this: ! dnl ./configure --enable-maintainer-mode --enable-transition --enable-debug dnl General initialization. *************** *** 20,23 **** --- 20,24 ---- AC_TYPE_SIGNAL AC_C_CONST + AC_DISABLE_STATIC dnl Checks for programs. *************** *** 232,248 **** [ AC_MSG_RESULT(no)]) - AC_MSG_CHECKING(which protocol to build) - AC_ARG_ENABLE(proto, - [ --enable-proto=PROTO IRC dialect to support (one of: ircu_p10, bahamut); default: ircu_p10], - [PROTO="$enableval"], - [PROTO=ircu_p10]) - if test ! -f "${srcdir}/src/proto_${PROTO}.h" ; then - AC_MSG_ERROR([Missing file ${srcdir}/src/proto_${PROTO}.h; do we really support protocol ${PROTO}?]) - fi - AC_DEFINE_UNQUOTED(PROTO_INCLUDE, "proto_${PROTO}.h", [Header file for IRC dialect support]) - AC_MSG_RESULT($PROTO) - - MY_SUBDIRS="" - MY_SUBDIRS="$MY_SUBDIRS src" CFLAGS="$CFLAGS -W -Wall" if test "z$USE_MAINTAINER_MODE" = zyes ; then --- 233,236 ---- *************** *** 250,255 **** fi ! AC_SUBST(MY_SUBDIRS) ! AC_SUBST(PROTO) ! AC_CONFIG_FILES([Makefile src/Makefile po/Makefile.in po/Makefile intl/Makefile]) AC_OUTPUT --- 238,242 ---- fi ! AC_SUBST(export_dynamic_flag_spec) ! AC_CONFIG_FILES([po/Makefile.in po/Makefile intl/Makefile docs/Makefile src/Makefile Makefile]) AC_OUTPUT Index: autogen.sh =================================================================== RCS file: /cvsroot/srvx/services/autogen.sh,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** autogen.sh 2001/09/26 02:34:25 1.5 --- autogen.sh 2001/09/27 21:58:08 1.6 *************** *** 3,6 **** aclocal autoheader -Wall ! automake -a --gnu Makefile src/Makefile autoconf -Wall --- 3,6 ---- aclocal autoheader -Wall ! automake -a --gnu Makefile src/Makefile docs/Makefile autoconf -Wall Index: aclocal.m4 =================================================================== RCS file: /cvsroot/srvx/services/aclocal.m4,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -r1.13 -r1.14 *** aclocal.m4 2001/09/26 02:34:25 1.13 --- aclocal.m4 2001/09/27 21:58:08 1.14 *************** *** 159,3047 **** fi]) ! # Macro to add for using GNU gettext. ! # Ulrich Drepper <dr...@cy...>, 1995. ! # ! # This file can be copied and used freely without restrictions. It can ! # be used in projects which are not available under the GNU General Public ! # License or the GNU Library General Public License but which still want ! # to provide support for the GNU gettext functionality. ! # Please note that the actual code of the GNU gettext library is covered [...6260 lines suppressed...] ! # to provide support for the GNU gettext functionality. ! # Please note that the actual code of the GNU gettext library is covered ! # by the GNU Library General Public License, and the rest of the GNU ! # gettext package package is covered by the GNU General Public License. ! # They are *not* in the public domain. ! ! # serial 2 ! ! AC_DEFUN([AM_LC_MESSAGES], ! [if test $ac_cv_header_locale_h = yes; then ! AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES, ! [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES], ! am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)]) ! if test $am_cv_val_LC_MESSAGES = yes; then ! AC_DEFINE(HAVE_LC_MESSAGES, 1, ! [Define if your <locale.h> file defines LC_MESSAGES.]) ! fi ! fi]) Index: Makefile.am =================================================================== RCS file: /cvsroot/srvx/services/Makefile.am,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -r1.13 -r1.14 *** Makefile.am 2001/09/26 02:34:25 1.13 --- Makefile.am 2001/09/27 21:58:08 1.14 *************** *** 1,2 **** EXTRA_DIST = srvx.conf.example sockcheck.db.example ! SUBDIRS = src po intl --- 1,2 ---- EXTRA_DIST = srvx.conf.example sockcheck.db.example ! SUBDIRS = po intl docs src |
From: Entrope <en...@us...> - 2001-09-27 21:57:33
|
Update of /cvsroot/srvx/services/src In directory usw-pr-cvs1:/tmp/cvs-serv11720/src Removed Files: nickserv-not.help Log Message: first step at modularizing services - the old four are gone, to be repartitioned and using a better common framework help files are moved from src/ to doc/ directory protocol backends are made dynamically loadable --- nickserv-not.help DELETED --- |
From: Entrope <en...@us...> - 2001-09-27 21:55:04
|
Update of /cvsroot/srvx/services/docs In directory usw-pr-cvs1:/tmp/cvs-serv11124/docs Log Message: Directory /cvsroot/srvx/services/docs added to the repository |
From: Entrope <en...@us...> - 2001-09-27 12:49:34
|
Update of /cvsroot/srvx/services/src In directory usw-pr-cvs1:/tmp/cvs-serv31531/src Modified Files: Tag: rel-1_0 log.c Log Message: put fflush() on log file in better place Index: log.c =================================================================== RCS file: /cvsroot/srvx/services/src/log.c,v retrieving revision 1.27.2.8 retrieving revision 1.27.2.9 diff -C2 -r1.27.2.8 -r1.27.2.9 *** log.c 2001/09/27 12:38:47 1.27.2.8 --- log.c 2001/09/27 12:49:31 1.27.2.9 *************** *** 149,157 **** } fputs(sev, logs[lt].file); - fflush(logs[lt].file); va_start(arg_list, text); size = vfprintf(logs[lt].file, text, arg_list) + 1; va_end(arg_list); if (!silent) { va_start(arg_list, text); --- 149,157 ---- } fputs(sev, logs[lt].file); va_start(arg_list, text); size = vfprintf(logs[lt].file, text, arg_list) + 1; va_end(arg_list); + fflush(logs[lt].file); if (!silent) { va_start(arg_list, text); |
From: Entrope <en...@us...> - 2001-09-27 12:49:17
|
Update of /cvsroot/srvx/services In directory usw-pr-cvs1:/tmp/cvs-serv31444 Modified Files: Tag: rel-1_0 configure.in Log Message: bump version number to 0.9.8 Index: configure.in =================================================================== RCS file: /cvsroot/srvx/services/Attic/configure.in,v retrieving revision 1.39.2.18 retrieving revision 1.39.2.19 diff -C2 -r1.39.2.18 -r1.39.2.19 *** configure.in 2001/09/05 05:37:19 1.39.2.18 --- configure.in 2001/09/27 12:49:14 1.39.2.19 *************** *** 7,14 **** AM_CONFIG_HEADER(src/config.h) ! AM_INIT_AUTOMAKE(srvx, 0.9.7) AM_MAINTAINER_MODE - - AC_PREFIX_DEFAULT(~/srvx-0.9.7) dnl Sanity checks. --- 7,12 ---- AM_CONFIG_HEADER(src/config.h) ! AM_INIT_AUTOMAKE(srvx, 0.9.8) AM_MAINTAINER_MODE dnl Sanity checks. |
From: Entrope <en...@us...> - 2001-09-27 12:38:50
|
Update of /cvsroot/srvx/services/src In directory usw-pr-cvs1:/tmp/cvs-serv28862/src Modified Files: Tag: rel-1_0 log.c Log Message: use va_start()/va_end() appropriately after calling v*printf() Index: log.c =================================================================== RCS file: /cvsroot/srvx/services/src/log.c,v retrieving revision 1.27.2.7 retrieving revision 1.27.2.8 diff -C2 -r1.27.2.7 -r1.27.2.8 *** log.c 2001/08/05 17:07:59 1.27.2.7 --- log.c 2001/09/27 12:38:47 1.27.2.8 *************** *** 153,161 **** va_start(arg_list, text); size = vfprintf(logs[lt].file, text, arg_list) + 1; ! if (!silent) vprintf(text, arg_list); if (size > entry->size) { entry->text = realloc(entry->text, size); entry->size = size; } vsprintf(entry->text, text, arg_list); va_end(arg_list); --- 153,167 ---- va_start(arg_list, text); size = vfprintf(logs[lt].file, text, arg_list) + 1; ! va_end(arg_list); ! if (!silent) { ! va_start(arg_list, text); ! vprintf(text, arg_list); ! va_end(arg_list); ! } if (size > entry->size) { entry->text = realloc(entry->text, size); entry->size = size; } + va_start(arg_list, text); vsprintf(entry->text, text, arg_list); va_end(arg_list); |
From: Entrope <en...@us...> - 2001-09-26 03:03:14
|
Update of /cvsroot/srvx/services/src In directory usw-pr-cvs1:/tmp/cvs-serv17800/src Modified Files: Tag: rel-1_0 tools.c Log Message: don't overrun a channel's key buffer Index: tools.c =================================================================== RCS file: /cvsroot/srvx/services/src/tools.c,v retrieving revision 1.73.2.27 retrieving revision 1.73.2.28 diff -C2 -r1.73.2.27 -r1.73.2.28 *** tools.c 2001/09/10 19:11:49 1.73.2.27 --- tools.c 2001/09/26 03:03:12 1.73.2.28 *************** *** 183,187 **** void mod_chanmode(struct chanNode *channel, const char *mode_change, char *key, int limit) { ! int add = 1, n; const char *word = mode_change; --- 183,187 ---- void mod_chanmode(struct chanNode *channel, const char *mode_change, char *key, int limit) { ! int add = 1; const char *word = mode_change; *************** *** 213,220 **** else { ! for (n=0; *word != ' ' && *word; n++) { channel->key[n] = *word++; } - channel->key[n] = 0; } --- 213,220 ---- else { ! unsigned int n; ! for (n=0; (*word != ' ' && *word) && (n < sizeof(channel->key)-1); n++) { channel->key[n] = *word++; } channel->key[n] = 0; } |
From: Entrope <en...@us...> - 2001-09-26 02:34:28
|
Update of /cvsroot/srvx/services In directory usw-pr-cvs1:/tmp/cvs-serv26808 Modified Files: Makefile.am aclocal.m4 autogen.sh configure.ac Added Files: ABOUT-NLS Log Message: start to support I18N and stuff --- NEW FILE --- Notes on the Free Translation Project ************************************* Free software is going international! The Free Translation Project is a way to get maintainers of free software, translators, and users all together, so that will gradually become able to speak many languages. A few packages already provide translations for their messages. If you found this `ABOUT-NLS' file inside a distribution, you may assume that the distributed package does use GNU `gettext' internally, itself available at your nearest GNU archive site. But you do _not_ need to install GNU `gettext' prior to configuring, installing or using this package with messages translated. Installers will find here some useful hints. These notes also explain how users should proceed for getting the programs to use the available translations. They tell how people wanting to contribute and work at translations should contact the appropriate team. When reporting bugs in the `intl/' directory or bugs which may be related to internationalization, you should tell about the version of `gettext' which is used. The information can be found in the `intl/VERSION' file, in internationalized packages. Quick configuration advice ========================== If you want to exploit the full power of internationalization, you should configure it using ./configure --with-included-gettext to force usage of internationalizing routines provided within this package, despite the existence of internationalizing capabilities in the operating system where this package is being installed. So far, only the `gettext' implementation in the GNU C library version 2 provides as many features (such as locale alias, message inheritance, automatic charset conversion or plural form handling) as the implementation here. It is also not possible to offer this additional functionality on top of a `catgets' implementation. Future versions of GNU `gettext' will very likely convey even more functionality. So it might be a good idea to change to GNU `gettext' as soon as possible. So you need _not_ provide this option if you are using GNU libc 2 or you have installed a recent copy of the GNU gettext package with the included `libintl'. INSTALL Matters =============== Some packages are "localizable" when properly installed; the programs they contain can be made to speak your own native language. Most such packages use GNU `gettext'. Other packages have their own ways to internationalization, predating GNU `gettext'. By default, this package will be installed to allow translation of messages. It will automatically detect whether the system already provides the GNU `gettext' functions. If not, the GNU `gettext' own library will be used. This library is wholly contained within this package, usually in the `intl/' subdirectory, so prior installation of the GNU `gettext' package is _not_ required. Installers may use special options at configuration time for changing the default behaviour. The commands: ./configure --with-included-gettext ./configure --disable-nls will respectively bypass any pre-existing `gettext' to use the internationalizing routines provided within this package, or else, _totally_ disable translation of messages. When you already have GNU `gettext' installed on your system and run configure without an option for your new package, `configure' will probably detect the previously built and installed `libintl.a' file and will decide to use this. This might be not what is desirable. You should use the more recent version of the GNU `gettext' library. I.e. if the file `intl/VERSION' shows that the library which comes with this package is more recent, you should use ./configure --with-included-gettext to prevent auto-detection. The configuration process will not test for the `catgets' function and therefore it will not be used. The reason is that even an emulation of `gettext' on top of `catgets' could not provide all the extensions of the GNU `gettext' library. Internationalized packages have usually many `po/LL.po' files, where LL gives an ISO 639 two-letter code identifying the language. Unless translations have been forbidden at `configure' time by using the `--disable-nls' switch, all available translations are installed together with the package. However, the environment variable `LINGUAS' may be set, prior to configuration, to limit the installed set. `LINGUAS' should then contain a space separated list of two-letter codes, stating which languages are allowed. Using This Package ================== As a user, if your language has been installed for this package, you only have to set the `LANG' environment variable to the appropriate `LL_CC' combination. Here `LL' is an ISO 639 two-letter language code, and `CC' is an ISO 3166 two-letter country code. For example, let's suppose that you speak German and live in Germany. At the shell prompt, merely execute `setenv LANG de_DE' (in `csh'), `export LANG; LANG=de_DE' (in `sh') or `export LANG=de_DE' (in `bash'). This can be done from your `.login' or `.profile' file, once and for all. You might think that the country code specification is redundant. But in fact, some languages have dialects in different countries. For example, `de_AT' is used for Austria, and `pt_BR' for Brazil. The country code serves to distinguish the dialects. Not all programs have translations for all languages. By default, an English message is shown in place of a nonexistent translation. If you understand other languages, you can set up a priority list of languages. This is done through a different environment variable, called `LANGUAGE'. GNU `gettext' gives preference to `LANGUAGE' over `LANG' for the purpose of message handling, but you still need to have `LANG' set to the primary language; this is required by other parts of the system libraries. For example, some Swedish users who would rather read translations in German than English for when Swedish is not available, set `LANGUAGE' to `sv:de' while leaving `LANG' to `sv_SE'. In the `LANGUAGE' environment variable, but not in the `LANG' environment variable, `LL_CC' combinations can be abbreviated as `LL' to denote the language's main dialect. For example, `de' is equivalent to `de_DE' (German as spoken in Germany), and `pt' to `pt_PT' (Portuguese as spoken in Portugal) in this context. Translating Teams ================= For the Free Translation Project to be a success, we need interested people who like their own language and write it well, and who are also able to synergize with other translators speaking the same language. Each translation team has its own mailing list. The up-to-date list of teams can be found at the Free Translation Project's homepage, `http://www.iro.umontreal.ca/contrib/po/HTML/', in the "National teams" area. If you'd like to volunteer to _work_ at translating messages, you should become a member of the translating team for your own language. The subscribing address is _not_ the same as the list itself, it has `-request' appended. For example, speakers of Swedish can send a message to `sv-...@li...', having this message body: subscribe Keep in mind that team members are expected to participate _actively_ in translations, or at solving translational difficulties, rather than merely lurking around. If your team does not exist yet and you want to start one, or if you are unsure about what to do or how to get started, please write to `tra...@ir...' to reach the coordinator for all translator teams. The English team is special. It works at improving and uniformizing the terminology in use. Proven linguistic skill are praised more than programming skill, here. Available Packages ================== Languages are not equally supported in all packages. The following matrix shows the current state of internationalization, as of September 2001. The matrix shows, in regard of each package, for which languages PO files have been submitted to translation coordination, with a translation percentage of at least 50%. Ready PO files bg cs da de el en eo es et fi fr gl he hr id it ja +----------------------------------------------------+ a2ps | [] [] [] | bash | [] [] [] [] | bfd | | binutils | [] | bison | [] [] [] [] [] | clisp | [] [] [] [] | cpio | [] [] [] [] [] | diffutils | [] [] [] [] [] [] [] | enscript | [] [] | error | [] [] | fetchmail | | fileutils | [] [] [] [] [] [] [] [] | findutils | [] [] [] [] [] [] [] [] | flex | [] [] [] | freetype | | gas | | gawk | [] [] | gcal | | gcc | | gettext | [] [] [] [] [] [] [] [] [] [] | gnupg | [] [] [] [] [] [] [] | gprof | | grep | [] [] [] [] [] [] [] [] | hello | [] [] [] [] [] [] [] [] [] [] [] | id-utils | [] [] [] | indent | [] [] [] [] [] | jpilot | [] | kbd | | ld | [] | libc | [] [] [] [] [] [] [] [] | lilypond | [] | lynx | [] [] [] [] | m4 | [] [] [] [] [] [] [] [] | make | [] [] [] [] [] [] | mysecretdiary | [] | nano | [] [] [] | opcodes | | parted | [] [] [] | ptx | [] [] [] [] [] [] [] | python | | recode | [] [] [] [] [] [] [] [] [] | sed | [] [] [] [] [] [] [] [] [] [] [] [] | sh-utils | [] [] [] [] [] [] [] [] [] [] | sharutils | [] [] [] [] [] [] [] [] | sketch | | soundtracker | [] [] [] | sp | | tar | [] [] [] [] [] [] [] [] | texinfo | [] [] [] [] [] [] | textutils | [] [] [] [] [] [] [] [] | util-linux | [] [] | wdiff | [] [] [] | wget | [] [] [] [] [] [] [] [] [] [] | +----------------------------------------------------+ bg cs da de el en eo es et fi fr gl he hr id it ja 0 14 24 32 11 1 8 23 13 1 33 22 4 0 7 9 18 ko lv nb nl nn no pl pt pt_BR ru sk sl sv tr uk zh +----------------------------------------------------+ a2ps | [] [] [] | 6 bash | | 4 bfd | | 0 binutils | | 1 bison | [] | 6 clisp | [] | 5 cpio | [] [] [] [] [] | 10 diffutils | [] [] [] [] | 11 enscript | [] [] [] | 5 error | [] [] | 4 fetchmail | | 0 fileutils | [] [] [] [] [] [] [] [] [] | 17 findutils | [] [] [] [] [] [] [] [] | 16 flex | [] [] [] | 6 freetype | | 0 gas | | 0 gawk | [] | 3 gcal | | 0 gcc | | 0 gettext | [] [] [] [] [] [] [] [] | 18 gnupg | [] [] [] | 10 gprof | | 0 grep | [] [] [] [] | 12 hello | [] [] [] [] [] [] [] [] [] [] [] | 22 id-utils | [] [] [] | 6 indent | [] [] [] [] [] [] [] | 12 jpilot | | 1 kbd | [] | 1 ld | | 1 libc | [] [] [] [] [] [] [] [] | 16 lilypond | [] [] | 3 lynx | [] [] [] [] | 8 m4 | [] [] [] [] | 12 make | [] [] [] [] [] [] | 12 mysecretdiary | | 1 nano | [] | 4 opcodes | [] | 1 parted | [] [] | 5 ptx | [] [] [] [] [] [] [] [] | 15 python | | 0 recode | [] [] [] [] | 13 sed | [] [] [] [] [] [] [] | 19 sh-utils | [] [] [] [] [] [] [] [] [] [] [] | 21 sharutils | [] [] [] | 11 sketch | | 0 soundtracker | | 3 sp | | 0 tar | [] [] [] [] [] [] [] | 15 texinfo | [] | 7 textutils | [] [] [] [] [] [] [] [] | 16 util-linux | [] [] | 4 wdiff | [] [] [] [] | 7 wget | [] [] [] [] [] [] [] | 17 +----------------------------------------------------+ 33 teams ko lv nb nl nn no pl pt pt_BR ru sk sl sv tr uk zh 53 domains 9 1 6 20 0 6 17 1 13 25 10 11 23 21 2 2 387 Some counters in the preceding matrix are higher than the number of visible blocks let us expect. This is because a few extra PO files are used for implementing regional variants of languages, or language dialects. For a PO file in the matrix above to be effective, the package to which it applies should also have been internationalized and distributed as such by its maintainer. There might be an observable lag between the mere existence a PO file and its wide availability in a distribution. If September 2001 seems to be old, you may fetch a more recent copy of this `ABOUT-NLS' file on most GNU archive sites. The most up-to-date matrix with full percentage details can be found at `http://www.iro.umontreal.ca/contrib/po/HTML/matrix.html'. Using `gettext' in new packages =============================== If you are writing a freely available program and want to internationalize it you are welcome to use GNU `gettext' in your package. Of course you have to respect the GNU Library General Public License which covers the use of the GNU `gettext' library. This means in particular that even non-free programs can use `libintl' as a shared library, whereas only free software can use `libintl' as a static library or use modified versions of `libintl'. Once the sources are changed appropriately and the setup can handle to use of `gettext' the only thing missing are the translations. The Free Translation Project is also available for packages which are not developed inside the GNU project. Therefore the information given above applies also for every other Free Software Project. Contact `tra...@ir...' to make the `.pot' files available to the translation teams. Index: Makefile.am =================================================================== RCS file: /cvsroot/srvx/services/Makefile.am,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -r1.12 -r1.13 *** Makefile.am 2001/07/15 14:49:09 1.12 --- Makefile.am 2001/09/26 02:34:25 1.13 *************** *** 1,10 **** EXTRA_DIST = srvx.conf.example sockcheck.db.example ! SUBDIRS = @MY_SUBDIRS@ ! DIST_SUBDIRS = src rx ! RX_LIBS = @RX_LIBS@ ! RX_INCLUDES = @RX_INCLUDES@ ! ! all: srvx ! ! srvx: src/srvx ! cp src/srvx src/*.help . --- 1,2 ---- EXTRA_DIST = srvx.conf.example sockcheck.db.example ! SUBDIRS = src po intl Index: aclocal.m4 =================================================================== RCS file: /cvsroot/srvx/services/aclocal.m4,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -r1.12 -r1.13 *** aclocal.m4 2001/06/11 22:54:07 1.12 --- aclocal.m4 2001/09/26 02:34:25 1.13 *************** *** 159,160 **** --- 159,4268 ---- fi]) + # Macro to add for using GNU gettext. + # Ulrich Drepper <dr...@cy...>, 1995. + # + # This file can be copied and used freely without restrictions. It can + # be used in projects which are not available under the GNU General Public + # License or the GNU Library General Public License but which still want + # to provide support for the GNU gettext functionality. [...4081 lines suppressed...] + AC_ARG_WITH(regex, + [ --without-regex use GNU rx in lieu of gawk's regex for matching], + [test "$withval" = yes && am_with_regex=1], + [am_with_regex=1]) + if test -n "$am_with_regex"; then + AC_MSG_RESULT(regex) + AC_DEFINE(WITH_REGEX,1,[Define if using GNU regex]) + AC_CACHE_CHECK([for GNU regex in libc], am_cv_gnu_regex, + AC_TRY_LINK([], [extern int re_max_failures; re_max_failures = 1], + am_cv_gnu_regex=yes, am_cv_gnu_regex=no)) + if test $am_cv_gnu_regex = no; then + LIBOBJS="$LIBOBJS regex.o" + fi + else + AC_MSG_RESULT(rx) + AC_CHECK_FUNC(re_rx_search, , [LIBOBJS="$LIBOBJS rx.o"]) + fi + AC_SUBST(LIBOBJS)dnl + ]) + Index: autogen.sh =================================================================== RCS file: /cvsroot/srvx/services/autogen.sh,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** autogen.sh 2001/06/11 22:54:07 1.4 --- autogen.sh 2001/09/26 02:34:25 1.5 *************** *** 3,6 **** aclocal autoheader -Wall ! automake -a --gnu Makefile rx/Makefile src/Makefile autoconf -Wall --- 3,6 ---- aclocal autoheader -Wall ! automake -a --gnu Makefile src/Makefile autoconf -Wall Index: configure.ac =================================================================== RCS file: /cvsroot/srvx/services/configure.ac,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** configure.ac 2001/08/25 02:36:57 1.7 --- configure.ac 2001/09/26 02:34:25 1.8 *************** *** 14,17 **** --- 14,18 ---- AC_DEFINE(CODENAME, "enigma", [Code name for this release of srvx]) AM_MAINTAINER_MODE + ALL_LINGUAS="" dnl Sanity checks. *************** *** 21,24 **** --- 22,26 ---- dnl Checks for programs. + AM_GNU_GETTEXT AC_PROG_AWK AC_PROG_CC *************** *** 28,31 **** --- 30,35 ---- AC_PROG_MAKE_SET AC_PROG_GCC_TRADITIONAL + AC_PROG_LIBTOOL + AM_WITH_REGEX dnl nice that unixes can all follow a standard. *************** *** 35,40 **** ;; *-freebsd3* | *-freebsdelf3* | *-freebsd*out3*) - AC_DEFINE(BROKEN_REGEX, 1, [Define if your libc regex is broken.]) - BROKEN_REGEX=yes EXTRA_DEFINE="-ansi" ;; --- 39,42 ---- *************** *** 94,98 **** fi ! AC_CHECK_FUNCS(bcopy memcpy memset stricmp strcasestr strcasecmp strncasecmp strdup strerror strstr strsignal localtime_r setrlimit,,) AC_CHECK_FUNCS(poll,,AC_MSG_WARN([poll(2) is not present -- proxy checking will not work.])) --- 96,100 ---- fi ! AC_CHECK_FUNCS(bcopy memcpy memset stricmp strcasestr strcasecmp strncasecmp strdup strerror strstr strsignal localtime_r setrlimit regcomp regexec regfree,,) AC_CHECK_FUNCS(poll,,AC_MSG_WARN([poll(2) is not present -- proxy checking will not work.])) *************** *** 159,164 **** AC_ARG_ENABLE(transition, [ --enable-transition Enables X2 transition commands], ! [AC_CHECK_FUNCS(regcomp regexec regfree,,) ! AC_DEFINE(TRANSITION, 1, [Define to enable X2 transitioning features.])]) AC_ARG_ENABLE(bounds-checking, --- 161,165 ---- AC_ARG_ENABLE(transition, [ --enable-transition Enables X2 transition commands], ! [AC_DEFINE(TRANSITION, 1, [Define to enable X2 transitioning features.])]) AC_ARG_ENABLE(bounds-checking, *************** *** 243,255 **** MY_SUBDIRS="" - RX_INCLUDES="" - RX_LIBS="" - if test "${enable_transition+set}" = set; then - if test "${BROKEN_REGEX}" = yes -o "${ac_cv_func_regcomp}" = no; then - MY_SUBDIRS="rx $MY_SUBDIRS" - RX_INCLUDES="-I../rx" - RX_LIBS="../rx/librx.a" - fi - fi MY_SUBDIRS="$MY_SUBDIRS src" CFLAGS="$CFLAGS -W -Wall" --- 244,247 ---- *************** *** 259,265 **** AC_SUBST(MY_SUBDIRS) - AC_SUBST(RX_INCLUDES) - AC_SUBST(RX_LIBS) AC_SUBST(PROTO) ! AC_CONFIG_FILES([Makefile rx/Makefile src/Makefile]) AC_OUTPUT --- 251,255 ---- AC_SUBST(MY_SUBDIRS) AC_SUBST(PROTO) ! AC_CONFIG_FILES([Makefile src/Makefile po/Makefile.in po/Makefile intl/Makefile]) AC_OUTPUT |
From: Entrope <en...@us...> - 2001-09-26 02:34:28
|
Update of /cvsroot/srvx/services/po In directory usw-pr-cvs1:/tmp/cvs-serv26808/po Added Files: Makefile.in.in POTFILES.in srvx.pot Log Message: start to support I18N and stuff --- NEW FILE --- # Makefile for program source directory in GNU NLS utilities package. # Copyright (C) 1995-1997, 2000, 2001 by Ulrich Drepper <dr...@gn...> # # This file file be copied and used freely without restrictions. It can # be used in projects which are not available under the GNU General Public License # but which still want to provide support for the GNU gettext functionality. # Please note that the actual code is *not* freely available. PACKAGE = @PACKAGE@ VERSION = @VERSION@ # These two variables depend on the location of this directory. subdir = po top_builddir = .. SHELL = /bin/sh @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ datadir = @datadir@ localedir = $(datadir)/locale gettextsrcdir = $(datadir)/gettext/po INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ MKINSTALLDIRS = @MKINSTALLDIRS@ mkinstalldirs = $(SHELL) `case "$(MKINSTALLDIRS)" in /*) echo "$(MKINSTALLDIRS)" ;; *) echo "$(top_builddir)/$(MKINSTALLDIRS)" ;; esac` CC = @CC@ GMSGFMT = @GMSGFMT@ MSGFMT = @MSGFMT@ XGETTEXT = @XGETTEXT@ MSGMERGE = msgmerge DEFS = @DEFS@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ INCLUDES = -I.. -I$(top_srcdir)/intl COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS) POFILES = @POFILES@ GMOFILES = @GMOFILES@ DISTFILES = ChangeLog Makefile.in.in POTFILES.in $(PACKAGE).pot \ $(POFILES) $(GMOFILES) POTFILES = \ CATALOGS = @CATALOGS@ .SUFFIXES: .SUFFIXES: .c .o .po .pox .gmo .mo .c.o: $(COMPILE) $< .po.pox: $(MAKE) $(PACKAGE).pot $(MSGMERGE) $< $(srcdir)/$(PACKAGE).pot -o $*.pox .po.mo: $(MSGFMT) -o $@ $< .po.gmo: file=$(srcdir)/`echo $* | sed 's,.*/,,'`.gmo \ && rm -f $$file && $(GMSGFMT) --statistics -o $$file $< all: all-@USE_NLS@ all-yes: $(CATALOGS) all-no: # Note: Target 'all' must not depend on target '$(srcdir)/$(PACKAGE).pot', # otherwise packages like GCC can not be built if only parts of the source # have been downloaded. $(srcdir)/$(PACKAGE).pot: $(POTFILES) $(srcdir)/POTFILES.in $(XGETTEXT) --default-domain=$(PACKAGE) --directory=$(top_srcdir) \ --add-comments --keyword=_ --keyword=N_ \ --files-from=$(srcdir)/POTFILES.in \ && test ! -f $(PACKAGE).po \ || ( rm -f $(srcdir)/$(PACKAGE).pot \ && mv $(PACKAGE).po $(srcdir)/$(PACKAGE).pot ) install: install-exec install-data install-exec: install-data: install-data-@USE_NLS@ if test "$(PACKAGE)" = "gettext"; then \ $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \ $(INSTALL_DATA) $(srcdir)/Makefile.in.in \ $(DESTDIR)$(gettextsrcdir)/Makefile.in.in; \ else \ : ; \ fi install-data-no: all install-data-yes: all $(mkinstalldirs) $(DESTDIR)$(datadir) @catalogs='$(CATALOGS)'; \ for cat in $$catalogs; do \ cat=`basename $$cat`; \ lang=`echo $$cat | sed 's/\.gmo$$//'`; \ dir=$(localedir)/$$lang/LC_MESSAGES; \ $(mkinstalldirs) $(DESTDIR)$$dir; \ if test -r $$cat; then \ $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/$(PACKAGE).mo; \ echo "installing $$cat as $(DESTDIR)$$dir/$(PACKAGE).mo"; \ else \ $(INSTALL_DATA) $(srcdir)/$$cat $(DESTDIR)$$dir/$(PACKAGE).mo; \ echo "installing $(srcdir)/$$cat as" \ "$(DESTDIR)$$dir/$(PACKAGE).mo"; \ fi; \ done # Define this as empty until I found a useful application. installcheck: uninstall: catalogs='$(CATALOGS)'; \ for cat in $$catalogs; do \ cat=`basename $$cat`; \ lang=`echo $$cat | sed 's/\.gmo$$//'`; \ rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(PACKAGE).mo; \ done if test "$(PACKAGE)" = "gettext"; then \ rm -f $(DESTDIR)$(gettextsrcdir)/Makefile.in.in; \ else \ : ; \ fi check: all dvi info tags TAGS ID: mostlyclean: rm -f core core.* *.pox $(PACKAGE).po *.new.po rm -fr *.o clean: mostlyclean distclean: clean rm -f Makefile Makefile.in POTFILES *.mo maintainer-clean: distclean @echo "This command is intended for maintainers to use;" @echo "it deletes files that may require special tools to rebuild." rm -f $(GMOFILES) distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) dist distdir: $(MAKE) update-po @$(MAKE) dist2 # This is a separate target because 'update-po' must be executed before. dist2: $(DISTFILES) dists="$(DISTFILES)"; \ for file in $$dists; do \ if test -f $$file; then dir=.; else dir=$(srcdir); fi; \ cp -p $$dir/$$file $(distdir); \ done update-po: Makefile $(MAKE) $(PACKAGE).pot if test "$(PACKAGE)" = "gettext"; then PATH=`pwd`/../src:$$PATH; fi; \ cd $(srcdir); \ catalogs='$(GMOFILES)'; \ for cat in $$catalogs; do \ cat=`basename $$cat`; \ lang=`echo $$cat | sed 's/\.gmo$$//'`; \ echo "$$lang:"; \ if $(MSGMERGE) $$lang.po $(PACKAGE).pot -o $$lang.new.po; then \ mv -f $$lang.new.po $$lang.po; \ else \ echo "msgmerge for $$cat failed!"; \ rm -f $$lang.new.po; \ fi; \ done $(MAKE) update-gmo update-gmo: Makefile $(GMOFILES) @: Makefile: Makefile.in.in $(top_builddir)/config.status POTFILES.in cd $(top_builddir) \ && CONFIG_FILES=$(subdir)/$@.in CONFIG_HEADERS= \ $(SHELL) ./config.status # Tell versions [3.59,3.63) of GNU make not to export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: --- NEW FILE --- # List of source files containing translatable strings. # Copyright 2001 srvx Development Team # Files with mostly error or logging messages src/compat.c src/conf.c src/getopt.c src/gline.c src/hash.c src/main.c src/modules.c src/proto_bahamut.c src/proto_ircu_p10.c src/recdb.c src/saxdb.c src/service.c src/sockcheck.c src/uplink.c # Files with user-visible messages (in addition to logging or error messages) src/log.c src/mod_common.c src/rules.c src/tools.c src/messages.h --- NEW FILE --- # SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR Free Software Foundation, Inc. # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "POT-Creation-Date: 2001-09-25 22:21-0400\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL...@li...>\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" #: src/getopt.c:641 #, c-format msgid "%s: option `%s' is ambiguous\n" msgstr "" #: src/getopt.c:665 #, c-format msgid "%s: option `--%s' doesn't allow an argument\n" msgstr "" #: src/getopt.c:670 #, c-format msgid "%s: option `%c%s' doesn't allow an argument\n" msgstr "" #: src/getopt.c:687 src/getopt.c:860 #, c-format msgid "%s: option `%s' requires an argument\n" msgstr "" #. --option #: src/getopt.c:716 #, c-format msgid "%s: unrecognized option `--%s'\n" msgstr "" #. +option or -option #: src/getopt.c:720 #, c-format msgid "%s: unrecognized option `%c%s'\n" msgstr "" #. 1003.2 specifies the format of this message. #: src/getopt.c:746 #, c-format msgid "%s: illegal option -- %c\n" msgstr "" #: src/getopt.c:749 #, c-format msgid "%s: invalid option -- %c\n" msgstr "" #. 1003.2 specifies the format of this message. #: src/getopt.c:779 src/getopt.c:909 #, c-format msgid "%s: option requires an argument -- %c\n" msgstr "" #: src/getopt.c:826 #, c-format msgid "%s: option `-W %s' is ambiguous\n" msgstr "" #: src/getopt.c:844 #, c-format msgid "%s: option `-W %s' doesn't allow an argument\n" msgstr "" |
Update of /cvsroot/srvx/services/rx In directory usw-pr-cvs1:/tmp/cvs-serv25383/rx Removed Files: rxunfa.h rxunfa.c rxsuper.h rxsuper.c rxstr.h rxstr.c rxspencer.h rxspencer.c rxsimp.h rxsimp.c rxproto.h rxposix.c rxnode.h rxnode.c rxnfa.h rxnfa.c rxhash.h rxhash.c rxgnucomp.h rxgnucomp.c rxdbug.c rxcset.h rxcset.c rxcontext.h rxbitset.h rxbitset.c rxbasic.h rxbasic.c rxanal.h rxanal.c rxall.h rx.h rx.c inst-rxposix.h hashrexp.c depcomp compile _rx.h Makefile.am ChangeLog COPYING.LIB Log Message: remove old rx files; try to use a more standard rx instead --- rxunfa.h DELETED --- --- rxunfa.c DELETED --- --- rxsuper.h DELETED --- --- rxsuper.c DELETED --- --- rxstr.h DELETED --- --- rxstr.c DELETED --- --- rxspencer.h DELETED --- --- rxspencer.c DELETED --- --- rxsimp.h DELETED --- --- rxsimp.c DELETED --- --- rxproto.h DELETED --- --- rxposix.c DELETED --- --- rxnode.h DELETED --- --- rxnode.c DELETED --- --- rxnfa.h DELETED --- --- rxnfa.c DELETED --- --- rxhash.h DELETED --- --- rxhash.c DELETED --- --- rxgnucomp.h DELETED --- --- rxgnucomp.c DELETED --- --- rxdbug.c DELETED --- --- rxcset.h DELETED --- --- rxcset.c DELETED --- --- rxcontext.h DELETED --- --- rxbitset.h DELETED --- --- rxbitset.c DELETED --- --- rxbasic.h DELETED --- --- rxbasic.c DELETED --- --- rxanal.h DELETED --- --- rxanal.c DELETED --- --- rxall.h DELETED --- --- rx.h DELETED --- --- rx.c DELETED --- --- inst-rxposix.h DELETED --- --- hashrexp.c DELETED --- --- depcomp DELETED --- --- compile DELETED --- --- _rx.h DELETED --- --- Makefile.am DELETED --- --- ChangeLog DELETED --- --- COPYING.LIB DELETED --- |