* +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
/*
- * UnrealIRCd Changes File - (C) Carsten Munk 1999-2000 &
+ * UnrealIRCd Changes File - (C) Carsten Munk 1999-2002 &
* The UnrealIRCd Team
*
* $Id$
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
'CRYPTOINCLUDES=${CRYPTOINCLUDES}'
custommodule:
- cd src; ${MAKE} ${MAKEARGS} MODULEFILE=${MODULEFILE} custommodule
+ cd src; ${MAKE} ${MAKEARGS} MODULEFILE=${MODULEFILE} EXLIBS=${EXLIBS} custommodule
server:
build:
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)
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
+
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
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() {
; 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
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. */
; 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
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
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
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
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
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
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
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
{ 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>
}
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
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
# 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*
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
# 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() {
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
# 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
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
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
# 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
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
{ 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>
}
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
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>
}
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
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.
password <password> { <auth-type>; };
class <class-name>;
snomask <snomask>;
+ swhois <swhois>;
flags <flags>;
flags {
<flag>;
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)
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)
*/
#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
#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 */
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
#define MOBJ_EVENT 0x0001
#define MOBJ_HOOK 0x0002
#define MOBJ_COMMAND 0x0004
+#define MOBJ_HOOKTYPE 0x0008
typedef struct _command {
struct _command *prev, *next;
Event *event;
Hook *hook;
Command *command;
+ Hooktype *hooktype;
} object;
} ModuleObject;
Module *owner;
};
+struct _hooktype {
+ short id;
+ char *string;
+ ModuleChild *parents;
+};
/*
* What we use to keep track internally of the modules
*/
void LockEventSystem(void);
void UnlockEventSystem(void);
extern Hook *Hooks[MAXHOOKTYPES];
+extern Hooktype Hooktypes[MAXCUSTOMHOOKS];
extern Hook *global_i;
void Module_Init(void);
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
#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
#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) */
/* 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
# include <stddef.h>
#endif
-#ifdef USE_SYSLOG
+#ifdef HAVE_SYSLOG
# include <syslog.h>
# ifdef SYSSYSLOGH
# include <sys/syslog.h>
#define PATCH1 "3"
#define PATCH2 ".2"
#define PATCH3 "-Selene"
-#define PATCH4 "[beta8]"
+#define PATCH4 "[beta9]"
#define PATCH5 ""
#define PATCH6 ""
#define PATCH7 ""
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
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
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)
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++)
{
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;
}
}
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)
*/
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)
*/
c++; /* in my dreams */
}
pparv.parv[c] = NULL;
+ pparv.parc = c;
return (&pparv);
}
*/
--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
#ifdef _WIN32
int i;
aClient *cptr;
-#endif
-#ifdef USE_SYSLOG
- (void)syslog(LOG_CRIT, "Server Killed By SIGTERM");
#endif
unload_all_modules();
#ifndef _WIN32
#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);
}
{
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 */
** 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
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
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));
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)
Hook *Hooks[MAXHOOKTYPES];
Hook *global_i = NULL;
+Hooktype Hooktypes[MAXCUSTOMHOOKS];
Module *Modules = NULL;
int Module_Depend_Resolve(Module *p);
Module *Module_make(ModuleHeader *header,
void Module_Init(void)
{
bzero(Hooks, sizeof(Hooks));
+ bzero(Hooktypes, sizeof(Hooktypes));
}
Module *Module_Find(char *name)
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)
{
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;
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)
"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');
* 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);
#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();
#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)
*/
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;
m_scan_Init(&ModCmdsInfo);
scan_socks_Init(&ModCmdsInfo);
scan_http_Init(&ModCmdsInfo);
+#endif
+#ifdef _WIN32
+ invisibility_Init(&ModCmdsInfo);
#endif
return MOD_SUCCESS;
}
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;
}
scan_socks_Unload();
scan_http_Unload();
m_scan_Unload();
+#endif
+#ifdef _WIN32
+ invisibility_Unload();
#endif
return MOD_SUCCESS;
}
"adminchat", /* Name of module */
"$Id$", /* Version */
"command /adchat", /* Short description of module */
- "3.2-b5",
+ "3.2-b8-1",
NULL
};
/* 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
{
/*
"akill", /* Name of module */
"$Id$", /* Version */
"command /akill", /* Short description of module */
- "3.2-b5",
+ "3.2-b8-1",
NULL
};
/* 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
{
/*
"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);
"chghost", /* Name of module */
"$Id$", /* Version */
"/chghost", /* Short description of module */
- "3.2-b5",
+ "3.2-b8-1",
};
/*
*/
#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
{
/*
"chgident", /* Name of module */
"$Id$", /* Version */
"/chgident", /* Short description of module */
- "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_chgident_Init(int module_load)
+int m_chgident_Init(ModuleInfo *modinfo)
#endif
{
/* extern variable to export m_chgident_info to temporary
"chgname", /* Name of module */
"$Id$", /* Version */
"command /chgname", /* Short description of module */
- "3.2-b5",
+ "3.2-b8-1",
NULL
};
/* 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
{
/*
"dummy", /* Name of module */
"$Id$", /* Version */
"command /dummy", /* Short description of module */
- "3.2-b5",
+ "3.2-b8-1",
NULL
};
/* 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
{
/*
"htm", /* Name of module */
"$Id$", /* Version */
"command /htm", /* Short description of module */
- "3.2-b5",
+ "3.2-b8-1",
NULL
};
/* 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
{
/*
"kill", /* Name of module */
"$Id$", /* Version */
"command /kill", /* Short description of module */
- "3.2-b5",
+ "3.2-b8-1",
NULL
};
/* 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
{
/*
"kline", /* Name of module */
"$Id$", /* Version */
"command /kline", /* Short description of module */
- "3.2-b5",
+ "3.2-b8-1",
NULL
};
/* 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
{
/*
"lag", /* Name of module */
"$Id$", /* Version */
"command /lag", /* Short description of module */
- "3.2-b5",
+ "3.2-b8-1",
NULL
};
/* 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
{
/*
"message", /* Name of module */
"$Id$", /* Version */
"private message and notice", /* Short description of module */
- "3.2-b5",
+ "3.2-b8-1",
NULL
};
/* 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
{
/*
"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);
"Nachat", /* Name of module */
"$Id$", /* Version */
"command /nachat", /* Short description of module */
- "3.2-b5",
+ "3.2-b8-1",
NULL
};
/* 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
{
/*
"oper", /* Name of module */
"$Id$", /* Version */
"command /oper", /* Short description of module */
- "3.2-b5",
+ "3.2-b8-1",
NULL
};
/* 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
{
/*
"pingpong", /* Name of module */
"$Id$", /* Version */
"ping, pong and nospoof", /* Short description of module */
- "3.2-b5",
+ "3.2-b8-1",
NULL
};
/* 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
{
/*
"quit", /* Name of module */
"$Id$", /* Version */
"command /quit", /* Short description of module */
- "3.2-b5",
+ "3.2-b8-1",
NULL
};
/* 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
{
/*
"rakill", /* Name of module */
"$Id$", /* Version */
"command /rakill", /* Short description of module */
- "3.2-b5",
+ "3.2-b8-1",
NULL
};
/* 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
{
/*
"rping", /* Name of module */
"$Id$", /* Version */
"command /rping, /rpong", /* Short description of module */
- "3.2-b5",
+ "3.2-b8-1",
NULL
};
/* 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
{
/*
"sdesc", /* Name of module */
"$Id$", /* Version */
"command /sdesc", /* Short description of module */
- "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_sdesc_Init(int module_load)
+int m_sdesc_Init(ModuleInfo *modinfo)
#endif
{
/*
"sendumode", /* Name of module */
"$Id$", /* Version */
"command /sendumode", /* Short description of module */
- "3.2-b5",
+ "3.2-b8-1",
NULL
};
/* 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
{
/*
"sethost", /* Name of module */
"$Id$", /* Version */
"command /sethost", /* Short description of module */
- "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_sethost_Init(int module_load)
+int m_sethost_Init(ModuleInfo *modinfo)
#endif
{
/*
"setident", /* Name of module */
"$Id$", /* Version */
"/setident", /* Short description of module */
- "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_setident_Init(int module_load)
+int m_setident_Init(ModuleInfo *modinfo)
#endif
{
/*
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;
"setname", /* Name of module */
"$Id$", /* Version */
"command /setname", /* Short description of module */
- "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_setname_Init(int module_load)
+int m_setname_Init(ModuleInfo *modinfo)
#endif
{
/*
"sqline", /* Name of module */
"$Id$", /* Version */
"command /sqline", /* Short description of module */
- "3.2-b5",
+ "3.2-b8-1",
NULL
};
/* 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
{
/*
"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);
"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);
"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);
"svsnline", /* Name of module */
"$Id$", /* Version */
"command /svsnline", /* Short description of module */
- "3.2-b5",
+ "3.2-b8-1",
NULL
};
/* 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
{
/*
"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);
"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);
"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);
"tkl", /* Name of module */
"$Id$", /* Version */
"commands /gline etc", /* Short description of module */
- "3.2-b5",
+ "3.2-b8-1",
NULL
};
/* 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
{
/*
"tsctl", /* Name of module */
"$Id$", /* Version */
"command /tsctl", /* Short description of module */
- "3.2-b5",
+ "3.2-b8-1",
NULL
};
/* 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
{
/*
"unkline", /* Name of module */
"$Id$", /* Version */
"command /unkline", /* Short description of module */
- "3.2-b5",
+ "3.2-b8-1",
NULL
};
/* 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
{
/*
"unsqline", /* Name of module */
"$Id$", /* Version */
"command /unsqline", /* Short description of module */
- "3.2-b5",
+ "3.2-b8-1",
NULL
};
/* 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
{
/*
"unzline", /* Name of module */
"$Id$", /* Version */
"command /unzline", /* Short description of module */
- "3.2-b5",
+ "3.2-b8-1",
NULL
};
/* 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
{
/*
"who", /* Name of module */
"$Id$", /* Version */
"command /who", /* Short description of module */
- "3.2-b5",
+ "3.2-b8-1",
NULL
};
/* 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
{
/*
"whois", /* Name of module */
"$Id$", /* Version */
"command /whois", /* Short description of module */
- "3.2-b5",
+ "3.2-b8-1",
NULL
};
/* 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
{
/*
"zline", /* Name of module */
"$Id$", /* Version */
"command /zline", /* Short description of module */
- "3.2-b5",
+ "3.2-b8-1",
NULL
};
/* 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
{
/*
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
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);
IRCMutexUnlock(Scannings_lock);
if (ret != MOD_DELAY)
{
+ HooktypeDel(ScanHost,ScanModInfo.handle);
HookDel(LocConnect);
HookDel(ConfUnknown);
LockEventSystem();
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;
* 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;
}
int scan_http_Unload(int module_unload)
#endif
{
+ HooktypeDel(ScanHost, ScanHttpModInfo.handle);
HookDel(HttpScanHost);
return MOD_SUCCESS;
}
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"),
* 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;
}
#endif
{
HookDel(SocksScanHost);
+ HooktypeDel(ScanHost,ScanSocksModInfo.handle);
return MOD_SUCCESS;
}
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))
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;
}
#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;
}
errtmp = err;
#endif
sendto_umode(UMODE_OPER, text, host, strerror(errtmp));
-#ifdef USE_SYSLOG
- syslog(LOG_WARNING, text, host, strerror(errtmp));
-#endif
return;
}
#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)
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;
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
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);
j++;
if (!j)
{
-#ifdef USE_SYSLOG
- syslog(LOG_WARNING, "ircd exiting: autodie");
-#endif
exit(0);
}
return;
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))
{
":%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;
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);
}
}
-#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")));