]> jfr.im git - irc/unrealircd/unrealircd.git/commitdiff
3.2-beta9
authorstskeeps <redacted>
Sun, 24 Mar 2002 17:53:11 +0000 (17:53 +0000)
committerstskeeps <redacted>
Sun, 24 Mar 2002 17:53:11 +0000 (17:53 +0000)
69 files changed:
.RELEASE.NOTES
Changes
Makefile.in
autoconf/configure.in
configure
doc/conf.doc
include/config.h
include/modules.h
include/setup.h.in
include/struct.h
include/version.h
makefile.win32
src/Makefile
src/channel.c
src/fdlist.c
src/ircd.c
src/modules.c
src/modules/Makefile.in
src/modules/invisibility.c
src/modules/l_commands.c
src/modules/m_adminchat.c
src/modules/m_akill.c
src/modules/m_away.c
src/modules/m_chghost.c
src/modules/m_chgident.c
src/modules/m_chgname.c
src/modules/m_dummy.c
src/modules/m_htm.c
src/modules/m_kill.c
src/modules/m_kline.c
src/modules/m_lag.c
src/modules/m_message.c
src/modules/m_mkpasswd.c
src/modules/m_nachat.c
src/modules/m_oper.c
src/modules/m_pingpong.c
src/modules/m_quit.c
src/modules/m_rakill.c
src/modules/m_rping.c
src/modules/m_sdesc.c
src/modules/m_sendumode.c
src/modules/m_sethost.c
src/modules/m_setident.c
src/modules/m_setname.c
src/modules/m_sqline.c
src/modules/m_svsmode.c
src/modules/m_svsmotd.c
src/modules/m_svsnick.c
src/modules/m_svsnline.c
src/modules/m_svsnoop.c
src/modules/m_svso.c
src/modules/m_swhois.c
src/modules/m_tkl.c
src/modules/m_tsctl.c
src/modules/m_unkline.c
src/modules/m_unsqline.c
src/modules/m_unzline.c
src/modules/m_who.c
src/modules/m_whois.c
src/modules/m_zline.c
src/modules/scan.c
src/modules/scan_http.c
src/modules/scan_socks.c
src/s_auth.c
src/s_bsd.c
src/s_conf.c
src/s_extra.c
src/s_misc.c
src/s_serv.c

index 9325edd24b3d74ca87b3dc0a0cb560b37e05cbee..47d699ecc8bd30d2a17e3d4873fbf6b165d6ac9c 100644 (file)
@@ -116,6 +116,10 @@ Unreal3.2-Selene (BETA7) RELEASE NOTES
 
 * +I is now in invisibility.so so it is easily disabled
 
+* set::socks has been replaced by set::scan (read doc/conf.doc for more info)
+
+* log {} syslog support added (read doc/conf.doc for more info)
+
 * MAKE SURE YOU RERUN ./Config AND RUN make clean BEFORE USING THIS VERSION!!!
 
 * THIS IS A BETA VERSION. THINGS MAY NOT WORK. REPORT ANY BUGS TO THESE 
diff --git a/Changes b/Changes
index bc2d27dffc2b99fb26432e825e88ac270a0a55fc..ea3af138faf4fde7ef47af54f68634b9c6264c2e 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,5 +1,5 @@
 /*                              
- * UnrealIRCd Changes File - (C) Carsten Munk 1999-2000 &
+ * UnrealIRCd Changes File - (C) Carsten Munk 1999-2002 &
  *                               The UnrealIRCd Team
  *                              
  * $Id$
@@ -1245,3 +1245,15 @@ seen. gmtime warning still there
   Thanks to larne, Luke, SciFi, panda, ^Tux^.. Syzop .. and the countless
   people bitching about their servers going down.
 *** beta8 released ***
+- Added log {} syslog support (appears to work fine) [#0000099]
+- Added HOOKTYPE_JOIN
+- Converted all modules to 3.2-b8 format (passes ModuleInfo)
+- Updated doc/conf.doc
+- Fix for desynch problem with the fix in /mode system, Thanks to Luke
+- One little patch for humanity, one giant step for science..
+- Cosmetic fix for /setident, found by juli ..
+- Implimented a dynamic hooktype system to allow modules to create their own hooktypes
+- Fixed a conf_unknown bug
+- Added EXLIBS= to make custommodule so a module can specify additional libraries it needs
+- Changed version to beta9 and updated documentation
+- Made +I once again work in win32
index e222dbbf0add38c0993180b18d914dde4fe0fbcf..f3c19240e5e259bce0a87620f366c047500e43cd 100644 (file)
@@ -138,7 +138,7 @@ MAKEARGS =  'CFLAGS=${CFLAGS}' 'CC=${CC}' 'IRCDLIBS=${IRCDLIBS}' \
                'CRYPTOINCLUDES=${CRYPTOINCLUDES}'
 
 custommodule:
-       cd src; ${MAKE} ${MAKEARGS} MODULEFILE=${MODULEFILE} custommodule
+       cd src; ${MAKE} ${MAKEARGS} MODULEFILE=${MODULEFILE} EXLIBS=${EXLIBS} custommodule
 
 server:
 build:
index 22d2eb9ca654a29a1a31ef5b5ad5843f27501867..e004531e7b073cd1cf33dffbdced6813b9497a19 100644 (file)
@@ -306,6 +306,8 @@ AC_CHECK_FUNCS(strcasecmp,AC_DEFINE(GOT_STRCASECMP))
 AC_CHECK_FUNCS(inet_addr,,AC_DEFINE(NEED_INET_ADDR))
 AC_CHECK_FUNCS(inet_ntoa,,AC_DEFINE(NEED_INET_NTOA))
 AC_CHECK_FUNCS(inet_netof,,AC_DEFINE(NEED_INET_NETOF))
+AC_CHECK_FUNCS(syslog,AC_DEFINE(HAVE_SYSLOG))
+AC_CHECK_FUNCS(vsyslog,AC_DEFINE(HAVE_VSYSLOG))
 AC_SUBST(REGEX)
 AC_SUBST(STRTOUL)
 AC_SUBST(CRYPTOLIB)
index 1e5a4110814c73d04ae84d2ce4adf97267634d09..ff4a8ad594f6053e999e7f3a7209d27d791ffddb 100755 (executable)
--- a/configure
+++ b/configure
@@ -4171,6 +4171,122 @@ EOF
 fi
 done
 
+for ac_func in syslog
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:4178: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 4183 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func(); below.  */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:4206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+ cat >> confdefs.h <<\EOF
+#define HAVE_SYSLOG 1
+EOF
+
+else
+  echo "$ac_t""no" 1>&6
+fi
+done
+
+for ac_func in vsyslog
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:4236: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 4241 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func(); below.  */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:4264: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+ cat >> confdefs.h <<\EOF
+#define HAVE_VSYSLOG 1
+EOF
+
+else
+  echo "$ac_t""no" 1>&6
+fi
+done
+
 
 
 
@@ -4332,7 +4448,7 @@ cat >> confdefs.h <<\EOF
 EOF
 
 echo $ac_n "checking what order we should supply the SSL libraries in""... $ac_c" 1>&6
-echo "configure:4336: checking what order we should supply the SSL libraries in" >&5
+echo "configure:4452: checking what order we should supply the SSL libraries in" >&5
 if eval "test \"`echo '$''{'ac_cv_ssl_libs'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -4340,7 +4456,7 @@ else
 save_libs="$LIBS"
 LIBS="$LIBS -lssl -lcrypto -lssl"
 cat > conftest.$ac_ext <<EOF
-#line 4344 "configure"
+#line 4460 "configure"
 #include "confdefs.h"
 #include <openssl/ssl.h>
 int main() {
@@ -4349,7 +4465,7 @@ SSL_write(NULL, NULL, NULL);
 
 ; return 0; }
 EOF
