From: Michael Poole Date: Thu, 1 Jul 2004 12:38:31 +0000 (+0000) Subject: Apply minor fixes from patches@, SF tracker, and others. X-Git-Url: http://git.pk910.de/?p=ircu2.10.12-pk.git;a=commitdiff_plain;h=6cc0d4c906bb3168a485b44d87b3778e393ce7bc Apply minor fixes from patches@, SF tracker, and others. git-svn-id: file:///home/klmitch/undernet-ircu/undernet-ircu-svn/ircu2/trunk@1084 c9e4aea6-c8fd-4c43-8297-357d70d61c8c --- diff --git a/ChangeLog b/ChangeLog index dbdb077..d4d341b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,44 @@ +2004-07-01 Michael Poole + + * include/map.h, ircd/map.c: Remove unused code. + + * ircd/m_links.c, ircd/m_map.c, ircd/s_misc.c: Remove includes of + map.h and a call to map_update(). + + * ircd/Makefile.in: Remove map.c and regenerate dependencies. + + * ircd/ircd_parser.y: Recognize Diane Bruce as a copyright holder + for the new config parser. + + * ircd/match.c: Remove pointless pointer dereference (Reed points + out that this generates a warning with old gcc). + + * ircd/s_user.c: Display connection class in CONNEXIT connection + notice as a string rather than an integer. + + * tools/ringlog.c, tools/ringlog.pl: At Kevin's request, remove + lines (falsely) identifying ringlog as related to IRC; the files + are general purpose. + + * configure.in, include/ircd_snprintf.h: Add checks for + va_copy()-like alternatives and use them if va_copy() is missing. + + * configure, config.h.in: Regenerate. + +2004-02-01 beware + + * ircd/channel.c: Check bans that look like IP bans against user's + hostname just in case they have a host like 1234.domain.tld. + +2003-12-18 Timothy Grant Vogelsang + + * ircd/ircd_log.c, ircd/send.c: va_list is not a scalar type + +2004-04-02 Gavin Grieve + + * ircd/ircd_parser.y: Fix rehash warnings for servername and + numeric so they only warn if changed in the config file. + 2004-06-30 Michael Poole * doc/readme.iauth, include/ircd_auth.h, ircd/ircd_auth.c: New diff --git a/config.h.in b/config.h.in index 183f48a..e576949 100644 --- a/config.h.in +++ b/config.h.in @@ -1,4 +1,4 @@ -/* config.h.in. Generated automatically from configure.in by autoheader. */ +/* config.h.in. Generated from configure.in by autoheader. */ #ifndef INCLUDED_config_h #define INCLUDED_config_h /* @@ -19,34 +19,11 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * $Id: config.h.in,v 1.4 2002-03-28 15:10:21 kev Exp $ + * $Id: config.h.in,v 1.5 2004-07-01 12:38:31 entrope Exp $ */ -/* Define to `int' if doesn't define. */ -#undef gid_t - -/* Define if system calls automatically restart after interruption - by a signal. */ -#undef HAVE_RESTARTABLE_SYSCALLS - -/* Define to `unsigned' if doesn't define. */ -#undef size_t - -/* Define if you have the ANSI C header files. */ -#undef STDC_HEADERS - -/* Define if you can safely include both and . */ -#undef TIME_WITH_SYS_TIME - -/* Define if your declares struct tm. */ -#undef TM_IN_SYS_TIME - -/* Define to `int' if doesn't define. */ -#undef uid_t - -/* Define if your processor stores words with the most significant - byte first (like Motorola and SPARC, unlike Intel and VAX). */ -#undef WORDS_BIGENDIAN +/* Define if you have the setrlimit function */ +#undef HAVE_SETRLIMIT /* Define one of these, depending on wether you have * POSIX, BSD or SYSV non-blocking stuff @@ -69,79 +46,222 @@ #undef u_int16_t #undef u_int32_t -/* The number of bytes in a int. */ -#undef SIZEOF_INT +/* Define to force the poll() function to be used */ +#undef USE_POLL +/* Define to enable the /dev/poll engine */ +#undef USE_DEVPOLL +/* Define to enable the kqueue engine */ +#undef USE_KQUEUE -/* The number of bytes in a long. */ -#undef SIZEOF_LONG +/* Define to enable various debugging code in the server; DO NOT USE + * THIS ON PRODUCTION SERVERS ON PAIN OF DELINKING! + */ +#undef DEBUGMODE -/* The number of bytes in a short. */ -#undef SIZEOF_SHORT +/* Define this to DISable various assertion checking statements */ +#undef NDEBUG -/* The number of bytes in a void *. */ -#undef SIZEOF_VOID_P +/* Define to force certain critical functions to be inlined */ +#undef FORCEINLINE + +/* Define to be the local domain name for some statics gathering */ +#undef DOMAINNAME + +/* Define to be the name of the executable to be executed on /restart */ +#undef SPATH + +/* Define to be the path to the data directory */ +#undef DPATH -/* Define if you have the getrusage function. */ +/* Define to be the name of the configuration file */ +#undef CPATH + +/* Define to be the name of the debugging log file */ +#undef LPATH + +/* Define to be the maximum number of network connections */ +#undef MAXCONNECTIONS + + +/* Configuration file name */ +#undef CPATH + +/* Enable debugging code */ +#undef DEBUGMODE + +/* Domain name to be used for some statistics gathering */ +#undef DOMAINNAME + +/* Path to data directory */ +#undef DPATH + +/* Define to implement epoll system calls */ +#undef EPOLL_NEED_BODY + +/* Force inlining for a few critical functions */ +#undef FORCEINLINE + +/* Define to 1 if you have the header file. */ +#undef HAVE_CRYPT_H + +/* Define to 1 if you have the `getrusage' function. */ #undef HAVE_GETRUSAGE -/* Define if you have the kqueue function. */ +/* Define to 1 if you have the header file. */ +#undef HAVE_INTTYPES_H + +/* Define to 1 if you have the `kqueue' function. */ #undef HAVE_KQUEUE -/* Define if you have the setrlimit function. */ -#undef HAVE_SETRLIMIT +/* Define to 1 if you have the `nsl' library (-lnsl). */ +#undef HAVE_LIBNSL -/* Define if you have the times function. */ -#undef HAVE_TIMES +/* Define to 1 if you have the `resolv' library (-lresolv). */ +#undef HAVE_LIBRESOLV + +/* Define to 1 if you have the `socket' library (-lsocket). */ +#undef HAVE_LIBSOCKET -/* Define if you have the header file. */ +/* Define to 1 if you have the header file. */ +#undef HAVE_MEMORY_H + +/* Define to 1 if you have the header file. */ #undef HAVE_POLL_H -/* Define if you have the header file. */ +/* Define to 1 if system calls automatically restart after interruption by a + signal. */ +#undef HAVE_RESTARTABLE_SYSCALLS + +/* Define to 1 if you have the `setrlimit' function. */ +#undef HAVE_SETRLIMIT + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDINT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDLIB_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRINGS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRING_H + +/* Define to 1 if you have the header file. */ #undef HAVE_SYS_DEVPOLL_H -/* Define if you have the header file. */ +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_EPOLL_H + +/* Define to 1 if you have the header file. */ #undef HAVE_SYS_EVENT_H -/* Define if you have the nsl library (-lnsl). */ -#undef HAVE_LIBNSL +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_STAT_H -/* Define if you have the socket library (-lsocket). */ -#undef HAVE_LIBSOCKET +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_TYPES_H -/* Specify whether or not to use poll() */ -#undef USE_POLL +/* Define to 1 if you have that is POSIX.1 compatible. */ +#undef HAVE_SYS_WAIT_H -/* Enable debugging code */ -#undef DEBUGMODE +/* Define to 1 if you have the `times' function. */ +#undef HAVE_TIMES + +/* Define to 1 if you have the header file. */ +#undef HAVE_UNISTD_H + +/* Define if we have va_copy */ +#undef HAVE_VA_COPY + +/* Define if we have __va_copy */ +#undef HAVE___VA_COPY + +/* Path to debugging log file */ +#undef LPATH + +/* Maximum number of network connections */ +#undef MAXCONNECTIONS /* Disable assertions */ #undef NDEBUG -/* Force inlining for a few critical functions */ -#undef FORCEINLINE +/* Define to the address where bug reports for this package should be sent. */ +#undef PACKAGE_BUGREPORT + +/* Define to the full name of this package. */ +#undef PACKAGE_NAME + +/* Define to the full name and version of this package. */ +#undef PACKAGE_STRING + +/* Define to the one symbol short name of this package. */ +#undef PACKAGE_TARNAME + +/* Define to the version of this package. */ +#undef PACKAGE_VERSION + +/* The size of a `int', as computed by sizeof. */ +#undef SIZEOF_INT + +/* The size of a `long', as computed by sizeof. */ +#undef SIZEOF_LONG + +/* The size of a `short', as computed by sizeof. */ +#undef SIZEOF_SHORT + +/* The size of a `void *', as computed by sizeof. */ +#undef SIZEOF_VOID_P + +/* Path to executable for restarts */ +#undef SPATH + +/* Define to 1 if you have the ANSI C header files. */ +#undef STDC_HEADERS + +/* Define to 1 if you can safely include both and . */ +#undef TIME_WITH_SYS_TIME + +/* Define to 1 if your declares `struct tm'. */ +#undef TM_IN_SYS_TIME + +/* Define to enable the adns resolver */ +#undef USE_ADNS /* Define to enable the /dev/poll engine */ #undef USE_DEVPOLL +/* Define to enable the epoll engine */ +#undef USE_EPOLL + /* Define to enable the kqueue engine */ #undef USE_KQUEUE -/* Domain name to be used for some statistics gathering */ -#undef DOMAINNAME +/* Specify whether or not to use poll() */ +#undef USE_POLL -/* Path to executable for restarts */ -#undef SPATH +/* Define to 1 if your processor stores words with the most significant byte + first (like Motorola and SPARC, unlike Intel and VAX). */ +#undef WORDS_BIGENDIAN -/* Path to data directory */ -#undef DPATH +/* Define to `int' if doesn't define. */ +#undef gid_t -/* Configuration file name */ -#undef CPATH +/* Define to `short' if does not define. */ +#undef int16_t -/* Path to debugging log file */ -#undef LPATH +/* Define to `long' if does not define. */ +#undef int32_t -/* Maximum number of network connections */ -#undef MAXCONNECTIONS +/* Define to `unsigned' if does not define. */ +#undef size_t + +/* Define to `unsigned short' if does not define. */ +#undef u_int16_t + +/* Define to `unsigned long' if does not define. */ +#undef u_int32_t +/* Define to `int' if doesn't define. */ +#undef uid_t #endif /* INCLUDED_config_h */ diff --git a/configure b/configure index b160d47..8149da9 100755 --- a/configure +++ b/configure @@ -8230,6 +8230,130 @@ _ACEOF ENGINE_C="engine_epoll.c $ENGINE_C" fi +echo "$as_me:$LINENO: checking for va_copy" >&5 +echo $ECHO_N "checking for va_copy... $ECHO_C" >&6 +if test "${unet_cv_c_va_copy+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +int +main () +{ +va_list ap1, ap2; va_copy(ap1, ap2); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + unet_cv_c_va_copy="yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +unet_cv_c_va_copy="no" + +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $unet_cv_c_va_copy" >&5 +echo "${ECHO_T}$unet_cv_c_va_copy" >&6 +if test "$unet_cv_c_va_copy" = "yes" ; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_VA_COPY 1 +_ACEOF + +fi + +echo "$as_me:$LINENO: checking for __va_copy" >&5 +echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6 +if test "${unet_cv_c___va_copy+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +int +main () +{ +va_list ap1, ap2; __va_copy(ap1, ap2); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + unet_cv_c___va_copy="yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +unet_cv_c___va_copy="no" + +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $unet_cv_c___va_copy" >&5 +echo "${ECHO_T}$unet_cv_c___va_copy" >&6 +if test "$unet_cv_c___va_copy" = "yes" ; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE___VA_COPY 1 +_ACEOF + +fi + echo "$as_me:$LINENO: checking whether to enable the adns resolver engine" >&5 echo $ECHO_N "checking whether to enable the adns resolver engine... $ECHO_C" >&6 # Check whether --enable-adns or --disable-adns was given. diff --git a/configure.in b/configure.in index d827312..875eca3 100644 --- a/configure.in +++ b/configure.in @@ -405,6 +405,25 @@ if test x"$unet_cv_enable_epoll" != xno; then ENGINE_C="engine_epoll.c $ENGINE_C" fi +dnl How to copy one va_list to another? +AC_CACHE_CHECK([for va_copy], unet_cv_c_va_copy, [AC_LINK_IFELSE( + [AC_LANG_PROGRAM([#include ], [va_list ap1, ap2; va_copy(ap1, ap2);])], + [unet_cv_c_va_copy="yes"], + [unet_cv_c_va_copy="no"] +)]) +if test "$unet_cv_c_va_copy" = "yes" ; then + AC_DEFINE(HAVE_VA_COPY, 1, [Define if we have va_copy]) +fi + +AC_CACHE_CHECK([for __va_copy], unet_cv_c___va_copy, [AC_LINK_IFELSE( + [AC_LANG_PROGRAM([#include ], [va_list ap1, ap2; __va_copy(ap1, ap2);])], + [unet_cv_c___va_copy="yes"], + [unet_cv_c___va_copy="no"] +)]) +if test "$unet_cv_c___va_copy" = "yes" ; then + AC_DEFINE(HAVE___VA_COPY, 1, [Define if we have __va_copy]) +fi + dnl --disable-adns check... AC_MSG_CHECKING([whether to enable the adns resolver engine]) AC_ARG_ENABLE([adns], diff --git a/include/ircd_snprintf.h b/include/ircd_snprintf.h index ba7277c..520c0cc 100644 --- a/include/ircd_snprintf.h +++ b/include/ircd_snprintf.h @@ -39,6 +39,14 @@ struct VarData { va_list vd_args; /* arguments for %v */ }; +#ifndef HAVE_VA_COPY +#if HAVE___VA_COPY +#define va_copy(DEST, SRC) __va_copy(DEST, SRC) +#else +#define va_copy(DEST, SRC) memcpy(&(DEST), &(SRC), sizeof(DEST)) +#endif +#endif + extern int ircd_snprintf(struct Client *dest, char *buf, size_t buf_len, const char *format, ...); extern int ircd_vsnprintf(struct Client *dest, char *buf, size_t buf_len, diff --git a/include/map.h b/include/map.h deleted file mode 100644 index b3e34a9..0000000 --- a/include/map.h +++ /dev/null @@ -1,62 +0,0 @@ -#ifndef INCLUDED_map_h -#define INCLUDED_map_h -/* - * IRC - Internet Relay Chat, include/map.h - * Copyright (C) 1990 Jarkko Oikarinen and - * University of Oulu, Computing Center - * Copyright (C) 2002 Joseph Bongaarts - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - * $Id$ - */ -#ifndef INCLUDED_ircd_defs_h -#include "ircd_defs.h" -#endif -#ifndef INCLUDED_time_h -#include /* struct tm */ -#define INCLUDED_time_h -#endif -#ifndef INCLUDED_sys_types_h -#include -#define INCLUDED_sys_types_h -#endif - - -struct Client; - -struct Map { - time_t lasttime; - unsigned int maxclients; - char name[HOSTLEN+1]; - char info[REALLEN+1]; - unsigned short prot; - struct Map *next; - struct Map *prev; -}; - -extern void map_update(struct Client *server); - -#ifdef HEAD_IN_SAND_LINKS -extern void map_dump_links_head_in_sand(struct Client *sptr, char *mask); -#endif /* HEAD_IN_SAND_LINKS */ -#ifdef HEAD_IN_SAND_MAP -extern void map_dump_head_in_sand(struct Client *cptr); -#endif /* HEAD_IN_SAND_MAP */ - -extern void map_dump(struct Client *cptr, struct Client *server, char *mask, int prompt_length); - -#endif /* INCLUDED_motd_h */ - diff --git a/ircd/Makefile.in b/ircd/Makefile.in index 0f02c97..9842427 100644 --- a/ircd/Makefile.in +++ b/ircd/Makefile.in @@ -193,7 +193,6 @@ IRCD_SRC = \ m_who.c \ m_whois.c \ m_whowas.c \ - map.c \ match.c \ memdebug.c \ motd.c \ @@ -375,8 +374,8 @@ IPcheck.o: IPcheck.c ../config.h ../include/IPcheck.h ../include/client.h \ ../include/ircd_defs.h ../include/dbuf.h ../include/msgq.h \ ../include/ircd_events.h ../include/ircd_handler.h ../include/ircd.h \ ../include/struct.h ../include/msg.h ../include/numnicks.h \ - ../include/ircd_alloc.h ../include/s_debug.h ../include/s_user.h \ - ../include/send.h + ../include/ircd_alloc.h ../include/ircd_features.h ../include/s_debug.h \ + ../include/s_user.h ../include/send.h channel.o: channel.c ../config.h ../include/channel.h \ ../include/ircd_defs.h ../include/client.h ../include/dbuf.h \ ../include/msgq.h ../include/ircd_events.h ../include/ircd_handler.h \ @@ -442,17 +441,33 @@ ircd.o: ircd.c ../config.h ../include/ircd.h ../include/struct.h \ ../include/destruct_event.h ../include/channel.h ../include/hash.h \ ../include/ircd_alloc.h ../include/ircd_features.h \ ../include/ircd_log.h ../include/ircd_reply.h ../include/ircd_signal.h \ - ../include/ircd_string.h ../include/ircd_chattr.h ../include/jupe.h \ - ../include/list.h ../include/match.h ../include/motd.h ../include/msg.h \ + ../include/ircd_string.h ../include/ircd_chattr.h \ + ../include/ircd_crypt.h ../include/jupe.h ../include/list.h \ + ../include/match.h ../include/motd.h ../include/msg.h \ ../include/numeric.h ../include/numnicks.h ../include/opercmds.h \ ../include/parse.h ../include/res.h ../include/s_auth.h \ ../include/s_bsd.h ../include/s_conf.h ../include/s_debug.h \ ../include/s_misc.h ../include/s_stats.h ../include/send.h \ ../include/sys.h ../include/uping.h ../include/userload.h \ - ../include/version.h ../include/whowas.h ../include/ircd_crypt.h + ../include/version.h ../include/whowas.h ircd_alloc.o: ircd_alloc.c ../config.h ../include/ircd_alloc.h \ ../include/ircd_string.h ../include/ircd_chattr.h ../include/s_debug.h \ ../include/ircd_defs.h +ircd_auth.o: ircd_auth.c ../config.h ../include/client.h \ + ../include/ircd_defs.h ../include/dbuf.h ../include/msgq.h \ + ../include/ircd_events.h ../include/ircd_handler.h \ + ../include/ircd_alloc.h ../include/ircd_auth.h \ + ../include/ircd_features.h ../include/ircd_log.h \ + ../include/ircd_osdep.h ../include/ircd_snprintf.h \ + ../include/ircd_string.h ../include/ircd_chattr.h ../include/ircd.h \ + ../include/struct.h ../include/msg.h ../include/res.h \ + ../include/s_bsd.h ../include/s_misc.h ../include/s_user.h \ + ../include/send.h +ircd_crypt.o: ircd_crypt.c ../config.h ../include/ircd_crypt.h \ + ../include/ircd_alloc.h ../include/ircd_features.h \ + ../include/ircd_string.h ../include/ircd_chattr.h ../include/s_debug.h \ + ../include/ircd_defs.h ../include/ircd_crypt_native.h \ + ../include/ircd_crypt_plain.h ../include/ircd_crypt_smd5.h ircd_events.o: ircd_events.c ../config.h ../include/ircd_events.h \ ../include/ircd.h ../include/struct.h ../include/ircd_defs.h \ ../include/ircd_alloc.h ../include/ircd_log.h \ @@ -501,16 +516,6 @@ ircd_snprintf.o: ircd_snprintf.c ../config.h ../include/client.h \ ircd_string.o: ircd_string.c ../config.h ../include/ircd_string.h \ ../include/ircd_chattr.h ../include/ircd_defs.h ../include/ircd_log.h \ chattr.tab.c -ircd_md5.o: ircd_md5.c ../config.h ../include/ircd_md5.h -ircd_crypt.o: ircd_crypt.c ../config.h ../include/ircd_crypt.h \ - ../include/ircd_alloc.h ../include/s_debug.h -ircd_crypt_native.o: ircd_crypt_native.c ../config.h \ - ../include/ircd_crypt_native.h ../include/ircd_crypt.h \ - ../include/s_debug.h -ircd_crypt_plain.o: ircd_crypt_plain.c ../config.h ../include/ircd_crypt.h \ - ../include/ircd_crypt_plain.h ../include/s_debug.h -ircd_crypt_smd5.o: ircd_crypt_smd5.c ../config.h ../include/ircd_crypt.h \ - ../include/s_debug.h ../include/ircd_crypt_smd5.h jupe.o: jupe.c ../config.h ../include/jupe.h ../include/client.h \ ../include/ircd_defs.h ../include/dbuf.h ../include/msgq.h \ ../include/ircd_events.h ../include/ircd_handler.h ../include/hash.h \ @@ -546,7 +551,7 @@ m_account.o: m_account.c ../config.h ../include/client.h \ ../include/ircd_events.h ../include/ircd_handler.h ../include/ircd.h \ ../include/struct.h ../include/ircd_reply.h ../include/ircd_string.h \ ../include/ircd_chattr.h ../include/msg.h ../include/numnicks.h \ - ../include/s_user.h ../include/send.h + ../include/s_debug.h ../include/s_user.h ../include/send.h m_admin.o: m_admin.c ../config.h ../include/client.h \ ../include/ircd_defs.h ../include/dbuf.h ../include/msgq.h \ ../include/ircd_events.h ../include/ircd_handler.h ../include/hash.h \ @@ -686,10 +691,10 @@ m_invite.o: m_invite.c ../config.h ../include/channel.h \ ../include/ircd_defs.h ../include/client.h ../include/dbuf.h \ ../include/msgq.h ../include/ircd_events.h ../include/ircd_handler.h \ ../include/hash.h ../include/ircd.h ../include/struct.h \ - ../include/ircd_reply.h ../include/ircd_string.h \ - ../include/ircd_chattr.h ../include/list.h ../include/msg.h \ - ../include/numeric.h ../include/numnicks.h ../include/s_user.h \ - ../include/send.h + ../include/ircd_features.h ../include/ircd_reply.h \ + ../include/ircd_string.h ../include/ircd_chattr.h ../include/list.h \ + ../include/msg.h ../include/numeric.h ../include/numnicks.h \ + ../include/s_user.h ../include/send.h m_ison.o: m_ison.c ../config.h ../include/client.h ../include/ircd_defs.h \ ../include/dbuf.h ../include/msgq.h ../include/ircd_events.h \ ../include/ircd_handler.h ../include/hash.h ../include/ircd.h \ @@ -732,7 +737,7 @@ m_links.o: m_links.c ../config.h ../include/client.h \ ../include/struct.h ../include/ircd_features.h ../include/ircd_reply.h \ ../include/ircd_string.h ../include/ircd_chattr.h ../include/match.h \ ../include/msg.h ../include/numeric.h ../include/numnicks.h \ - ../include/s_user.h ../include/send.h ../include/map.h + ../include/s_user.h ../include/send.h m_list.o: m_list.c ../config.h ../include/channel.h \ ../include/ircd_defs.h ../include/client.h ../include/dbuf.h \ ../include/msgq.h ../include/ircd_events.h ../include/ircd_handler.h \ @@ -756,8 +761,7 @@ m_map.o: m_map.c ../config.h ../include/client.h ../include/ircd_defs.h \ ../include/ircd_snprintf.h ../include/ircd_string.h \ ../include/ircd_chattr.h ../include/list.h ../include/match.h \ ../include/msg.h ../include/numeric.h ../include/s_user.h \ - ../include/s_serv.h ../include/send.h ../include/querycmds.h \ - ../include/map.h + ../include/s_serv.h ../include/send.h ../include/querycmds.h m_mode.o: m_mode.c ../config.h ../include/handlers.h ../include/channel.h \ ../include/ircd_defs.h ../include/client.h ../include/dbuf.h \ ../include/msgq.h ../include/ircd_events.h ../include/ircd_handler.h \ @@ -788,7 +792,7 @@ m_nick.o: m_nick.c ../config.h ../include/IPcheck.h ../include/client.h \ ../include/ircd_features.h ../include/ircd_reply.h \ ../include/ircd_string.h ../include/msg.h ../include/numeric.h \ ../include/numnicks.h ../include/s_debug.h ../include/s_misc.h \ - ../include/s_user.h ../include/send.h + ../include/s_user.h ../include/send.h ../include/sys.h m_notice.o: m_notice.c ../config.h ../include/client.h \ ../include/ircd_defs.h ../include/dbuf.h ../include/msgq.h \ ../include/ircd_events.h ../include/ircd_handler.h \ @@ -963,9 +967,9 @@ m_topic.o: m_topic.c ../config.h ../include/channel.h \ ../include/ircd_defs.h ../include/client.h ../include/dbuf.h \ ../include/msgq.h ../include/ircd_events.h ../include/ircd_handler.h \ ../include/hash.h ../include/ircd.h ../include/struct.h \ - ../include/ircd_reply.h ../include/ircd_string.h \ - ../include/ircd_chattr.h ../include/msg.h ../include/numeric.h \ - ../include/numnicks.h ../include/send.h + ../include/ircd_features.h ../include/ircd_reply.h \ + ../include/ircd_string.h ../include/ircd_chattr.h ../include/msg.h \ + ../include/numeric.h ../include/numnicks.h ../include/send.h m_trace.o: m_trace.c ../config.h ../include/class.h ../include/client.h \ ../include/ircd_defs.h ../include/dbuf.h ../include/msgq.h \ ../include/ircd_events.h ../include/ircd_handler.h ../include/hash.h \ @@ -1061,15 +1065,6 @@ m_whowas.o: m_whowas.c ../config.h ../include/client.h \ ../include/ircd_chattr.h ../include/msg.h ../include/numeric.h \ ../include/numnicks.h ../include/s_user.h ../include/s_misc.h \ ../include/send.h ../include/whowas.h -map.o: map.c ../config.h ../include/map.h ../include/ircd_defs.h \ - ../include/client.h ../include/dbuf.h ../include/msgq.h \ - ../include/ircd_events.h ../include/ircd_handler.h ../include/ircd.h \ - ../include/struct.h ../include/ircd_reply.h ../include/ircd_snprintf.h \ - ../include/ircd_string.h ../include/ircd_chattr.h \ - ../include/ircd_alloc.h ../include/hash.h ../include/list.h \ - ../include/match.h ../include/msg.h ../include/numeric.h \ - ../include/s_user.h ../include/s_serv.h ../include/send.h \ - ../include/querycmds.h ../include/ircd_features.h match.o: match.c ../config.h ../include/match.h ../include/ircd_chattr.h memdebug.o: memdebug.c ../include/ircd.h ../include/struct.h \ ../include/ircd_defs.h ../include/ircd_alloc.h ../include/client.h \ @@ -1159,13 +1154,14 @@ s_conf.o: s_conf.c ../config.h ../include/s_conf.h ../include/client.h \ ../include/class.h ../include/crule.h ../include/ircd_features.h \ ../include/fileio.h ../include/gline.h ../include/hash.h \ ../include/ircd.h ../include/struct.h ../include/ircd_alloc.h \ - ../include/ircd_chattr.h ../include/ircd_log.h ../include/ircd_reply.h \ - ../include/ircd_snprintf.h ../include/ircd_string.h ../include/list.h \ - ../include/listener.h ../include/match.h ../include/motd.h \ - ../include/numeric.h ../include/numnicks.h ../include/opercmds.h \ - ../include/parse.h ../include/res.h ../include/s_bsd.h \ - ../include/s_debug.h ../include/s_misc.h ../include/send.h \ - ../include/support.h ../include/sys.h + ../include/ircd_auth.h ../include/ircd_chattr.h ../include/ircd_log.h \ + ../include/ircd_reply.h ../include/ircd_snprintf.h \ + ../include/ircd_string.h ../include/list.h ../include/listener.h \ + ../include/match.h ../include/motd.h ../include/numeric.h \ + ../include/numnicks.h ../include/opercmds.h ../include/parse.h \ + ../include/res.h ../include/s_bsd.h ../include/s_debug.h \ + ../include/s_misc.h ../include/send.h ../include/support.h \ + ../include/sys.h s_debug.o: s_debug.c ../config.h ../include/s_debug.h \ ../include/ircd_defs.h ../include/channel.h ../include/class.h \ ../include/client.h ../include/dbuf.h ../include/msgq.h \ @@ -1183,10 +1179,10 @@ s_misc.o: s_misc.c ../config.h ../include/s_misc.h ../include/IPcheck.h \ ../include/channel.h ../include/ircd_defs.h ../include/client.h \ ../include/dbuf.h ../include/msgq.h ../include/ircd_events.h \ ../include/ircd_handler.h ../include/hash.h ../include/ircd.h \ - ../include/struct.h ../include/ircd_alloc.h ../include/ircd_features.h \ - ../include/ircd_log.h ../include/ircd_reply.h \ - ../include/ircd_snprintf.h ../include/ircd_string.h \ - ../include/ircd_chattr.h ../include/list.h ../include/map.h \ + ../include/struct.h ../include/ircd_alloc.h ../include/ircd_auth.h \ + ../include/ircd_features.h ../include/ircd_log.h \ + ../include/ircd_reply.h ../include/ircd_snprintf.h \ + ../include/ircd_string.h ../include/ircd_chattr.h ../include/list.h \ ../include/match.h ../include/msg.h ../include/numeric.h \ ../include/numnicks.h ../include/parse.h ../include/querycmds.h \ ../include/res.h ../include/s_bsd.h ../include/s_conf.h \ @@ -1216,28 +1212,30 @@ s_stats.o: s_stats.c ../config.h ../include/class.h ../include/client.h \ ../include/ircd_defs.h ../include/dbuf.h ../include/msgq.h \ ../include/ircd_events.h ../include/ircd_handler.h ../include/gline.h \ ../include/ircd.h ../include/struct.h ../include/ircd_chattr.h \ - ../include/ircd_features.h ../include/ircd_log.h \ - ../include/ircd_reply.h ../include/ircd_string.h ../include/listener.h \ - ../include/list.h ../include/match.h ../include/motd.h ../include/msg.h \ - ../include/numeric.h ../include/numnicks.h ../include/s_bsd.h \ - ../include/s_conf.h ../include/s_debug.h ../include/s_misc.h \ - ../include/s_serv.h ../include/s_stats.h ../include/s_user.h \ - ../include/send.h ../include/userload.h + ../include/ircd_features.h ../include/ircd_crypt.h \ + ../include/ircd_log.h ../include/ircd_reply.h ../include/ircd_string.h \ + ../include/listener.h ../include/list.h ../include/match.h \ + ../include/motd.h ../include/msg.h ../include/numeric.h \ + ../include/numnicks.h ../include/s_bsd.h ../include/s_conf.h \ + ../include/s_debug.h ../include/s_misc.h ../include/s_serv.h \ + ../include/s_stats.h ../include/s_user.h ../include/send.h \ + ../include/userload.h s_user.o: s_user.c ../config.h ../include/s_user.h ../include/IPcheck.h \ ../include/channel.h ../include/ircd_defs.h ../include/class.h \ ../include/client.h ../include/dbuf.h ../include/msgq.h \ ../include/ircd_events.h ../include/ircd_handler.h ../include/hash.h \ ../include/ircd.h ../include/struct.h ../include/ircd_alloc.h \ - ../include/ircd_chattr.h ../include/ircd_features.h \ - ../include/ircd_log.h ../include/ircd_reply.h \ - ../include/ircd_snprintf.h ../include/ircd_string.h ../include/list.h \ - ../include/match.h ../include/motd.h ../include/msg.h \ - ../include/numeric.h ../include/numnicks.h ../include/parse.h \ - ../include/querycmds.h ../include/random.h ../include/s_bsd.h \ - ../include/s_conf.h ../include/s_debug.h ../include/s_misc.h \ - ../include/s_serv.h ../include/send.h ../include/support.h \ - ../include/supported.h ../include/sys.h ../include/userload.h \ - ../include/version.h ../include/whowas.h ../include/handlers.h + ../include/ircd_auth.h ../include/ircd_chattr.h \ + ../include/ircd_features.h ../include/ircd_log.h \ + ../include/ircd_reply.h ../include/ircd_snprintf.h \ + ../include/ircd_string.h ../include/list.h ../include/match.h \ + ../include/motd.h ../include/msg.h ../include/numeric.h \ + ../include/numnicks.h ../include/parse.h ../include/querycmds.h \ + ../include/random.h ../include/s_bsd.h ../include/s_conf.h \ + ../include/s_debug.h ../include/s_misc.h ../include/s_serv.h \ + ../include/send.h ../include/support.h ../include/supported.h \ + ../include/sys.h ../include/userload.h ../include/version.h \ + ../include/whowas.h ../include/handlers.h send.o: send.c ../config.h ../include/send.h ../include/channel.h \ ../include/ircd_defs.h ../include/class.h ../include/client.h \ ../include/dbuf.h ../include/msgq.h ../include/ircd_events.h \ @@ -1292,8 +1290,8 @@ y.tab.o: y.tab.c ../config.h ../include/s_conf.h ../include/client.h \ ../include/ircd_events.h ../include/ircd_handler.h ../include/class.h \ ../include/crule.h ../include/ircd_features.h ../include/fileio.h \ ../include/gline.h ../include/hash.h ../include/ircd.h \ - ../include/struct.h ../include/ircd_alloc.h ../include/ircd_chattr.h \ - ../include/ircd_log.h ../include/ircd_reply.h \ + ../include/struct.h ../include/ircd_alloc.h ../include/ircd_auth.h \ + ../include/ircd_chattr.h ../include/ircd_log.h ../include/ircd_reply.h \ ../include/ircd_snprintf.h ../include/ircd_string.h ../include/list.h \ ../include/listener.h ../include/match.h ../include/motd.h \ ../include/numeric.h ../include/numnicks.h ../include/opercmds.h \ @@ -1324,3 +1322,13 @@ engine_kqueue.o: engine_kqueue.c ../config.h ../include/ircd_events.h \ engine_select.o: engine_select.c ../config.h ../include/ircd_events.h \ ../include/ircd.h ../include/struct.h ../include/ircd_defs.h \ ../include/ircd_log.h ../include/s_debug.h +ircd_md5.o: ircd_md5.c ../include/ircd_md5.h +ircd_crypt_plain.o: ircd_crypt_plain.c ../config.h \ + ../include/ircd_crypt.h ../include/ircd_crypt_plain.h \ + ../include/s_debug.h ../include/ircd_defs.h ../include/ircd_alloc.h +ircd_crypt_smd5.o: ircd_crypt_smd5.c ../config.h ../include/ircd_crypt.h \ + ../include/ircd_crypt_smd5.h ../include/ircd_md5.h ../include/s_debug.h \ + ../include/ircd_defs.h ../include/ircd_alloc.h +ircd_crypt_native.o: ircd_crypt_native.c ../config.h \ + ../include/ircd_crypt.h ../include/ircd_crypt_native.h \ + ../include/s_debug.h ../include/ircd_defs.h ../include/ircd_alloc.h diff --git a/ircd/channel.c b/ircd/channel.c index fd2df7e..6b03827 100644 --- a/ircd/channel.c +++ b/ircd/channel.c @@ -484,7 +484,7 @@ static int is_banned(struct Client *cptr, struct Channel *chptr, if (match(tmp->value.ban.banstr, ip_s) == 0) break; } - else if (match(tmp->value.ban.banstr, s) == 0) + if (match(tmp->value.ban.banstr, s) == 0) break; else if (sr && match(tmp->value.ban.banstr, sr) == 0) break; diff --git a/ircd/ircd_log.c b/ircd/ircd_log.c index 740feb0..c9dc203 100644 --- a/ircd/ircd_log.c +++ b/ircd/ircd_log.c @@ -395,7 +395,7 @@ log_vwrite(enum LogSys subsys, enum LogLevel severity, unsigned int flags, /* Build the basic log string */ vd.vd_format = fmt; - vd.vd_args = vl; + va_copy(vd.vd_args, vl); /* save the length for writev */ /* Log format: "SYSTEM [SEVERITY]: log message" */ diff --git a/ircd/ircd_parser.y b/ircd/ircd_parser.y index 7def3f0..86ac91a 100644 --- a/ircd/ircd_parser.y +++ b/ircd/ircd_parser.y @@ -1,8 +1,8 @@ /* * ircd_parser.y: A yacc/bison parser for ircd config files. * This is part of ircu, an Internet Relay Chat server. - * The contents of this file are Copyright(C) 2001 by Andrew Miller, the - * ircd-hybrid team and the ircu team. + * The contents of this file are Copyright 2001 Diane Bruce, + * Andrew Miller, the ircd-hybrid team and the ircu 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 @@ -274,7 +274,7 @@ generalnumeric: NUMERIC '=' NUMBER ';' { if (localConf.numeric == 0) localConf.numeric = yylval.num; - else + else if (localConf.numeric != yylval.num) parse_error("Redefinition of server numeric %i (%i)",yylval.num, localConf.numeric); }; @@ -283,7 +283,7 @@ generalname: NAME '=' QSTRING ';' { if (localConf.name == NULL) DupString(localConf.name, yylval.text); - else + else if (strcmp(localConf.name, yylval.text)) parse_error("Redefinition of server name %s (%s)",yylval.text, localConf.name); }; diff --git a/ircd/m_links.c b/ircd/m_links.c index 63f615d..cd90145 100644 --- a/ircd/m_links.c +++ b/ircd/m_links.c @@ -94,7 +94,6 @@ #include "s_user.h" #include "send.h" #include "struct.h" -#include "map.h" #include diff --git a/ircd/m_map.c b/ircd/m_map.c index 617b482..ca1f0bf 100644 --- a/ircd/m_map.c +++ b/ircd/m_map.c @@ -96,7 +96,6 @@ #include "s_serv.h" #include "send.h" #include "querycmds.h" -#include "map.h" #include #include diff --git a/ircd/map.c b/ircd/map.c deleted file mode 100644 index 52d6838..0000000 --- a/ircd/map.c +++ /dev/null @@ -1,254 +0,0 @@ -/* - * IRC - Internet Relay Chat, ircd/map.c - * Copyright (C) 1990 Jarkko Oikarinen and - * University of Oulu, Computing Center - * Copyright (C) 2002 Joseph Bongaarts - * - * See file AUTHORS in IRC package for additional names of - * the programmers. - * - * 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 1, 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., 675 Mass Ave, Cambridge, MA 02139, USA. - * - * $Id$ - */ - -#include "config.h" - -#include "map.h" -#include "client.h" -#include "ircd.h" -#include "ircd_defs.h" -#include "ircd_reply.h" -#include "ircd_snprintf.h" -#include "ircd_string.h" -#include "ircd_alloc.h" -#include "hash.h" -#include "list.h" -#include "match.h" -#include "msg.h" -#include "numeric.h" -#include "s_user.h" -#include "s_serv.h" -#include "send.h" -#include "querycmds.h" - -#include -#include -#include - -static struct Map *MapList = 0; - -/* Add a server to the map list. */ -static void map_add(struct Client *server) -{ - struct Map *map = (struct Map *)MyMalloc(sizeof(struct Map)); - - assert(IsServer(server)); - assert(!IsHub(server)); - assert(!IsService(server)); - - map->lasttime = TStime(); - strcpy(map->name, cli_name(server)); - strcpy(map->info, cli_info(server)); - map->prot = Protocol(server); - map->maxclients = cli_serv(server)->clients; - - map->prev = 0; - map->next = MapList; - - if(MapList) - MapList->prev = map; - - MapList = map; -} - -/* Remove a server from the map list */ -static void map_remove(struct Map *cptr) -{ - assert(cptr != 0); - - if(cptr->next) - cptr->next->prev = cptr->prev; - - if(cptr->prev) - cptr->prev->next = cptr->next; - - if(MapList == cptr) - MapList = cptr->next; - - MyFree(cptr); - -} - -/* Update a server in the list. Called when a server connects - * splits, or we haven't checked in more than a week. */ -void map_update(struct Client *cptr) -{ - struct Map *map = 0; - - assert(IsServer(cptr)); - - /* Find the server in the list and update it */ - for(map = MapList; map; map = map->next) - { - /* Show max clients not current, otherwise a split can be detected. */ - if(!ircd_strcmp(cli_name(cptr), map->name)) - { - map->lasttime = TStime(); - map->prot = Protocol(cptr); - strcpy(map->info, cli_info(cptr)); - if(map->maxclients < cli_serv(cptr)->clients) - map->maxclients = cli_serv(cptr)->clients; - break; - } - } - - /* We do this check after finding a matching map because - * a client server can become a hub or service (such as - * santaclara) - */ - if(IsHub(cptr) || IsService(cptr)) - { - if(map) - map_remove(map); - return; - } - - /* If we haven't seen it before, add it to the list. */ - if(!map) - map_add(cptr); -} - -#ifdef HEAD_IN_SAND_MAP - -void map_dump_head_in_sand(struct Client *cptr) -{ - struct Map *map = 0; - struct Map *smap = 0; - struct Client *acptr = 0; - - /* Send me first */ - send_reply(cptr, RPL_MAP, "", "", cli_name(&me), "", UserStats.local_clients); - - for(map = MapList; map; map = smap) - { - smap = map->next; - - /* Don't show servers we haven't seen in more than a week */ - if(map->lasttime < TStime() - MAP_CACHE_TIME) - { - acptr = FindServer(map->name); - if(!acptr) - { - map_remove(map); - continue; - } - else - map_update(acptr); - } - send_reply(cptr, RPL_MAP, smap ? "|" : "`", "-", map->name, "", map->maxclients); - } -} - -#endif /* HEAD_IN_SAND_MAP */ - -#ifdef HEAD_IN_SAND_LINKS -void map_dump_links_head_in_sand(struct Client *sptr, char *mask) -{ - struct Map *link = 0; - struct Map *slink = 0; - struct Client *acptr = 0; - - collapse(mask); - - for(link = MapList; link; link = slink) - { - slink = link->next; - - if(link->lasttime < TStime() - MAP_CACHE_TIME) - { - acptr = FindServer(link->name); - if(!acptr) - { - map_remove(link); - continue; - } - else - map_update(acptr); - } - if (!BadPtr(mask) && match(mask, link->name)) - continue; - send_reply(sptr, RPL_LINKS, link->name, cli_name(&me), 1, link->prot, - link->info); - } - /* don't forget to send me */ - send_reply(sptr, RPL_LINKS, cli_name(&me), cli_name(&me), 0, Protocol(&me), - cli_info(&me)); -} -#endif /* HEAD_IN_SAND_LINKS */ - -void map_dump(struct Client *cptr, struct Client *server, char *mask, int prompt_length) -{ - static char prompt[64]; - struct DLink *lp; - char *p = &prompt[prompt_length]; - int cnt = 0; - - *p = '\0'; - if (prompt_length > 60) - send_reply(cptr, RPL_MAPMORE, prompt, cli_name(server)); - else { - char lag[512]; - if (cli_serv(server)->lag>10000) - lag[0]=0; - else if (cli_serv(server)->lag<0) - strcpy(lag,"(0s)"); - else - sprintf(lag,"(%is)",cli_serv(server)->lag); - send_reply(cptr, RPL_MAP, prompt, ( - (IsBurst(server)) ? "*" : (IsBurstAck(server) ? "!" : "")), - cli_name(server), lag, (server == &me) ? UserStats.local_clients : - cli_serv(server)->clients); - } - if (prompt_length > 0) - { - p[-1] = ' '; - if (p[-2] == '`') - p[-2] = ' '; - } - if (prompt_length > 60) - return; - strcpy(p, "|-"); - for (lp = cli_serv(server)->down; lp; lp = lp->next) - if (match(mask, cli_name(lp->value.cptr))) - ClrFlag(lp->value.cptr, FLAG_MAP); - else - { - SetFlag(lp->value.cptr, FLAG_MAP); - cnt++; - } - for (lp = cli_serv(server)->down; lp; lp = lp->next) - { - if (!HasFlag(lp->value.cptr, FLAG_MAP)) - continue; - if (--cnt == 0) - *p = '`'; - map_dump(cptr, lp->value.cptr, mask, prompt_length + 2); - } - if (prompt_length > 0) - p[-1] = '-'; -} - - diff --git a/ircd/match.c b/ircd/match.c index 566ecaa..821c222 100644 --- a/ircd/match.c +++ b/ircd/match.c @@ -173,7 +173,7 @@ int match(const char *mask, const char *name) wild = 1; } if (*m == '\\') /* next wildcard is disregarded */ - *m++; + m++; if (!*m) { if (!*n) diff --git a/ircd/s_misc.c b/ircd/s_misc.c index aa9030b..e2f56ae 100644 --- a/ircd/s_misc.c +++ b/ircd/s_misc.c @@ -38,7 +38,6 @@ #include "ircd_snprintf.h" #include "ircd_string.h" #include "list.h" -#include "map.h" #include "match.h" #include "msg.h" #include "numeric.h" @@ -495,9 +494,6 @@ int exit_client(struct Client *cptr, /* Connection being handled by get_client_name(killer, HIDE_IP)); sendto_opmask_butone(0, SNO_NETWORK, "Net break: %C %C (%s)", cli_serv(victim)->up, victim, comment); - - if (feature_bool(FEAT_HIS_MAP) || feature_bool(FEAT_HIS_LINKS)) - map_update(victim); } /* diff --git a/ircd/s_user.c b/ircd/s_user.c index 2aefc68..98f80b0 100644 --- a/ircd/s_user.c +++ b/ircd/s_user.c @@ -570,7 +570,7 @@ int register_user(struct Client *cptr, struct Client *sptr, set_snomask(sptr, cli_snomask(sptr) & SNO_NOISY, SNO_ADD); if (feature_bool(FEAT_CONNEXIT_NOTICES)) sendto_opmask_butone(0, SNO_CONNEXIT, - "Client connecting: %s (%s@%s) [%s] {%d} [%s] <%s%s>", + "Client connecting: %s (%s@%s) [%s] {%s} [%s] <%s%s>", cli_name(sptr), user->username, user->host, cli_sock_ip(sptr), get_client_class(sptr), cli_info(sptr), NumNick(cptr) /* two %s's */); diff --git a/ircd/send.c b/ircd/send.c index 10218f0..7a79fba 100644 --- a/ircd/send.c +++ b/ircd/send.c @@ -745,7 +745,7 @@ void vsendto_opmask_butone(struct Client *one, unsigned int mask, * this is ok... */ vd.vd_format = pattern; - vd.vd_args = vl; + va_copy(vd.vd_args, vl); mb = msgq_make(0, ":%s " MSG_NOTICE " * :*** Notice -- %v", cli_name(&me), &vd); diff --git a/tools/ringlog.c b/tools/ringlog.c index f8a4c12..920ab5f 100644 --- a/tools/ringlog.c +++ b/tools/ringlog.c @@ -1,5 +1,4 @@ /* -** IRC - Internet Relay Chat, tools/ringlog.c ** Copyright (C) 2002 by Kevin L. Mitchell ** ** This program is free software; you can redistribute it and/or modify diff --git a/tools/ringlog.pl b/tools/ringlog.pl index 6442434..346b05f 100755 --- a/tools/ringlog.pl +++ b/tools/ringlog.pl @@ -1,6 +1,5 @@ #! /usr/bin/perl -w # -# IRC - Internet Relay Chat, tools/ringlog.pl # Copyright (C) 2002 by Kevin L. Mitchell # # This program is free software; you can redistribute it and/or modify