-if { (eval echo configure:4353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4469: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_cv_ssl_libs="-lssl -lcrypto -lssl" LIBS="$save_libs"
 else
@@ -4375,12 +4491,12 @@ if test "${enable_dynamic_linking+set}" = set; then
   enableval="$enable_dynamic_linking"
   
 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
-echo "configure:4379: checking for dlopen" >&5
+echo "configure:4495: checking for dlopen" >&5
 if eval "test \"`echo '$''{'ac_cv_func_dlopen'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4384 "configure"
+#line 4500 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char dlopen(); below.  */
@@ -4403,7 +4519,7 @@ dlopen();
 
 ; return 0; }
 EOF
-if { (eval echo configure:4407: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4523: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_dlopen=yes"
 else
@@ -4421,7 +4537,7 @@ if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
 else
   echo "$ac_t""no" 1>&6
 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:4425: checking for dlopen in -ldl" >&5
+echo "configure:4541: checking for dlopen in -ldl" >&5
 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -4429,7 +4545,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-ldl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4433 "configure"
+#line 4549 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -4440,7 +4556,7 @@ int main() {
 dlopen()
 ; return 0; }
 EOF
-if { (eval echo configure:4444: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -4469,20 +4585,20 @@ fi
 hold_cflags=$CFLAGS
 CFLAGS="$CFLAGS -export-dynamic"
 echo $ac_n "checking if we need the -export-dynamic flag""... $ac_c" 1>&6
-echo "configure:4473: checking if we need the -export-dynamic flag" >&5
+echo "configure:4589: checking if we need the -export-dynamic flag" >&5
 if eval "test \"`echo '$''{'ac_cv_export_dynamic'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
 cat > conftest.$ac_ext <<EOF
-#line 4479 "configure"
+#line 4595 "configure"
 #include "confdefs.h"
 
 int main() {
 int i;
 ; return 0; }
 EOF
-if { (eval echo configure:4486: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_cv_export_dynamic=yes
 else
@@ -4500,7 +4616,7 @@ CFLAGS=$hold_cflags
 fi
 
 echo $ac_n "checking for compiler option to produce PIC""... $ac_c" 1>&6
-echo "configure:4504: checking for compiler option to produce PIC" >&5
+echo "configure:4620: checking for compiler option to produce PIC" >&5
 if eval "test \"`echo '$''{'ac_cv_pic'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -4519,7 +4635,7 @@ fi
 
 echo "$ac_t""$ac_cv_pic" 1>&6
 echo $ac_n "checking if your system prepends an underscore on symbols""... $ac_c" 1>&6
-echo "configure:4523: checking if your system prepends an underscore on symbols" >&5
+echo "configure:4639: checking if your system prepends an underscore on symbols" >&5
 if eval "test \"`echo '$''{'ac_cv_underscore'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -4564,7 +4680,7 @@ if test "${enable_inet6+set}" = set; then
   enableval="$enable_inet6"
   
 echo $ac_n "checking if your system has IPv6 support""... $ac_c" 1>&6
-echo "configure:4568: checking if your system has IPv6 support" >&5
+echo "configure:4684: checking if your system has IPv6 support" >&5
 if eval "test \"`echo '$''{'ac_cv_ip6'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -4573,7 +4689,7 @@ if test "$cross_compiling" = yes; then
     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
 else
   cat > conftest.$ac_ext <<EOF
-#line 4577 "configure"
+#line 4693 "configure"
 #include "confdefs.h"
 
 #include <sys/types.h>
@@ -4585,7 +4701,7 @@ exit(0);
 }
 
 EOF
-if { (eval echo configure:4589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_ip6=yes
 else
@@ -4647,7 +4763,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
 fi
 
 echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:4651: checking host system type" >&5
+echo "configure:4767: checking host system type" >&5
 
 host_alias=$host
 case "$host_alias" in
@@ -4673,17 +4789,17 @@ acx_pthread_ok=no
 # If it isn't, don't bother looking for the threads libraries.
 ac_safe=`echo "pthread.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for pthread.h""... $ac_c" 1>&6
-echo "configure:4677: checking for pthread.h" >&5
+echo "configure:4793: checking for pthread.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4682 "configure"
+#line 4798 "configure"
 #include "confdefs.h"
 #include <pthread.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4687: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4803: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -4752,7 +4868,7 @@ esac
 result=none
 if test "$acx_pthread_ok" = "no"; then
 echo $ac_n "checking what flags pthreads needs""... $ac_c" 1>&6
-echo "configure:4756: checking what flags pthreads needs" >&5
+echo "configure:4872: checking what flags pthreads needs" >&5
 if eval "test \"`echo '$''{'ac_cv_pthreadflag'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -4790,7 +4906,7 @@ for flag in $acx_pthread_flags; do
         # functions on Solaris that doesn't have a non-functional libc stub.
         # We try pthread_create on general principles.
         cat > conftest.$ac_ext <<EOF
-#line 4794 "configure"
+#line 4910 "configure"
 #include "confdefs.h"
 #include <pthread.h>
 int main() {
@@ -4799,7 +4915,7 @@ pthread_t th; pthread_join(th, 0);
                      pthread_create(0,0,0,0); pthread_cleanup_pop(0); 
 ; return 0; }
 EOF
-if { (eval echo configure:4803: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   acx_pthread_ok=yes
 else
@@ -4845,20 +4961,20 @@ esac
         # Detect AIX lossage: threads are created detached by default
         # and the JOINABLE attribute has a nonstandard name (UNDETACHED).
         echo $ac_n "checking for joinable pthread attribute""... $ac_c" 1>&6
-echo "configure:4849: checking for joinable pthread attribute" >&5
+echo "configure:4965: checking for joinable pthread attribute" >&5
 if eval "test \"`echo '$''{'ac_cv_pthreadjoin'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
         cat > conftest.$ac_ext <<EOF
-#line 4855 "configure"
+#line 4971 "configure"
 #include "confdefs.h"
 #include <pthread.h>
 int main() {
 int attr=PTHREAD_CREATE_JOINABLE;
 ; return 0; }
 EOF
-if { (eval echo configure:4862: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_cv_pthreadjoin=PTHREAD_CREATE_JOINABLE
 else
@@ -4870,14 +4986,14 @@ fi
 rm -f conftest*
         if test "$ac_cv_pthreadjoin" = "unknown"; then
                 cat > conftest.$ac_ext <<EOF
-#line 4874 "configure"
+#line 4990 "configure"
 #include "confdefs.h"
 #include <pthread.h>
 int main() {
 int attr=PTHREAD_CREATE_UNDETACHED;
 ; return 0; }
 EOF
-if { (eval echo configure:4881: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4997: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_cv_pthreadjoin=PTHREAD_CREATE_UNDETACHED
 else
@@ -4903,7 +5019,7 @@ EOF
         fi
 
         echo $ac_n "checking if more special flags are required for pthreads""... $ac_c" 1>&6
-echo "configure:4907: checking if more special flags are required for pthreads" >&5
+echo "configure:5023: checking if more special flags are required for pthreads" >&5
 if eval "test \"`echo '$''{'ac_cv_pthreadspecial'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -4928,7 +5044,7 @@ echo "$ac_t""$ac_cv_pthreadspecial" 1>&6
         # Extract the first word of "cc_r", so it can be a program name with args.
 set dummy cc_r; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4932: checking for $ac_word" >&5
+echo "configure:5048: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_PTHREAD_CC'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -4960,7 +5076,7 @@ else
 fi
 if test "x$ac_cv_pthreadflag"!=x; then
 echo $ac_n "checking if pthreads uses one thread per process""... $ac_c" 1>&6
-echo "configure:4964: checking if pthreads uses one thread per process" >&5
+echo "configure:5080: checking if pthreads uses one thread per process" >&5
 if eval "test \"`echo '$''{'ac_cv_thread_multi'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -4973,7 +5089,7 @@ if test "$cross_compiling" = yes; then
     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
 else
   cat > conftest.$ac_ext <<EOF
-#line 4977 "configure"
+#line 5093 "configure"
 #include "confdefs.h"
 
 #include <pthread.h>
@@ -5007,7 +5123,7 @@ int main() {
 }
 
 EOF
-if { (eval echo configure:5011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:5127: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_thread_multi=no
 else
@@ -5083,12 +5199,12 @@ CC="$PTHREAD_CC"
 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
 IRCDLIBS="$IRCDLIBS $PTHREAD_LIBS"
 echo $ac_n "checking if FD_SETSIZE is large enough to allow $ac_fd file descriptors""... $ac_c" 1>&6
-echo "configure:5087: checking if FD_SETSIZE is large enough to allow $ac_fd file descriptors" >&5
+echo "configure:5203: checking if FD_SETSIZE is large enough to allow $ac_fd file descriptors" >&5
 if test "$cross_compiling" = yes; then
     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
 else
   cat > conftest.$ac_ext <<EOF
-#line 5092 "configure"
+#line 5208 "configure"
 #include "confdefs.h"
 
 #include <sys/types.h>
@@ -5100,7 +5216,7 @@ exit(1);
 }
 
 EOF
-if { (eval echo configure:5104: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:5220: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   echo "$ac_t""yes" 1>&6
 else
index 8f730ed186ee91ebc644b24db2a8f8b514b1896d..814fa32eadc7d2563832afb27f839291a7626415 100644 (file)
@@ -63,8 +63,8 @@ can appear on one line or over multiple lines. The format above is what is norma
 what will be used in this file) because it is easy to read. Note: the configuration file is 
 currently case sensitive so BLOCK-NAME is not the same as block-name. There is a special 
 notation used to talk about entries in the config file. For example, to talk about 
-<directive-name> in the example above, you'd say <block-name>::<block-directive>, and if that 
-directive has a subblock you want to reverence, you would add another :: and the name of the 
+<block-directive> in the example above, you'd say <block-name>::<block-directive>, and if that 
+directive has a sub-block you want to reference, you would add another :: and the name of the 
 sub directive. To talk about an unnamed directive you would do <block-name>:: which would in 
 this case mean <block-value>, or it could be an entry in a sub block that has no name.
 
@@ -215,6 +215,7 @@ oper <name> {
        password <password> { <auth-type>; };
        class <class-name>;
        snomask <snomask>;
+       swhois <swhois>;
        flags <flags>;
        flags {
                <flag>;
@@ -242,11 +243,14 @@ The oper::password is the password the user must specify, oper::password:: allow
 specify an authentication method for this password, valid auth-types are crypt, md5, and sha1. 
 If you want to use a plain-text password leave this sub-block out. The oper::class directive 
 specifies the name of a preexisting (appears before this in the config file) class name that 
-the oper block will use. The oper::snomask directive lets you specify the default snomask the oper will
-receive, this overrides the standard snomask that is normally set. The oper::flags directive has two
-formats. If you wish to use the old style oper flags i.e., OAa, you use the flags <flags> method, 
-if you want to use the new style, i.e., services-admin, then you use the flags { <flag>; } method. 
-Below is a list of all the flags (in both formats) and what they do.
+the oper block will use. The oper::snomask directive lets you specify the default snomask
+the \oper will receive, this overrides the standard snomask that is normally set. The 
+oper::swhois directive allows you to specify an swhois line that will be set when the user 
+/oper's. Note: This directive will be overridden if you use an IRC Services program that also 
+sets swhois. The oper::flags directive has two formats. If you wish to use the old style
+oper flags i.e., OAa, you use the flags <flags> method, if you want to use the new style, i.e.,
+services-admin, then you use the flags { <flag>; } method. Below is a list of all the flags 
+(in both formats) and what they do.
 
 o      local                   Makes you a local operator (contains rhgwlckbBn)
 O      global                  Makes you a global operator (contains oLKG)
@@ -337,12 +341,15 @@ log ircd.log {
        flags { errors; tkl; kline; };
 };
 
-The log block allows you to assign different log files for different purposes. The log:: 
-contains the name of the log file. log::maxsize is an optional directive that allows you to 
-specify a size that the log file will be wiped and restarted. You can enter this string using 
-MB for megabytes, KB, for kilobytes, GB, for gigabytes. The log::flags specifies which types of
-information will be in this log. You can specify one or more of the following, errors, kills, 
-tkl (G:lines and Shuns), connects, server-connects, kline, and oper. 
+The log block allows you to assign different log files for different purposes. If the log 
+filename is syslog and your system has syslogd, then syslogd will be used to log for this file.
+If you do not have syslogd, then specifying a filename of syslog will simply write to a file 
+named syslog. The log:: contains the name of the log file. log::maxsize is an optional 
+directive that allows you to specify a size that the log file will be wiped and restarted. You
+can enter this string using MB for megabytes, KB, for kilobytes, GB, for gigabytes. The 
+log::flags specifies which types of information will be in this log. You can specify one or 
+more of the following, errors, kills, tkl (G:lines and Shuns), connects, server-connects, 
+kline, and oper. 
 
 12.0 Tld block (T:line)
 
index 63ade72d9542a7a21dc2e5949a865c136ad1ce6a..58d3e97e524937e781ac1856d6328d5c78216be9 100644 (file)
  */
 #define        CMDLINE_CONFIG          /* allow conf-file to be specified on command line */
 
-/*
- * If you wish to have the server send 'vital' messages about server
- * through syslog, define USE_SYSLOG. Only system errors and events critical
- * to the server are logged although if this is defined with FNAME_USERLOG,
- * syslog() is used instead of the above file. It is not recommended that
- * this option is used unless you tell the system administrator beforehand
- * and obtain their permission to send messages to the system log files.
- */
-#ifndef _WIN32
-#undef USE_SYSLOG
-#endif
-
-#ifdef USE_SYSLOG
-/*
- * If you use syslog above, you may want to turn some (none) of the
- * spurious log messages for KILL/SQUIT off.
- */
-#undef SYSLOG_KILL             /* log all operator kills to syslog */
-#undef  SYSLOG_SQUIT           /* log all remote squits for all servers to syslog */
-#undef SYSLOG_CONNECT          /* log remote connect messages for other all servs */
-#undef SYSLOG_USERS            /* send userlog stuff to syslog */
-#undef SYSLOG_OPER             /* log all users who successfully become an Op */
-
-/*
- * If you want to log to a different facility than DAEMON, change
- * this define.
- */
-#define LOG_FACILITY LOG_DAEMON
-#endif /* USE_SYSLOG */
-
 /*
  * Size of the LISTEN request.  Some machines handle this large
  * without problem, but not all.  It defaults to 5, but can be
index cd7a82d62f3f9aab6405790b7e0989aad6643185..70a942c47b226127d93550f5c79c932d98f1b072 100644 (file)
@@ -22,7 +22,8 @@
 #define MODULES_H
 #define MOD_VERSION    "3.2-b5-1"
 #define MOD_WE_SUPPORT  "3.2-b5*"
-#define MAXHOOKTYPES   20
+#define MAXCUSTOMHOOKS  30
+#define MAXHOOKTYPES   60
 typedef void                   (*vFP)();       /* Void function pointer */
 typedef int                    (*iFP)();       /* Integer function pointer */
 typedef char                   (*cFP)();       /* char * function pointer */
@@ -55,6 +56,7 @@ typedef struct _mod_symboltable Mod_SymbolDepTable;
 typedef struct _event Event;
 typedef struct _eventinfo EventInfo;
 typedef struct _irchook Hook;
+typedef struct _hooktype Hooktype;
 
 /*
  * Module header that every module must include, with the name of
@@ -90,6 +92,7 @@ typedef struct {
 #define MOBJ_EVENT   0x0001
 #define MOBJ_HOOK    0x0002
 #define MOBJ_COMMAND 0x0004
+#define MOBJ_HOOKTYPE 0x0008
 
 typedef struct _command {
        struct _command *prev, *next;
@@ -103,6 +106,7 @@ typedef struct _ModuleObject {
                Event *event;
                Hook *hook;
                Command *command;
+               Hooktype *hooktype;
        } object;
 } ModuleObject;
 
@@ -116,6 +120,11 @@ struct _irchook {
        Module *owner;
 };
 
+struct _hooktype {
+       short id;
+       char *string;
+       ModuleChild *parents;
+};
 /*
  * What we use to keep track internally of the modules
 */
@@ -197,6 +206,7 @@ void    SetupEvents(void);
 void   LockEventSystem(void);
 void   UnlockEventSystem(void);
 extern Hook            *Hooks[MAXHOOKTYPES];
+extern Hooktype                Hooktypes[MAXCUSTOMHOOKS];
 extern Hook            *global_i;
 
 void    Module_Init(void);
@@ -220,6 +230,9 @@ void *obsd_dlsym(void *handle, char *symbol);
 Hook   *HookAddMain(Module *module, int hooktype, int (*intfunc)(), void (*voidfunc)());
 Hook   *HookDel(Hook *hook);
 
+Hooktype *HooktypeAdd(Module *module, char *string, int *type);
+void HooktypeDel(Hooktype *hooktype, Module *module);
+
 #define RunHook0(hooktype) for (global_i = Hooks[hooktype]; global_i; global_i = global_i->next)(*(global_i->func.intfunc))()
 #define RunHook(hooktype,x) for (global_i = Hooks[hooktype]; global_i; global_i = global_i->next) (*(global_i->func.intfunc))(x)
 #define RunHookReturn(hooktype,x,ret) for (global_i = Hooks[hooktype]; global_i; global_i = global_i->next) if((*(global_i->func.intfunc))(x) ret) return -1
@@ -234,7 +247,6 @@ void CommandDel(Command *command);
 #define HOOKTYPE_LOCAL_QUIT    1
 #define HOOKTYPE_LOCAL_NICKCHANGE 2
 #define HOOKTYPE_LOCAL_CONNECT 3
-#define HOOKTYPE_SCAN_HOST 4   /* Taken care of in scan.c */
 #define HOOKTYPE_SCAN_INFO 5    /* Taken care of in scan.c */
 #define HOOKTYPE_CONFIG_UNKNOWN 6
 #define HOOKTYPE_REHASH 7
@@ -244,6 +256,7 @@ void CommandDel(Command *command);
 #define HOOKTYPE_SERVER_CONNECT 11
 #define HOOKTYPE_SERVER_QUIT 12
 #define HOOKTYPE_STATS 13
+#define HOOKTYPE_LOCAL_JOIN 14
 /* Module flags */
 #define MODFLAG_NONE   0x0000
 #define MODFLAG_LOADED 0x0001 /* (mod_load has been called and suceeded) */
index cfa0fbd399a7691652c3947f0a3b7f4f0160f930..472e0261d7ed4df22d7d9902c97e983f8c45b338 100644 (file)
 /* Define if you need bzero */
 #undef NEED_BZERO
 
+/* Define if you have syslog */
+#undef HAVE_SYSLOG
+
+/* Define if you have vsyslog */
+#undef HAVE_VSYSLOG
+
 /* Define if you want to allow SSL connections */
 #undef USE_SSL
 
index 24f5bc33e77120f1efbf37a78b22d51b28da050d..7c17479c49d0b1281524c6eebb147bed0b0cfa22 100644 (file)
@@ -40,7 +40,7 @@
 # include <stddef.h>
 #endif
 
-#ifdef USE_SYSLOG
+#ifdef HAVE_SYSLOG
 # include <syslog.h>
 # ifdef SYSSYSLOGH
 #  include <sys/syslog.h>
index 303fdb8027c450efab56af94d6cebca00352da10..31334dda335330f1b11cb991b7ad6777ec08e60c 100644 (file)
@@ -31,7 +31,7 @@
 #define PATCH1                 "3"
 #define PATCH2                 ".2"
 #define PATCH3                 "-Selene"
-#define PATCH4                 "[beta8]"
+#define PATCH4                 "[beta9]"
 #define PATCH5                 ""
 #define PATCH6                 ""
 #define PATCH7                 ""
index d46a50a458a0f168a7bbc7f6b944897eb1d9e990..c1c22cad07c9cdbfe4c0d222e9accec5e83f3e4a 100644 (file)
@@ -44,7 +44,7 @@ MOD_FILES=SRC/L_COMMANDS.OBJ SRC/M_CHGHOST.OBJ SRC/M_SDESC.OBJ SRC/M_SETIDENT.OB
  SRC/M_PINGPONG.OBJ SRC/M_QUIT.OBJ SRC/M_RAKILL.OBJ SRC/M_RPING.OBJ SRC/M_SENDUMODE.OBJ \
  SRC/M_SQLINE.OBJ SRC/M_KILL.OBJ SRC/M_TSCTL.OBJ SRC/M_UNKLINE.OBJ \
  SRC/M_UNSQLINE.OBJ SRC/M_UNZLINE.OBJ SRC/M_WHOIS.OBJ SRC/M_ZLINE.OBJ \
- SRC/SCAN.OBJ SRC/SCAN_SOCKS.OBJ SRC/SCAN_HTTP.OBJ SRC/M_TKL.OBJ
+ SRC/SCAN.OBJ SRC/SCAN_SOCKS.OBJ SRC/SCAN_HTTP.OBJ SRC/M_TKL.OBJ SRC/INVISIBILITY.OBJ
 
 
 ALL: CONF WIRCD.EXE
@@ -354,6 +354,9 @@ src/scan_socks.obj: src/modules/scan_socks.c $(INCLUDES)
 src/scan_http.obj: src/modules/scan_http.c $(INCLUDES)
         $(CC) $(CFLAGS) src/modules/scan_http.c
 
+src/invisibility.obj: src/modules/invisibility.c $(INCLUDES)
+        $(CC) $(CFLAGS) src/modules/invisibility.c
+
 src/win32/win32.res: src/win32/win32gui.rc
         $(RC) /l 0x409 /fosrc/win32/win32.res /i ./include /i ./src \
               /d NDEBUG src/win32/win32gui.rc
index 643d8e194d9e5b3651f7179685370fc2705e94ca..bdf0610098d490539a4f8bcd56418e302b594b7a 100644 (file)
@@ -53,7 +53,7 @@ all: build
 build: ircd mods
 
 custommodule:
-       cd modules; make $(MAKEARGS) MODULEFILE=$(MODULEFILE) custommodule
+       cd modules; make $(MAKEARGS) MODULEFILE=$(MODULEFILE) EXLIBS=$(EXLIBS) custommodule
 
 ircd: $(OBJS)
        $(CC) $(CFLAGS) $(CRYPTOLIB) -o ircd $(OBJS) $(LDFLAGS) $(IRCDLIBS) $(CRYPTOLIB)
index 0d534afa68886360303d8e6ca46788ef401f206f..f63e04c88999e28dfe9320f85ae4b8a1ee15f8c1 100644 (file)
@@ -2180,14 +2180,14 @@ void set_mode(aChannel *chptr, aClient *cptr, int parc, char *parv[], u_int *pco
        char *curchr;
        u_int what = MODE_ADD;
        long modetype = 0;
-       int  paracount;
+       char *param = NULL;
 #ifdef DEVELOP
        char *tmpo = NULL;
 #endif
        aCtab *tab = &cFlagTab[0];
        aCtab foundat;
        int  found = 0;
-       paracount = 1;
+       int  paracount = 1;
        *pcount = 0;
        for (curchr = parv[0]; *curchr; curchr++)
        {
@@ -2236,14 +2236,19 @@ void set_mode(aChannel *chptr, aClient *cptr, int parc, char *parv[], u_int *pco
                                      me.name, cptr->name, *curchr);
                                  break;
                          }
-                         if (paracount > parc)
-                               break;
+                         /* We can afford to send off a param */
+                         if (parc - paracount >= 1)
+                         {
+                               param = parv[paracount];
+                         }
+                         else
+                               param = NULL;
                          
-                         if (parv[paracount] && ((strlen(parv[paracount]) >= MODEBUFLEN)))
-                                 parv[paracount][MODEBUFLEN - 1] = '\0';
+                         if (param && ((strlen(param) >= MODEBUFLEN)))
+                                 param[MODEBUFLEN - 1] = '\0';
                          paracount +=
                              do_mode_char(chptr, modetype, *curchr,
-                             parv[paracount], what, cptr, pcount, pvar,
+                             param, what, cptr, pcount, pvar,
                              bounce);
                          break;
                }
@@ -2802,6 +2807,17 @@ CMD_FUNC(channel_link)
                        }
                        continue;
                }
+               if (MyConnect(sptr)) {
+                       int breakit = 0;
+                       for (global_i = Hooks[HOOKTYPE_LOCAL_JOIN]; global_i; global_i = global_i->next) {
+                               if((*(global_i->func.intfunc))(cptr, sptr, chptr, parv) > 0) {
+                                       breakit = 1;
+                                       break;
+                               }
+                       }
+                       if (breakit)
+                               continue;
+               }
                /*
                   **  Complete user entry to the new channel (if any)
                 */
@@ -3037,6 +3053,18 @@ CMD_FUNC(m_join)
                        continue;
 
                }
+               if (MyConnect(sptr)) {
+                       int breakit = 0;
+                       for (global_i = Hooks[HOOKTYPE_LOCAL_JOIN]; global_i; global_i = global_i->next) {
+                               if((*(global_i->func.intfunc))(cptr,sptr,chptr,parv) > 0) {
+                                       breakit = 1;
+                                       break;
+                               }
+                       }
+                       if (breakit)
+                               continue;
+               }
+
                /*
                   **  Complete user entry to the new channel (if any)
                 */
@@ -4575,6 +4603,7 @@ aParv *mp2parv(char *xmbuf, char *parmbuf)
                c++; /* in my dreams */
        }
        pparv.parv[c] = NULL;
+       pparv.parc = c;
        return (&pparv);
 }
 
index d08c84651309f90308f66b98d0e10b315b1c1db3..f6c939516e22189ef7f3ee8b8d720ac6ed4b6559 100644 (file)
@@ -38,9 +38,6 @@ void addto_fdlist(int fd, fdlist * listp)
                 */
                --listp->last_entry;
                ircd_log(LOG_ERROR, "fdlist.c list too big, must exit...");
-#ifdef USE_SYSLOG
-               (void)syslog(LOG_CRIT, "fdlist.c list too big.. must exit");
-#endif
                abort();
        }
        else
index 002ad36c8c99846abfe3173a49ed3548e5ff05d1..4453311ce2f4d4a70be2f9d051f3632178cee6c4 100644 (file)
@@ -210,9 +210,6 @@ VOIDSIG s_die()
 #ifdef _WIN32
        int i;
        aClient *cptr;
-#endif
-#ifdef USE_SYSLOG
-       (void)syslog(LOG_CRIT, "Server Killed By SIGTERM");
 #endif
        unload_all_modules();
 #ifndef _WIN32
@@ -248,11 +245,7 @@ VOIDSIG s_rehash()
 #endif
 }
 
-void restart(char *mesg)
-{
-#ifdef USE_SYSLOG
-       (void)syslog(LOG_WARNING, "Restarting Server because: %s", mesg);
-#endif
+void restart(char *mesg) {
        server_reboot(mesg);
 }
 
@@ -260,9 +253,6 @@ VOIDSIG s_restart()
 {
        static int restarting = 0;
 
-#ifdef USE_SYSLOG
-       (void)syslog(LOG_WARNING, "Server Restarting on SIGINT");
-#endif
        if (restarting == 0)
        {
                /* Send (or attempt to) a dying scream to oper if present */
@@ -342,7 +332,7 @@ void server_reboot(char *mesg)
           ** fd 0 must be 'preserved' if either the -d or -i options have
           ** been passed to us before restarting.
         */
-#ifdef USE_SYSLOG
+#ifdef HAVE_SYSLOG
        (void)closelog();
 #endif
 #ifndef _WIN32
@@ -359,13 +349,6 @@ void server_reboot(char *mesg)
        CleanUp();
        (void)execv(myargv[0], myargv);
 #endif
-#ifdef USE_SYSLOG
-       /* Have to reopen since it has been closed above */
-
-       openlog(myargv[0], LOG_PID | LOG_NDELAY, LOG_FACILITY);
-       syslog(LOG_CRIT, "execv(%s,%s) failed: %m\n", MYNAME, myargv[0]);
-       closelog();
-#endif
 #ifndef _WIN32
        Debug((DEBUG_FATAL, "Couldn't restart server: %s", strerror(errno)));
 #else
@@ -1137,8 +1120,8 @@ int  InitwIRCD(int argc, char *argv[])
        me.fd = -1;
        SetMe(&me);
        make_server(&me);
-#ifdef USE_SYSLOG
-       openlog(myargv[0], LOG_PID | LOG_NDELAY, LOG_FACILITY);
+#ifdef HAVE_SYSLOG
+       openlog("ircd", LOG_PID | LOG_NDELAY, LOG_DAEMON);
 #endif
        /* Put in our info */
        strncpyzt(me.info, conf_me->info, sizeof(me.info));
@@ -1200,9 +1183,6 @@ int  InitwIRCD(int argc, char *argv[])
        R_fail_id = strlen(REPORT_FAIL_ID);
        write_pidfile();
        Debug((DEBUG_NOTICE, "Server ready..."));
-#ifdef USE_SYSLOG
-       syslog(LOG_NOTICE, "Server Ready");
-#endif
        SetupEvents();
        loop.ircd_booted = 1;
 #if defined(HAVE_SETPROCTITLE)
index 8e0df1970469972cce0a8d35e4775d74cdb4fbeb..a76c18822318e433fdefcd97bb390c7f2ace9cbb 100644 (file)
@@ -50,6 +50,7 @@
 
 Hook           *Hooks[MAXHOOKTYPES];
 Hook           *global_i = NULL;
+Hooktype       Hooktypes[MAXCUSTOMHOOKS];
 Module          *Modules = NULL;
 int     Module_Depend_Resolve(Module *p);
 Module *Module_make(ModuleHeader *header, 
@@ -78,6 +79,7 @@ void *obsd_dlsym(void *handle, char *symbol) {
 void Module_Init(void)
 {
        bzero(Hooks, sizeof(Hooks));
+       bzero(Hooktypes, sizeof(Hooktypes));
 }
 
 Module *Module_Find(char *name)
@@ -296,6 +298,9 @@ int    Module_free(Module *mod)
                else if (objs->type == MOBJ_COMMAND) {
                        CommandDel(objs->object.command);
                }
+               else if (objs->type == MOBJ_HOOKTYPE) {
+                       HooktypeDel(objs->object.hooktype, mod);
+               }
        }
        for (p = Modules; p; p = p->next)
        {
@@ -636,6 +641,88 @@ int  m_module(aClient *cptr, aClient *sptr, int parc, char *parv[])
        return 1;
 }
 
+Hooktype *HooktypeFind(char *string) {
+       Hooktype *hooktype;
+       for (hooktype = Hooktypes; hooktype->string ;hooktype++) {
+               if (!stricmp(hooktype->string, string))
+                       return hooktype;
+       }
+       return NULL;
+}
+
+Hooktype *HooktypeAdd(Module *module, char *string, int *type) {
+       Hooktype *hooktype;
+       int i;
+       ModuleChild *parent;
+       ModuleObject *hooktypeobj;
+       if ((hooktype = HooktypeFind(string))) {
+               ModuleChild *child;
+               for (child = hooktype->parents; child; child = child->next) {
+                       if (child->child == module)
+                               break;
+               }
+               if (!child) {
+                       parent = MyMallocEx(sizeof(ModuleChild));
+                       parent->child = module;
+                       if (module) {
+                               hooktypeobj = MyMallocEx(sizeof(ModuleObject));
+                               hooktypeobj->type = MOBJ_HOOKTYPE;
+                               hooktypeobj->object.hooktype = hooktype;
+                               AddListItem(hooktypeobj, module->objects);
+                       }
+                       AddListItem(parent,hooktype->parents);
+               }
+               *type = hooktype->id;
+               return hooktype;
+       }
+       for (hooktype = Hooktypes, i = 0; hooktype->string; hooktype++, i++) ;
+
+       if (i >= 29)
+               return NULL;
+
+       Hooktypes[i].id = i+31;
+       Hooktypes[i].string = strdup(string);
+       parent = MyMallocEx(sizeof(ModuleChild));
+       parent->child = module;
+       if (module) {
+               hooktypeobj = MyMallocEx(sizeof(ModuleObject));
+               hooktypeobj->type = MOBJ_HOOKTYPE;
+               hooktypeobj->object.hooktype = &Hooktypes[i];
+               AddListItem(hooktypeobj,module->objects);
+       }
+       AddListItem(parent,Hooktypes[i].parents);
+       *type = i+31;
+       return &Hooktypes[i];
+}
+
+void HooktypeDel(Hooktype *hooktype, Module *module) {
+       ModuleChild *child;
+       ModuleObject *objs;
+       for (child = hooktype->parents; child; child = child->next) {
+               if (child->child == module) {
+                       DelListItem(child,hooktype->parents);
+                       MyFree(child);
+                       break;
+               }
+       }
+       if (module) {
+               for (objs = module->objects; objs; objs = objs->next) {
+                       if (objs->type == MOBJ_HOOKTYPE && objs->object.hooktype == hooktype) {
+                               DelListItem(objs,module->objects);
+                               MyFree(objs);
+                               break;
+                       }
+               }
+       }
+       if (!hooktype->parents) {
+               MyFree(hooktype->string);
+               hooktype->string = NULL;
+               hooktype->id = 0;
+               hooktype->parents = NULL;
+       }
+}
+               
+       
 Hook   *HookAddMain(Module *module, int hooktype, int (*func)(), void (*vfunc)())
 {
        Hook *p;
index 26839f5a2d784c3b2d05f0a22e54db70b79d2ee1..c5df4c77cc32deb7ec747b3466ef12d4b5fb29d5 100644 (file)
@@ -53,7 +53,7 @@ all: build
 build: $(MODULES)
 
 custommodule: $(MODULEFILE).c
-       $(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
+       $(CC) $(CFLAGS) $(MODULEFLAGS) $(EXLIBS) -DDYNAMIC_LINKING \
                -o $(MODULEFILE).so $(MODULEFILE).c             
 
 commands.so: l_commands.c $(COMMANDS) $(INCLUDES)
index 2e1c4dde84d7491d3831154079a652ea689013c6..014d6dd07c904c6357be4e41f45849cb3da50154 100644 (file)
@@ -53,14 +53,14 @@ ModuleHeader Mod_Header
        "invisibility",
        "$Id$",
        "+I mode", 
-       "3.2-b5",
+       "3.2-b8-1",
        NULL 
     };
 
 #ifdef DYNAMIC_LINKING
-DLLFUNC int    Mod_Init(int module_load)
+DLLFUNC int    Mod_Init(ModuleInfo *modinfo)
 #else
-int    invisibility_Init(int module_load)
+int    invisibility_Init(ModuleInfo *modinfo)
 #endif
 {
        UMODE_HIDING = umode_get('I');  
index 5dcd2f4ee036babf03faafdaa4c016e2351e1cd8..ca69efe9e6cdbf47f4c842e0c100ad9e787a771e 100644 (file)
@@ -73,25 +73,28 @@ ModuleHeader l_commands_Header
  * want to
 */
 
-extern int m_sethost_Init(int module_load), m_setname_Init(int module_load), m_chghost_Init(int module_load);
-extern int m_chgident_Init(int module_load), m_setident_Init(int module_load), m_sdesc_Init(int module_load);
-extern int m_svsmode_Init(int module_load), m_swhois_Init(int module_load), m_svsmotd_Init(int module_load);
-extern int m_svsnline_Init(int module_load), m_who_Init(int module_load), m_mkpasswd_Init(int module_load);
-extern int m_away_Init(int module_load), m_svsnoop_Init(int module_load), m_svso_Init(int module_load);
-extern int m_svsnick_Init(int module_load), m_adminchat_Init(int module_load), m_nachat_Init(int module_load);
-extern int m_lag_Init(int module_load), m_rping_Init(int module_load), m_sendumode_Init(int module_load);
-extern int m_tsctl_Init(int module_load), m_htm_Init(int module_load), m_chgname_Init(int module_load);
-extern int m_message_Init(int module_load), m_whois_Init(int module_load), m_quit_Init(int module_load);
-extern int m_kill_Init(int module_load), m_pingpong_Init(int module_load), m_oper_Init(int module_load);
-extern int m_akill_Init(int module_load), m_rakill_Init(int module_load), m_zline_Init(int module_load);
-extern int m_unzline_Init(int module_load), m_kline_Init(int module_load), m_unkline_Init(int module_load);
-extern int m_sqline_Init(int module_load), m_unsqline_Init(int module_load), m_tkl_Init(int module_load);
+extern int m_sethost_Init(ModuleInfo *modinfo), m_setname_Init(ModuleInfo *modinfo), m_chghost_Init(ModuleInfo *modinfo);
+extern int m_chgident_Init(ModuleInfo *modinfo), m_setident_Init(ModuleInfo *modinfo), m_sdesc_Init(ModuleInfo *modinfo);
+extern int m_svsmode_Init(ModuleInfo *modinfo), m_swhois_Init(ModuleInfo *modinfo), m_svsmotd_Init(ModuleInfo *modinfo);
+extern int m_svsnline_Init(ModuleInfo *modinfo), m_who_Init(ModuleInfo *modinfo), m_mkpasswd_Init(ModuleInfo *modinfo);
+extern int m_away_Init(ModuleInfo *modinfo), m_svsnoop_Init(ModuleInfo *modinfo), m_svso_Init(ModuleInfo *modinfo);
+extern int m_svsnick_Init(ModuleInfo *modinfo), m_adminchat_Init(ModuleInfo *modinfo), m_nachat_Init(ModuleInfo *modinfo);
+extern int m_lag_Init(ModuleInfo *modinfo), m_rping_Init(ModuleInfo *modinfo), m_sendumode_Init(ModuleInfo *modinfo);
+extern int m_tsctl_Init(ModuleInfo *modinfo), m_htm_Init(ModuleInfo *modinfo), m_chgname_Init(ModuleInfo *modinfo);
+extern int m_message_Init(ModuleInfo *modinfo), m_whois_Init(ModuleInfo *modinfo), m_quit_Init(ModuleInfo *modinfo);
+extern int m_kill_Init(ModuleInfo *modinfo), m_pingpong_Init(ModuleInfo *modinfo), m_oper_Init(ModuleInfo *modinfo);
+extern int m_akill_Init(ModuleInfo *modinfo), m_rakill_Init(ModuleInfo *modinfo), m_zline_Init(ModuleInfo *modinfo);
+extern int m_unzline_Init(ModuleInfo *modinfo), m_kline_Init(ModuleInfo *modinfo), m_unkline_Init(ModuleInfo *modinfo);
+extern int m_sqline_Init(ModuleInfo *modinfo), m_unsqline_Init(ModuleInfo *modinfo), m_tkl_Init(ModuleInfo *modinfo);
 #ifdef GUEST
 extern int m_guest_Init(ModuleInfo *modinfo);
 #endif
 #ifdef SCAN_API
 extern int m_scan_Init(ModuleInfo *modinfo), scan_socks_Init(ModuleInfo *modinfo), scan_http_Init(ModuleInfo *modinfo);
 #endif
+#ifdef _WIN32
+extern int invisibility_Init(ModuleInfo *modinfo);
+#endif
 
 extern int m_sethost_Load(int module_load), m_setname_Load(int module_load), m_chghost_Load(int module_load);
 extern int m_chgident_Load(int module_load), m_setident_Load(int module_load), m_sdesc_Load(int module_load);
@@ -112,6 +115,9 @@ extern int m_guest_Load(int module_load);
 #ifdef SCAN_API
 extern int m_scan_Load(int module_load), scan_socks_Load(int module_load), scan_http_Load(int module_load);
 #endif
+#ifdef _WIN32
+extern int invisibility_Load(int module_load);
+#endif
 
 extern int m_sethost_Unload(), m_setname_Unload(), m_chghost_Unload(), m_chgident_Unload();
 extern int m_setident_Unload(), m_sdesc_Unload(), m_svsmode_Unload(), m_swhois_Unload();
@@ -129,6 +135,9 @@ extern int m_guest_Unload();
 #ifdef SCAN_API
 extern int m_scan_Unload(), scan_socks_Unload(), scan_http_Unload();
 #endif
+#ifdef _WIN32
+extern int invisibility_Unload();
+#endif
 
 #ifdef DYNAMIC_LINKING
 DLLFUNC int    Mod_Init(ModuleInfo *modinfo)
@@ -145,47 +154,47 @@ int    l_commands_Init(ModuleInfo *modinfo)
        */
        bcopy(modinfo,&ModCmdsInfo,modinfo->size);
        module_load = ModCmdsInfo.module_load;
-       m_sethost_Init(module_load);
-       m_setname_Init(module_load);
-       m_chghost_Init(module_load);
-       m_chgident_Init(module_load);
-       m_setident_Init(module_load);
-       m_sdesc_Init(module_load);
-       m_svsmode_Init(module_load);
-       m_swhois_Init(module_load);
-       m_svsmotd_Init(module_load);
-       m_svsnline_Init(module_load);
-       m_who_Init(module_load);
-       m_mkpasswd_Init(module_load);
-       m_away_Init(module_load);
-       m_svsnoop_Init(module_load);
-       m_svso_Init(module_load);
-       m_svsnick_Init(module_load);
-       m_adminchat_Init(module_load);
-       m_nachat_Init(module_load);
-       m_lag_Init(module_load);
-       m_rping_Init(module_load);
-       m_sendumode_Init(module_load);
-       m_tsctl_Init(module_load);
-       m_htm_Init(module_load);
-       m_chgname_Init(module_load);
-       m_message_Init(module_load);
-       m_whois_Init(module_load);
-       m_quit_Init(module_load);
-       m_kill_Init(module_load);
-       m_pingpong_Init(module_load);
-       m_oper_Init(module_load);
-       m_akill_Init(module_load);
-       m_rakill_Init(module_load);
-       m_zline_Init(module_load);
-       m_unzline_Init(module_load);
-       m_kline_Init(module_load);
-       m_unkline_Init(module_load);
-       m_sqline_Init(module_load);
-       m_unsqline_Init(module_load);
-       m_tkl_Init(module_load);
+       m_sethost_Init(&ModCmdsInfo);
+       m_setname_Init(&ModCmdsInfo);
+       m_chghost_Init(&ModCmdsInfo);
+       m_chgident_Init(&ModCmdsInfo);
+       m_setident_Init(&ModCmdsInfo);
+       m_sdesc_Init(&ModCmdsInfo);
+       m_svsmode_Init(&ModCmdsInfo);
+       m_swhois_Init(&ModCmdsInfo);
+       m_svsmotd_Init(&ModCmdsInfo);
+       m_svsnline_Init(&ModCmdsInfo);
+       m_who_Init(&ModCmdsInfo);
+       m_mkpasswd_Init(&ModCmdsInfo);
+       m_away_Init(&ModCmdsInfo);
+       m_svsnoop_Init(&ModCmdsInfo);
+       m_svso_Init(&ModCmdsInfo);
+       m_svsnick_Init(&ModCmdsInfo);
+       m_adminchat_Init(&ModCmdsInfo);
+       m_nachat_Init(&ModCmdsInfo);
+       m_lag_Init(&ModCmdsInfo);
+       m_rping_Init(&ModCmdsInfo);
+       m_sendumode_Init(&ModCmdsInfo);
+       m_tsctl_Init(&ModCmdsInfo);
+       m_htm_Init(&ModCmdsInfo);
+       m_chgname_Init(&ModCmdsInfo);
+       m_message_Init(&ModCmdsInfo);
+       m_whois_Init(&ModCmdsInfo);
+       m_quit_Init(&ModCmdsInfo);
+       m_kill_Init(&ModCmdsInfo);
+       m_pingpong_Init(&ModCmdsInfo);
+       m_oper_Init(&ModCmdsInfo);
+       m_akill_Init(&ModCmdsInfo);
+       m_rakill_Init(&ModCmdsInfo);
+       m_zline_Init(&ModCmdsInfo);
+       m_unzline_Init(&ModCmdsInfo);
+       m_kline_Init(&ModCmdsInfo);
+       m_unkline_Init(&ModCmdsInfo);
+       m_sqline_Init(&ModCmdsInfo);
+       m_unsqline_Init(&ModCmdsInfo);
+       m_tkl_Init(&ModCmdsInfo);
 #ifdef GUEST
-       m_guest_Init(module_load);
+       m_guest_Init(&ModCmdsInfo);
 #endif
 #ifdef SCAN_API
         p.header = &scan_socks_Header;
@@ -195,6 +204,9 @@ int    l_commands_Init(ModuleInfo *modinfo)
        m_scan_Init(&ModCmdsInfo);
        scan_socks_Init(&ModCmdsInfo);
        scan_http_Init(&ModCmdsInfo);
+#endif
+#ifdef _WIN32
+       invisibility_Init(&ModCmdsInfo);
 #endif
        return MOD_SUCCESS;
 }
@@ -250,6 +262,9 @@ int    l_commands_Load(int module_load)
        m_scan_Load(module_load);
        scan_socks_Load(module_load);
        scan_http_Load(module_load);
+#endif
+#ifdef _WIN32
+       invisibility_Load(module_load);
 #endif
        return MOD_SUCCESS;
 }
@@ -305,6 +320,9 @@ int l_commands_Unload(int module_unload)
        scan_socks_Unload();
        scan_http_Unload();
        m_scan_Unload();
+#endif
+#ifdef _WIN32
+       invisibility_Unload();
 #endif
        return MOD_SUCCESS;
 }
index 9a299c979a742bd827a6e89d54193d748c265da3..9f74a8f4b4e68877f04974ac262b5aab5404b585 100644 (file)
@@ -59,7 +59,7 @@ ModuleHeader Mod_Header
        "adminchat",    /* Name of module */
        "$Id$", /* Version */
        "command /adchat", /* Short description of module */
-       "3.2-b5",
+       "3.2-b8-1",
        NULL 
     };
 
@@ -70,9 +70,9 @@ ModuleHeader Mod_Header
 
 /* This is called on module init, before Server Ready */
 #ifdef DYNAMIC_LINKING
-DLLFUNC int    Mod_Init(int module_load)
+DLLFUNC int    Mod_Init(ModuleInfo *modinfo)
 #else
-int    m_adminchat_Init(int module_load)
+int    m_adminchat_Init(ModuleInfo *modinfo)
 #endif
 {
        /*
index 03328c5dc60384cddb86e6298f8c243de79617af..b2c7f8acc1794df514e9e12be9774f6964bc15b6 100644 (file)
@@ -60,7 +60,7 @@ ModuleHeader Mod_Header
        "akill",        /* Name of module */
        "$Id$", /* Version */
        "command /akill", /* Short description of module */
-       "3.2-b5",
+       "3.2-b8-1",
        NULL 
     };
 
@@ -71,9 +71,9 @@ ModuleHeader Mod_Header
 
 /* This is called on module init, before Server Ready */
 #ifdef DYNAMIC_LINKING
-DLLFUNC int    Mod_Init(int module_load)
+DLLFUNC int    Mod_Init(ModuleInfo *modinfo)
 #else
-int    m_akill_Init(int module_load)
+int    m_akill_Init(ModuleInfo *modinfo)
 #endif
 {
        /*
index 52657f9932c24f458821a3c02a4be4c95df8305c..cc0addc95ceb8211ba653501e432de207c26a110 100644 (file)
@@ -62,14 +62,14 @@ ModuleHeader Mod_Header
        "m_away",
        "$Id$",
        "command /away", 
-       "3.2-b5",
+       "3.2-b8-1",
        NULL 
     };
 
 #ifdef DYNAMIC_LINKING
-DLLFUNC int    Mod_Init(int module_load)
+DLLFUNC int    Mod_Init(ModuleInfo *modinfo)
 #else
-int    m_away_Init(int module_load)
+int    m_away_Init(ModuleInfo *modinfo)
 #endif
 {
        add_Command(MSG_AWAY, TOK_AWAY, m_away, 1);
index 538ef458b6a465ca752f0fc9d1583491925a4b11..0a5b457e2f4a031a58ba60a7123a24c05f8f4b1e 100644 (file)
@@ -58,7 +58,7 @@ ModuleHeader Mod_Header
        "chghost",      /* Name of module */
        "$Id$", /* Version */
        "/chghost", /* Short description of module */
-       "3.2-b5",
+       "3.2-b8-1",
     };
 
 /*
@@ -67,9 +67,9 @@ ModuleHeader Mod_Header
 */
 
 #ifdef DYNAMIC_LINKING
-DLLFUNC int    Mod_Init(int module_load)
+DLLFUNC int    Mod_Init(ModuleInfo *modinfo)
 #else
-int    m_chghost_Init(int module_load)
+int    m_chghost_Init(ModuleInfo *modinfo)
 #endif
 {
        /*
index 903734f68f7b0c052609f6fb58f63ce198365e65..e86767d63330e1bc4c89c69420b1e7f36673b8a0 100644 (file)
@@ -59,7 +59,7 @@ ModuleHeader Mod_Header
        "chgident",     /* Name of module */
        "$Id$", /* Version */
        "/chgident", /* Short description of module */
-       "3.2-b5",
+       "3.2-b8-1",
        NULL 
     };
 
@@ -69,9 +69,9 @@ ModuleHeader Mod_Header
 */
 
 #ifdef DYNAMIC_LINKING
-DLLFUNC int    Mod_Init(int module_load)
+DLLFUNC int    Mod_Init(ModuleInfo *modinfo)
 #else
-int   m_chgident_Init(int module_load)
+int   m_chgident_Init(ModuleInfo *modinfo)
 #endif
 {
        /* extern variable to export m_chgident_info to temporary
index c2752d391f95ed15575e923ed01bec12faf81529..db8d9f79af1aafa77df83198e6d24b53b56a5d4f 100644 (file)
@@ -59,7 +59,7 @@ ModuleHeader Mod_Header
        "chgname",      /* Name of module */
        "$Id$", /* Version */
        "command /chgname", /* Short description of module */
-       "3.2-b5",
+       "3.2-b8-1",
        NULL 
     };
 
@@ -70,9 +70,9 @@ ModuleHeader Mod_Header
 
 /* This is called on module init, before Server Ready */
 #ifdef DYNAMIC_LINKING
-DLLFUNC int    Mod_Init(int module_load)
+DLLFUNC int    Mod_Init(ModuleInfo *modinfo)
 #else
-int    m_chgname_Init(int module_load)
+int    m_chgname_Init(ModuleInfo *modinfo)
 #endif
 {
        /*
index e6719f4a56e1b6a13871d6b34c5b82ff0ebc649d..6b975423c0165960621331ba378e3eeb5b8e1abb 100644 (file)
@@ -43,7 +43,7 @@ ModuleHeader Mod_Header
        "dummy",        /* Name of module */
        "$Id$", /* Version */
        "command /dummy", /* Short description of module */
-       "3.2-b5",
+       "3.2-b8-1",
        NULL 
     };
 
@@ -54,9 +54,9 @@ ModuleHeader Mod_Header
 
 /* This is called on module init, before Server Ready */
 #ifdef DYNAMIC_LINKING
-DLLFUNC int    Mod_Init(int module_load)
+DLLFUNC int    Mod_Init(ModuleInfo *modinfo)
 #else
-int    m_dummy_Init(int module_load)
+int    m_dummy_Init(ModuleInfo *modinfo)
 #endif
 {
        /*
index 5a50ebb7f6309e35db7528e5479b857609e2ffc0..4e0c910d3c0e7fb0950f242c98b2e899b40924d9 100644 (file)
@@ -81,7 +81,7 @@ ModuleHeader Mod_Header
        "htm",  /* Name of module */
        "$Id$", /* Version */
        "command /htm", /* Short description of module */
-       "3.2-b5",
+       "3.2-b8-1",
        NULL 
     };
 
@@ -92,9 +92,9 @@ ModuleHeader Mod_Header
 
 /* This is called on module init, before Server Ready */
 #ifdef DYNAMIC_LINKING
-DLLFUNC int    Mod_Init(int module_load)
+DLLFUNC int    Mod_Init(ModuleInfo *modinfo)
 #else
-int    m_htm_Init(int module_load)
+int    m_htm_Init(ModuleInfo *modinfo)
 #endif
 {
        /*
index 6a25dc7fbcb42c21d4880da5863917f09a189fb0..59a42d57c3c5c5804b25882c43842760f7aa2c7d 100644 (file)
@@ -61,7 +61,7 @@ ModuleHeader Mod_Header
        "kill", /* Name of module */
        "$Id$", /* Version */
        "command /kill", /* Short description of module */
-       "3.2-b5",
+       "3.2-b8-1",
        NULL 
     };
 
@@ -72,9 +72,9 @@ ModuleHeader Mod_Header
 
 /* This is called on module init, before Server Ready */
 #ifdef DYNAMIC_LINKING
-DLLFUNC int    Mod_Init(int module_load)
+DLLFUNC int    Mod_Init(ModuleInfo *modinfo)
 #else
-int    m_kill_Init(int module_load)
+int    m_kill_Init(ModuleInfo *modinfo)
 #endif
 {
        /*
index 2ce989bc1531138ec6e097dc6884f832442d92b5..27978a11470b23f2952ad7aac330e5bf83d89600 100644 (file)
@@ -61,7 +61,7 @@ ModuleHeader Mod_Header
        "kline",        /* Name of module */
        "$Id$", /* Version */
        "command /kline", /* Short description of module */
-       "3.2-b5",
+       "3.2-b8-1",
        NULL 
     };
 
@@ -72,9 +72,9 @@ ModuleHeader Mod_Header
 
 /* This is called on module init, before Server Ready */
 #ifdef DYNAMIC_LINKING
-DLLFUNC int    Mod_Init(int module_load)
+DLLFUNC int    Mod_Init(ModuleInfo *modinfo)
 #else
-int    m_kline_Init(int module_load)
+int    m_kline_Init(ModuleInfo *modinfo)
 #endif
 {
        /*
index 0133987f4aec2bbbb3bd84d14a7782bca078b145..e0ccf5559f7e257626f1728d5d85c5a8a9178a4c 100644 (file)
@@ -59,7 +59,7 @@ ModuleHeader Mod_Header
        "lag",  /* Name of module */
        "$Id$", /* Version */
        "command /lag", /* Short description of module */
-       "3.2-b5",
+       "3.2-b8-1",
        NULL 
     };
 
@@ -70,9 +70,9 @@ ModuleHeader Mod_Header
 
 /* This is called on module init, before Server Ready */
 #ifdef DYNAMIC_LINKING
-DLLFUNC int    Mod_Init(int module_load)
+DLLFUNC int    Mod_Init(ModuleInfo *modinfo)
 #else
-int    m_lag_Init(int module_load)
+int    m_lag_Init(ModuleInfo *modinfo)
 #endif
 {
        /*
index 5494fa1c14a621ecce964bb25b48bbd1fa5ec8c0..7a66b3a3bd8e6d80ff1097c6c79658a32aad3406 100644 (file)
@@ -66,7 +66,7 @@ ModuleHeader Mod_Header
        "message",      /* Name of module */
        "$Id$", /* Version */
        "private message and notice", /* Short description of module */
-       "3.2-b5",
+       "3.2-b8-1",
        NULL 
     };
 
@@ -77,9 +77,9 @@ ModuleHeader Mod_Header
 
 /* This is called on module init, before Server Ready */
 #ifdef DYNAMIC_LINKING
-DLLFUNC int    Mod_Init(int module_load)
+DLLFUNC int    Mod_Init(ModuleInfo *modinfo)
 #else
-int    m_message_Init(int module_load)
+int    m_message_Init(ModuleInfo *modinfo)
 #endif
 {
        /*
index af9b0bd93e19d97db3a4274fb86da2c42bfc78a5..b7e153c38fa6744bf2fe7506a60047221013ff76 100644 (file)
@@ -62,14 +62,14 @@ ModuleHeader Mod_Header
        "m_mkpasswd",
        "$Id$",
        "command /mkpasswd", 
-       "3.2-b5",
+       "3.2-b8-1",
        NULL 
     };
 
 #ifdef DYNAMIC_LINKING
-DLLFUNC int    Mod_Init(int module_load)
+DLLFUNC int    Mod_Init(ModuleInfo *modinfo)
 #else
-int    m_mkpasswd_Init(int module_load)
+int    m_mkpasswd_Init(ModuleInfo *modinfo)
 #endif
 {
        add_Command(MSG_MKPASSWD, TOK_MKPASSWD, m_mkpasswd, MAXPARA);
index 7668f6ef51fb1b9143684e61c6eac08d00b0e8ac..33f2821c4b0af8795c9e114f37623844bbc4d4f7 100644 (file)
@@ -59,7 +59,7 @@ ModuleHeader Mod_Header
        "Nachat",       /* Name of module */
        "$Id$", /* Version */
        "command /nachat", /* Short description of module */
-       "3.2-b5",
+       "3.2-b8-1",
        NULL 
     };
 
@@ -70,9 +70,9 @@ ModuleHeader Mod_Header
 
 /* This is called on module init, before Server Ready */
 #ifdef DYNAMIC_LINKING
-DLLFUNC int    Mod_Init(int module_load)
+DLLFUNC int    Mod_Init(ModuleInfo *modinfo)
 #else
-int    m_nachat_Init(int module_load)
+int    m_nachat_Init(ModuleInfo *modinfo)
 #endif
 {
        /*
index 175c9f06e56f3d843989934a24cb1667bbebda99..9506957a80431572d0f381f2ac1ce1fd257e6c2a 100644 (file)
@@ -95,7 +95,7 @@ ModuleHeader Mod_Header
        "oper", /* Name of module */
        "$Id$", /* Version */
        "command /oper", /* Short description of module */
-       "3.2-b5",
+       "3.2-b8-1",
        NULL 
     };
 
@@ -106,9 +106,9 @@ ModuleHeader Mod_Header
 
 /* This is called on module init, before Server Ready */
 #ifdef DYNAMIC_LINKING
-DLLFUNC int    Mod_Init(int module_load)
+DLLFUNC int    Mod_Init(ModuleInfo *modinfo)
 #else
-int    m_oper_Init(int module_load)
+int    m_oper_Init(ModuleInfo *modinfo)
 #endif
 {
        /*
index 4aef712065c778511d2621806370a7b66a3a1495..f78ca1f59516e6e48173feebfecdfab86aa8ee56 100644 (file)
@@ -67,7 +67,7 @@ ModuleHeader Mod_Header
        "pingpong",     /* Name of module */
        "$Id$", /* Version */
        "ping, pong and nospoof", /* Short description of module */
-       "3.2-b5",
+       "3.2-b8-1",
        NULL 
     };
 
@@ -78,9 +78,9 @@ ModuleHeader Mod_Header
 
 /* This is called on module init, before Server Ready */
 #ifdef DYNAMIC_LINKING
-DLLFUNC int    Mod_Init(int module_load)
+DLLFUNC int    Mod_Init(ModuleInfo *modinfo)
 #else
-int    m_pingpong_Init(int module_load)
+int    m_pingpong_Init(ModuleInfo *modinfo)
 #endif
 {
        /*
index 2693411b1ecdbdd8fd2df53bdd96bd109fca7135..4668337bfc93a65dfa635ca4b788a46afbbc3973 100644 (file)
@@ -60,7 +60,7 @@ ModuleHeader Mod_Header
        "quit", /* Name of module */
        "$Id$", /* Version */
        "command /quit", /* Short description of module */
-       "3.2-b5",
+       "3.2-b8-1",
        NULL 
     };
 
@@ -71,9 +71,9 @@ ModuleHeader Mod_Header
 
 /* This is called on module init, before Server Ready */
 #ifdef DYNAMIC_LINKING
-DLLFUNC int    Mod_Init(int module_load)
+DLLFUNC int    Mod_Init(ModuleInfo *modinfo)
 #else
-int    m_quit_Init(int module_load)
+int    m_quit_Init(ModuleInfo *modinfo)
 #endif
 {
        /*
index 3a60bfb7ab6c31b13a79750706829ae5ac33b0bf..af8838b68404ad2f647c42f7c7e40d87702fd310 100644 (file)
@@ -60,7 +60,7 @@ ModuleHeader Mod_Header
        "rakill",       /* Name of module */
        "$Id$", /* Version */
        "command /rakill", /* Short description of module */
-       "3.2-b5",
+       "3.2-b8-1",
        NULL 
     };
 
@@ -71,9 +71,9 @@ ModuleHeader Mod_Header
 
 /* This is called on module init, before Server Ready */
 #ifdef DYNAMIC_LINKING
-DLLFUNC int    Mod_Init(int module_load)
+DLLFUNC int    Mod_Init(ModuleInfo *modinfo)
 #else
-int    m_rakill_Init(int module_load)
+int    m_rakill_Init(ModuleInfo *modinfo)
 #endif
 {
        /*
index 49cc657cc1f075ac821ba3682bd4221f03d4e478..33c5e9fcbbdca4a5464a917bae623862d5acfda2 100644 (file)
@@ -64,7 +64,7 @@ ModuleHeader Mod_Header
        "rping",        /* Name of module */
        "$Id$", /* Version */
        "command /rping, /rpong", /* Short description of module */
-       "3.2-b5",
+       "3.2-b8-1",
        NULL 
     };
 
@@ -75,9 +75,9 @@ ModuleHeader Mod_Header
 
 /* This is called on module init, before Server Ready */
 #ifdef DYNAMIC_LINKING
-DLLFUNC int    Mod_Init(int module_load)
+DLLFUNC int    Mod_Init(ModuleInfo *modinfo)
 #else
-int    m_rping_Init(int module_load)
+int    m_rping_Init(ModuleInfo *modinfo)
 #endif
 {
        /*
index f9835e407cfad13ced69aaa8e8a35a3a0dd237aa..3b5bd07b4ce594c16bb9eaeb70a7701a76d79010 100644 (file)
@@ -60,7 +60,7 @@ ModuleHeader Mod_Header
        "sdesc",        /* Name of module */
        "$Id$", /* Version */
        "command /sdesc", /* Short description of module */
-       "3.2-b5",
+       "3.2-b8-1",
        NULL 
     };
 
@@ -70,9 +70,9 @@ ModuleHeader Mod_Header
 */
 
 #ifdef DYNAMIC_LINKING
-DLLFUNC int    Mod_Init(int module_load)
+DLLFUNC int    Mod_Init(ModuleInfo *modinfo)
 #else
-int    m_sdesc_Init(int module_load)
+int    m_sdesc_Init(ModuleInfo *modinfo)
 #endif
 {
        /*
index 1886e21c8e2af97267dba5b60ad5165617664959..471715ebef3826b3702750bce491a6fba2039f51 100644 (file)
@@ -63,7 +63,7 @@ ModuleHeader Mod_Header
        "sendumode",    /* Name of module */
        "$Id$", /* Version */
        "command /sendumode", /* Short description of module */
-       "3.2-b5",
+       "3.2-b8-1",
        NULL 
     };
 
@@ -74,9 +74,9 @@ ModuleHeader Mod_Header
 
 /* This is called on module init, before Server Ready */
 #ifdef DYNAMIC_LINKING
-DLLFUNC int    Mod_Init(int module_load)
+DLLFUNC int    Mod_Init(ModuleInfo *modinfo)
 #else
-int    m_sendumode_Init(int module_load)
+int    m_sendumode_Init(ModuleInfo *modinfo)
 #endif
 {
        /*
index 878d9f214d90932476da81ac2eed0a67e5df4421..26f4c91b048a6f36b4a08d07130a740265f36c4f 100644 (file)
@@ -59,7 +59,7 @@ ModuleHeader Mod_Header
        "sethost",      /* Name of module */
        "$Id$", /* Version */
        "command /sethost", /* Short description of module */
-       "3.2-b5",
+       "3.2-b8-1",
        NULL 
     };
 
@@ -69,9 +69,9 @@ ModuleHeader Mod_Header
 */
 
 #ifdef DYNAMIC_LINKING
-DLLFUNC int    Mod_Init(int module_load)
+DLLFUNC int    Mod_Init(ModuleInfo *modinfo)
 #else
-int    m_sethost_Init(int module_load)
+int    m_sethost_Init(ModuleInfo *modinfo)
 #endif
 {
        /*
index 4a3c5bfc6891d64561cdfd2cb190b798afbac94e..39e542be82abdd8e26b7ff7c1b97de574c798553 100644 (file)
@@ -58,7 +58,7 @@ ModuleHeader Mod_Header
        "setident",     /* Name of module */
        "$Id$", /* Version */
        "/setident", /* Short description of module */
-       "3.2-b5",
+       "3.2-b8-1",
        NULL 
     };
 
@@ -68,9 +68,9 @@ ModuleHeader Mod_Header
 */
 
 #ifdef DYNAMIC_LINKING
-DLLFUNC int    Mod_Init(int module_load)
+DLLFUNC int    Mod_Init(ModuleInfo *modinfo)
 #else
-int    m_setident_Init(int module_load)
+int    m_setident_Init(ModuleInfo *modinfo)
 #endif
 {
        /*
@@ -171,7 +171,7 @@ DLLFUNC int m_setident(aClient *cptr, aClient *sptr, int parc, char *parv[])
                if (MyConnect(sptr))
                {
                        sendto_one(sptr,
-                           ":%s NOTICE %s :*** Syntax: /SetIdent <new host>",
+                           ":%s NOTICE %s :*** Syntax: /SetIdent <new ident>",
                            me.name, parv[0]);
                }
                return 1;
index 04b4ab1550b2466f2cec441272649014d95e3543..c0c6f491cd3ca04ed72631e5888a932d13142361 100644 (file)
@@ -60,7 +60,7 @@ ModuleHeader Mod_Header
        "setname",      /* Name of module */
        "$Id$", /* Version */
        "command /setname", /* Short description of module */
-       "3.2-b5",
+       "3.2-b8-1",
        NULL 
     };
 
@@ -70,9 +70,9 @@ ModuleHeader Mod_Header
 */
 
 #ifdef DYNAMIC_LINKING
-DLLFUNC int    Mod_Init(int module_load)
+DLLFUNC int    Mod_Init(ModuleInfo *modinfo)
 #else
-int    m_setname_Init(int module_load)
+int    m_setname_Init(ModuleInfo *modinfo)
 #endif
 {
        /*
index 24a825f2b2b04851630ada76c42c421bd00589e0..7d220efe89babf4bb9c7e318bc16a1c2820a9677 100644 (file)
@@ -60,7 +60,7 @@ ModuleHeader Mod_Header
        "sqline",       /* Name of module */
        "$Id$", /* Version */
        "command /sqline", /* Short description of module */
-       "3.2-b5",
+       "3.2-b8-1",
        NULL 
     };
 
@@ -71,9 +71,9 @@ ModuleHeader Mod_Header
 
 /* This is called on module init, before Server Ready */
 #ifdef DYNAMIC_LINKING
-DLLFUNC int    Mod_Init(int module_load)
+DLLFUNC int    Mod_Init(ModuleInfo *modinfo)
 #else
-int    m_sqline_Init(int module_load)
+int    m_sqline_Init(ModuleInfo *modinfo)
 #endif
 {
        /*
index a2521600dab509da8042b3cc953a968caa0d3346..92960f5a4229f0ce61b8d115a5b7840c6efeb96a 100644 (file)
@@ -65,14 +65,14 @@ ModuleHeader Mod_Header
        "m_svsmode",
        "$Id$",
        "command /svsmode and svs2mode", 
-       "3.2-b5",
+       "3.2-b8-1",
        NULL 
     };
 
 #ifdef DYNAMIC_LINKING
-DLLFUNC int    Mod_Init(int module_load)
+DLLFUNC int    Mod_Init(ModuleInfo *modinfo)
 #else
-int    m_svsmode_Init(int module_load)
+int    m_svsmode_Init(ModuleInfo *modinfo)
 #endif
 {
        add_Command(MSG_SVSMODE, TOK_SVSMODE, m_svsmode, MAXPARA);
index 33055f69427662ac6a43d086fd224668c531716d..b564d012176ec99447e8a786567331aa4af22d33 100644 (file)
@@ -62,14 +62,14 @@ ModuleHeader Mod_Header
        "m_svsmotd",
        "$Id$",
        "command /svsmotd", 
-       "3.2-b5",
+       "3.2-b8-1",
        NULL 
     };
 
 #ifdef DYNAMIC_LINKING
-DLLFUNC int    Mod_Init(int module_load)
+DLLFUNC int    Mod_Init(ModuleInfo *modinfo)
 #else
-int    m_svsmotd_Init(int module_load)
+int    m_svsmotd_Init(ModuleInfo *modinfo)
 #endif
 {
        add_Command(MSG_SVSMOTD, TOK_SVSMOTD, m_svsmotd, MAXPARA);
index 83dfe7675963fe2bfd88593436a516b937707379..1b5ac8495cb0e651188a27c73ba466715b5eb0ee 100644 (file)
@@ -62,14 +62,14 @@ ModuleHeader Mod_Header
        "m_svsnick",
        "$Id$",
        "command /svsnick", 
-       "3.2-b5",
+       "3.2-b8-1",
        NULL 
     };
 
 #ifdef DYNAMIC_LINKING
-DLLFUNC int    Mod_Init(int module_load)
+DLLFUNC int    Mod_Init(ModuleInfo *modinfo)
 #else
-int    m_svsnick_Init(int module_load)
+int    m_svsnick_Init(ModuleInfo *modinfo)
 #endif
 {
        add_Command(MSG_SVSNICK, TOK_SVSNICK, m_svsnick, MAXPARA);
index 69544606b1117131c4c4a37dda28fa58d70bd3de..afd5152a9474954b3d71d9bda7d7a374fca92a02 100644 (file)
@@ -62,7 +62,7 @@ ModuleHeader Mod_Header
        "svsnline",     /* Name of module */
        "$Id$", /* Version */
        "command /svsnline", /* Short description of module */
-       "3.2-b5",
+       "3.2-b8-1",
        NULL 
     };
 
@@ -73,9 +73,9 @@ ModuleHeader Mod_Header
 
 /* This is called on module init, before Server Ready */
 #ifdef DYNAMIC_LINKING
-DLLFUNC int    Mod_Init(int module_load)
+DLLFUNC int    Mod_Init(ModuleInfo *modinfo)
 #else
-int    m_svsnline_Init(int module_load)
+int    m_svsnline_Init(ModuleInfo *modinfo)
 #endif
 {
        /*
index f8c5054bbfb02de910bd0dbc8578be64af345bbd..51ebf81c36797e04bd34cd4b6eb7bc05106dd975 100644 (file)
@@ -66,14 +66,14 @@ ModuleHeader Mod_Header
        "m_svsnoop",
        "$Id$",
        "command /svsnoop", 
-       "3.2-b5",
+       "3.2-b8-1",
        NULL
     };
 
 #ifdef DYNAMIC_LINKING
-DLLFUNC int    Mod_Init(int module_load)
+DLLFUNC int    Mod_Init(ModuleInfo *modinfo)
 #else
-int    m_svsnoop_Init(int module_load)
+int    m_svsnoop_Init(ModuleInfo *modinfo)
 #endif
 {
        add_Command(MSG_SVSNOOP, TOK_SVSNOOP, m_svsnoop, MAXPARA);
index 99cb8fd47380d0d158147a18e7cb80b5f1ea2124..8f0e4de7200e356a0c6c15f3a04f9421b6653c6c 100644 (file)
@@ -96,14 +96,14 @@ ModuleHeader Mod_Header
        "m_svso",
        "$Id$",
        "command /svso", 
-       "3.2-b5",
+       "3.2-b8-1",
        NULL 
     };
 
 #ifdef DYNAMIC_LINKING
-DLLFUNC int    Mod_Init(int module_load)
+DLLFUNC int    Mod_Init(ModuleInfo *modinfo)
 #else
-int    m_svso_Init(int module_load)
+int    m_svso_Init(ModuleInfo *modinfo)
 #endif
 {
        add_Command(MSG_SVSO, TOK_SVSO, m_svso, MAXPARA);
index b1a8c3a5b43466b18fb1cda681a982d0ba773c81..5343800db4681cb83eb635c512a81310c329ccc1 100644 (file)
@@ -61,14 +61,14 @@ ModuleHeader Mod_Header
        "m_swhois",
        "$Id$",
        "command /swhois", 
-       "3.2-b5",
+       "3.2-b8-1",
        NULL 
     };
 
 #ifdef DYNAMIC_LINKING
-DLLFUNC int    Mod_Init(int module_load)
+DLLFUNC int    Mod_Init(ModuleInfo *modinfo)
 #else
-int    m_swhois_Init(int module_load)
+int    m_swhois_Init(ModuleInfo *modinfo)
 #endif
 {
        add_Command(MSG_SWHOIS, TOK_SWHOIS, m_swhois, MAXPARA);
index 14c94bd2d698568e33034c2700a974d8186d6abf..5b3423fe9537daf973ca69f99da1240f247c86a2 100644 (file)
@@ -55,7 +55,7 @@ ModuleHeader Mod_Header
        "tkl",  /* Name of module */
        "$Id$", /* Version */
        "commands /gline etc", /* Short description of module */
-       "3.2-b5",
+       "3.2-b8-1",
        NULL 
     };
 
@@ -66,9 +66,9 @@ ModuleHeader Mod_Header
 
 /* This is called on module init, before Server Ready */
 #ifdef DYNAMIC_LINKING
-DLLFUNC int    Mod_Init(int module_load)
+DLLFUNC int    Mod_Init(ModuleInfo *modinfo)
 #else
-int    m_tkl_Init(int module_load)
+int    m_tkl_Init(ModuleInfo *modinfo)
 #endif
 {
        /*
index 39c056bc401ef3db4c27728e9e5f4cf85bc50da3..3e388727cb006acf41d573de18d9b41fd78b2526 100644 (file)
@@ -60,7 +60,7 @@ ModuleHeader Mod_Header
        "tsctl",        /* Name of module */
        "$Id$", /* Version */
        "command /tsctl", /* Short description of module */
-       "3.2-b5",
+       "3.2-b8-1",
        NULL 
     };
 
@@ -71,9 +71,9 @@ ModuleHeader Mod_Header
 
 /* This is called on module init, before Server Ready */
 #ifdef DYNAMIC_LINKING
-DLLFUNC int    Mod_Init(int module_load)
+DLLFUNC int    Mod_Init(ModuleInfo *modinfo)
 #else
-int    m_tsctl_Init(int module_load)
+int    m_tsctl_Init(ModuleInfo *modinfo)
 #endif
 {
        /*
index 57ec4a5018ac12dfd2dcc09dbcdfbbaa70d91125..101f7c989184e5ddb7ba7eea4c72cb586c39c2fc 100644 (file)
@@ -60,7 +60,7 @@ ModuleHeader Mod_Header
        "unkline",      /* Name of module */
        "$Id$", /* Version */
        "command /unkline", /* Short description of module */
-       "3.2-b5",
+       "3.2-b8-1",
        NULL 
     };
 
@@ -71,9 +71,9 @@ ModuleHeader Mod_Header
 
 /* This is called on module init, before Server Ready */
 #ifdef DYNAMIC_LINKING
-DLLFUNC int    Mod_Init(int module_load)
+DLLFUNC int    Mod_Init(ModuleInfo *modinfo)
 #else
-int    m_unkline_Init(int module_load)
+int    m_unkline_Init(ModuleInfo *modinfo)
 #endif
 {
        /*
index c74de3548672cf9dd82b6af27bcad475dde97211..290fe03f55d71714ade82da6965c97a6a16dca35 100644 (file)
@@ -60,7 +60,7 @@ ModuleHeader Mod_Header
        "unsqline",     /* Name of module */
        "$Id$", /* Version */
        "command /unsqline", /* Short description of module */
-       "3.2-b5",
+       "3.2-b8-1",
        NULL 
     };
 
@@ -71,9 +71,9 @@ ModuleHeader Mod_Header
 
 /* This is called on module init, before Server Ready */
 #ifdef DYNAMIC_LINKING
-DLLFUNC int    Mod_Init(int module_load)
+DLLFUNC int    Mod_Init(ModuleInfo *modinfo)
 #else
-int    m_unsqline_Init(int module_load)
+int    m_unsqline_Init(ModuleInfo *modinfo)
 #endif
 {
        /*
index 11c4d2a1ebfc49f433d65de4d543bc154731801c..dbb8b47cef3931ffafb66667b1d8e2f012f74323 100644 (file)
@@ -60,7 +60,7 @@ ModuleHeader Mod_Header
        "unzline",      /* Name of module */
        "$Id$", /* Version */
        "command /unzline", /* Short description of module */
-       "3.2-b5",
+       "3.2-b8-1",
        NULL 
     };
 
@@ -71,9 +71,9 @@ ModuleHeader Mod_Header
 
 /* This is called on module init, before Server Ready */
 #ifdef DYNAMIC_LINKING
-DLLFUNC int    Mod_Init(int module_load)
+DLLFUNC int    Mod_Init(ModuleInfo *modinfo)
 #else
-int    m_unzline_Init(int module_load)
+int    m_unzline_Init(ModuleInfo *modinfo)
 #endif
 {
        /*
index 00bd5a7676b0de0d2bbcc9e8337696af4ef0b56c..a569d83831307d8aaff3ddc59153706eef34db18 100644 (file)
@@ -63,7 +63,7 @@ ModuleHeader Mod_Header
        "who",  /* Name of module */
        "$Id$", /* Version */
        "command /who", /* Short description of module */
-       "3.2-b5",
+       "3.2-b8-1",
        NULL 
     };
 
@@ -74,9 +74,9 @@ ModuleHeader Mod_Header
 
 /* This is called on module init, before Server Ready */
 #ifdef DYNAMIC_LINKING
-DLLFUNC int    Mod_Init(int module_load)
+DLLFUNC int    Mod_Init(ModuleInfo *modinfo)
 #else
-int    m_who_Init(int module_load)
+int    m_who_Init(ModuleInfo *modinfo)
 #endif
 {
        /*
index f28cff1c9b7dfa0154325bc91fe2a7d6bd08b10a..45ad9cf48236ced17f2213242b261609def8d76d 100644 (file)
@@ -62,7 +62,7 @@ ModuleHeader Mod_Header
        "whois",        /* Name of module */
        "$Id$", /* Version */
        "command /whois", /* Short description of module */
-       "3.2-b5",
+       "3.2-b8-1",
        NULL 
     };
 
@@ -73,9 +73,9 @@ ModuleHeader Mod_Header
 
 /* This is called on module init, before Server Ready */
 #ifdef DYNAMIC_LINKING
-DLLFUNC int    Mod_Init(int module_load)
+DLLFUNC int    Mod_Init(ModuleInfo *modinfo)
 #else
-int    m_whois_Init(int module_load)
+int    m_whois_Init(ModuleInfo *modinfo)
 #endif
 {
        /*
index 3c2fd05ea6e080013934763a828c57ac01172991..aaab0e1ead1561515555d53d5f3f0a99bbe02faa 100644 (file)
@@ -60,7 +60,7 @@ ModuleHeader Mod_Header
        "zline",        /* Name of module */
        "$Id$", /* Version */
        "command /zline", /* Short description of module */
-       "3.2-b5",
+       "3.2-b8-1",
        NULL 
     };
 
@@ -71,9 +71,9 @@ ModuleHeader Mod_Header
 
 /* This is called on module init, before Server Ready */
 #ifdef DYNAMIC_LINKING
-DLLFUNC int    Mod_Init(int module_load)
+DLLFUNC int    Mod_Init(ModuleInfo *modinfo)
 #else
-int    m_zline_Init(int module_load)
+int    m_zline_Init(ModuleInfo *modinfo)
 #endif
 {
        /*
index 8c5e13f47d479abc957d4ffc2df5950708f3ac53..35bf7975107cd75b1371b910c01f0d89bb1c4b18 100644 (file)
@@ -81,6 +81,8 @@ EVENT(e_scannings_clean);
 
 static Event   *Scannings_clean = NULL;
 static Hook    *LocConnect = NULL, *ConfUnknown = NULL, *ServerStats = NULL;
+static Hooktype *ScanHost = NULL;
+static int HOOKTYPE_SCAN_HOST;
 ModuleInfo ScanModInfo;
 /* This is called on module init, before Server Ready */
 #ifdef DYNAMIC_LINKING
@@ -89,7 +91,9 @@ DLLFUNC int   Mod_Init(ModuleInfo *modinfo)
 int    m_scan_Init(ModuleInfo *modinfo)
 #endif
 {
+       int id;
        bcopy(modinfo,&ScanModInfo,modinfo->size);
+       ScanHost = (Hooktype *)HooktypeAdd(modinfo->handle, "HOOKTYPE_SCAN_HOST", &HOOKTYPE_SCAN_HOST);
        LocConnect = HookAddEx(ScanModInfo.handle, HOOKTYPE_LOCAL_CONNECT, h_scan_connect);
        ConfUnknown = HookAddEx(ScanModInfo.handle, HOOKTYPE_CONFIG_UNKNOWN, h_config_set_scan);
        ServerStats = HookAddEx(ScanModInfo.handle, HOOKTYPE_STATS, h_stats_scan);
@@ -152,6 +156,7 @@ int m_scan_Unload(void)
        IRCMutexUnlock(Scannings_lock); 
        if (ret != MOD_DELAY)
        {
+               HooktypeDel(ScanHost,ScanModInfo.handle);
                HookDel(LocConnect);
                HookDel(ConfUnknown);
                LockEventSystem();
index 861a7bf9413d202bc2ad7cac7047da54b48122e3..33e945f0dbfbac66400eb12e6e8e6d9e662905b3 100644 (file)
@@ -65,6 +65,8 @@ static vFP                    xEadd_scan = NULL;
 static struct SOCKADDR_IN      *xScan_endpoint = NULL;
 static int xScan_TimeOut = 0;
 static Hook *HttpScanHost = NULL;
+static int HOOKTYPE_SCAN_HOST;
+static Hooktype *ScanHost;
 #ifdef STATIC_LINKING
 extern void Eadd_scan();
 extern struct SOCKADDR_IN      Scan_endpoint;
@@ -110,6 +112,7 @@ int    scan_http_Init(ModuleInfo *modinfo)
         * Add scanning hooks
        */
        bcopy(modinfo, &ScanHttpModInfo, modinfo->size);
+       ScanHost = HooktypeAdd(ScanHttpModInfo.handle, "HOOKTYPE_SCAN_HOST", &HOOKTYPE_SCAN_HOST);
        HttpScanHost = HookAddVoidEx(ScanHttpModInfo.handle, HOOKTYPE_SCAN_HOST, scan_http_scan); 
        return MOD_SUCCESS;
 }
@@ -132,6 +135,7 @@ DLLFUNC int Mod_Unload(int module_unload)
 int    scan_http_Unload(int module_unload)
 #endif
 {
+       HooktypeDel(ScanHost, ScanHttpModInfo.handle);
        HookDel(HttpScanHost);
        return MOD_SUCCESS;
 }
index 6ef4d8c7e00d4d887f9eb8a602c20582b1877af2..c8b4a940ba4adb7825a80d0187ccf91c0b7672be 100644 (file)
@@ -68,6 +68,8 @@ extern int Scan_TimeOut;
 void   scan_socks_scan(Scan_AddrStruct *sr);
 void   scan_socks4_scan(Scan_AddrStruct *sr);
 void   scan_socks5_scan(Scan_AddrStruct *sr);
+static int HOOKTYPE_SCAN_HOST;
+static Hooktype *ScanHost;
 static Mod_SymbolDepTable modsymdep[] = 
 {
        MOD_Dep(Eadd_scan, xEadd_scan, "src/modules/scan.so"),
@@ -107,6 +109,7 @@ int    scan_socks_Init(ModuleInfo *modinfo)
         * Add scanning hooks
        */
        bcopy(modinfo,&ScanSocksModInfo,modinfo->size);
+       ScanHost = HooktypeAdd(ScanSocksModInfo.handle, "HOOKTYPE_SCAN_HOST", &HOOKTYPE_SCAN_HOST);
        SocksScanHost = HookAddVoidEx(ScanSocksModInfo.handle, HOOKTYPE_SCAN_HOST, scan_socks_scan); 
        return MOD_SUCCESS;
 }
@@ -130,6 +133,7 @@ int scan_socks_Unload(int module_unload)
 #endif
 {
        HookDel(SocksScanHost);
+       HooktypeDel(ScanHost,ScanSocksModInfo.handle);
        return MOD_SUCCESS;
 }
 
index 04e0c28d60493d95dff4798bf2cf986f4b26a74b..0534cb6c5affcb075a4a45e42e3129d6004f83f1 100644 (file)
@@ -65,10 +65,6 @@ void start_auth(aClient *cptr)
            cptr, cptr->slot, cptr->fd, cptr->status));
        if ((cptr->authfd = socket(AFINET, SOCK_STREAM, 0)) == -1)
        {
-#ifdef USE_SYSLOG
-               syslog(LOG_ERR, "Unable to create auth socket for %s:%m",
-                   get_client_name(cptr, TRUE));
-#endif
                Debug((DEBUG_ERROR, "Unable to create auth socket for %s:%s",
                    get_client_name(cptr, TRUE), strerror(get_sockerr(cptr))));
                if (!DoingDNS(cptr))
@@ -145,10 +141,6 @@ void send_authports(aClient *cptr)
        if (getsockname(cptr->fd, (struct SOCKADDR *)&us, &ulen) ||
            getpeername(cptr->fd, (struct SOCKADDR *)&them, &tlen))
        {
-#ifdef USE_SYSLOG
-               syslog(LOG_ERR, "auth get{sock,peer}name error for %s:%m",
-                   get_client_name(cptr, TRUE));
-#endif
                goto authsenderr;
        }
 
index 708ee5252d06198851fff4cfead5f72661bff96d..1bed0a2a7236333d0d01d471ced87661ed01ad52 100644 (file)
@@ -282,9 +282,6 @@ void report_error(char *text, aClient *cptr)
 #endif
        sendto_snomask(SNO_JUNK, text, host, strerror(errtmp));
        ircd_log(LOG_ERROR, text,host,strerror(errtmp));
-#ifdef USE_SYSLOG
-       syslog(LOG_WARNING, text, host, strerror(errtmp));
-#endif
        return;
 }
 
@@ -317,9 +314,6 @@ void report_baderror(char *text, aClient *cptr)
                                errtmp = err;
 #endif
        sendto_umode(UMODE_OPER, text, host, strerror(errtmp));
-#ifdef USE_SYSLOG
-       syslog(LOG_WARNING, text, host, strerror(errtmp));
-#endif
        return;
 }
 
@@ -985,7 +979,7 @@ void set_sock_opts(int fd, aClient *cptr)
 #endif
 #if  defined(SO_DEBUG) && defined(DEBUGMODE) && 0
 /* Solaris with SO_DEBUG writes to syslog by default */
-#if !defined(_SOLARIS) || defined(USE_SYSLOG)
+#if !defined(_SOLARIS) || defined(HAVE_SYSLOG)
        opt = 1;
        if (setsockopt(fd, SOL_SOCKET, SO_DEBUG, (OPT_TYPE *)&opt,
            sizeof(opt)) < 0)
index 57500d74e7fd0c321a73f8741f0cb9019ef598fc..67a8232768b0f8ecfde6ddc925779e4bff3c6a87 100644 (file)
@@ -926,7 +926,7 @@ int ConfigCmd(ConfigFile *cf, ConfigEntry *ce, ConfigCommand *cc)
                        ConfigItem_unknown *ca = MyMalloc(sizeof(ConfigItem_unknown));
                        ca->ce = cep;                   
                        /* Add to the unknown list */
-                       DelListItem(ca, conf_unknown);
+                       AddListItem(ca, conf_unknown);
                }
        }
        return 0;
index 818a6787c8cc43256204737af5e4fddff55b3265..82700a6b5c2b54432947b8189b0b889cf8b1e526 100644 (file)
@@ -446,6 +446,17 @@ void ircd_log(int flags, char *format, ...)
        strcat(buf, "\n");
        sprintf(timebuf, "[%s] - ", myctime(TStime()));
        for (logs = conf_log; logs; logs = (ConfigItem_log *) logs->next) {
+#ifdef HAVE_SYSLOG
+               if (!stricmp(logs->file, "syslog") && logs->flags & flags) {
+#ifdef HAVE_VSYSLOG
+                       vsyslog(LOG_INFO, format, ap);
+#else
+                       /* %s just to be safe */
+                       syslog(LOG_INFO, "%s", buf);
+#endif
+                       continue;
+               }
+#endif
                if (logs->flags & flags) {
                        if (stat(logs->file, &fstats) != -1 && logs->maxsize && fstats.st_size >= logs->maxsize) {
 #ifndef _WIN32
index c75a2366a43b6d4a491c4982489dc6bbd0b76023..f19ddde4812448381fbee3022833888ec018dea9 100644 (file)
@@ -442,13 +442,6 @@ int  exit_client(aClient *cptr, aClient *sptr, aClient *from, char *comment)
                                MyFree(sptr->user->lopt);
                        }
                        on_for = TStime() - sptr->firsttime;
-# if defined(USE_SYSLOG) && defined(SYSLOG_USERS)
-                       syslog(LOG_NOTICE, "%s (%3d:%02d:%02d): %s@%s (%s)\n",
-                           myctime(sptr->firsttime),
-                           on_for / 3600, (on_for % 3600) / 60,
-                           on_for % 60, sptr->user->username,
-                           sptr->sockhost, sptr->name);
-#endif
                        ircd_log(LOG_CLIENT, "Disconnect - (%d:%d:%d) %s!%s@%s",
                                on_for / 3600, (on_for % 3600) / 60, on_for % 60,
                                sptr->name, sptr->user->username, sptr->user->realhost);
@@ -696,9 +689,6 @@ void checklist(void)
                        j++;
        if (!j)
        {
-#ifdef USE_SYSLOG
-               syslog(LOG_WARNING, "ircd exiting: autodie");
-#endif
                exit(0);
        }
        return;
index 49dd5b1600415bf26ed587a36d0a4693afbab07c..9cbfe10e0e9b2da5678927f2948ffc2518a723fe 100644 (file)
@@ -266,10 +266,6 @@ CMD_FUNC(m_squit)
                sendto_serv_butone(&me,
                    ":%s GLOBOPS :Received SQUIT %s from %s (%s)", me.name,
                    server, get_client_name(sptr, FALSE), comment);
-#if defined(USE_SYSLOG) && defined(SYSLOG_SQUIT)
-               syslog(LOG_DEBUG, "SQUIT From %s : %s (%s)",
-                   parv[0], server, comment);
-#endif
        }
        else if (MyConnect(acptr))
        {
@@ -2824,10 +2820,6 @@ CMD_FUNC(m_connect)
                    ":%s GLOBOPS :Remote CONNECT %s %s from %s",
                    me.name, parv[1], parv[2] ? parv[2] : "",
                    get_client_name(sptr, FALSE));
-#if defined(USE_SYSLOG) && defined(SYSLOG_CONNECT)
-               syslog(LOG_DEBUG, "CONNECT From %s : %s %d", parv[0], parv[1],
-                   parv[2] ? parv[2] : "");
-#endif
        }
        /* Interesting */
        aconf->port = port;
@@ -3439,9 +3431,6 @@ CMD_FUNC(m_rehash)
                sendto_ops("%s is rehashing server config file", parv[0]);
 
        sendto_one(sptr, rpl_str(RPL_REHASHING), me.name, parv[0], configfile);
-#ifdef USE_SYSLOG
-       syslog(LOG_INFO, "REHASH From %s\n", get_client_name(sptr, FALSE));
-#endif
        return rehash(cptr, sptr, (parc > 1) ? ((*parv[1] == 'q') ? 2 : 0) : 0);
 }
 
@@ -3524,12 +3513,6 @@ CMD_FUNC(m_restart)
 
        }
 
-#ifdef USE_SYSLOG
-       syslog(LOG_WARNING, "Server RESTART by %s - %s\n",
-           get_client_name(sptr, FALSE),
-           (!MyClient(sptr) ? (parc > 2 ? parv[3] : "No reason")
-           : (parc > 1 ? parv[2] : "No reason")));
-#endif
        sendto_ops("Server is Restarting by request of %s", parv[0]);
        server_reboot((!MyClient(sptr) ? (parc > 2 ? parv[3] : "No reason")
            : (parc > 1 ? parv[2] : "No reason")));