Commit Graph

89 Commits

Author SHA1 Message Date
Alexander Barton a13bb78b1e Update copyright notices of recently changed files 2014-03-17 12:22:00 +01:00
Alexander Barton b130b35f48 Update #include's: remove unused and add missing ones
The "deheader" tool (<http://www.catb.org/~esr/deheader/>) has been
used to find unused #include directives as well as missing ones.

Tested on:

- A/UX 3.1.1
- ArchLinux (2014-03-17)
- Debian GNU/Hurd
- Debian GNU/Linux 6.0.9
- Debian GNU/Linux 7.4
- Fedora 20
- FreeBSD 9.2
- OpenBSD 4.8
- OpenBSD 5.1
- OS X 10.9
- Solaris 11
2014-03-17 11:37:25 +01:00
Alexander Barton 259c314d14 Remove imp.h and exp.h header files
These include files don't have a function any more, remove them.
2014-03-17 00:17:02 +01:00
Alexander Barton 43fb18f2f5 Code cleanup, remove blank lines 2014-03-16 22:11:26 +01:00
Federico G. Schwindt 8d01be7bbd Silence warning
Cast the result of the operation to long, not the time(NULL) call.
On systems where sizeof(time_t) is other than long this will produce
a warning.
2013-08-25 05:24:11 +01:00
Federico G. Schwindt 15dfdaac82 More spelling fixes
Remove superflous comments, mostly in German. Fix spelling and
use american variants for consistency.
2013-08-04 12:45:11 +01:00
Alexander Barton a78c7b3898 Adjust severity levels of some log messages 2013-02-10 20:18:44 +01:00
Alexander Barton 999c11ad49 Exit message: use singular & plural :-) 2013-01-27 23:22:00 +01:00
Alexander Barton b18e81b631 Use lowercase "package name" for syslog logging again
This is how ngIRCd up to release 19.2 behaved; "bug" introduced by commit
67e882, "configure.in: require autoconf 2.67 and automake 1.11", which
changed the "PACKAGE_NAME" to "ngIRCd"; so use "PACKAGE" which still is
the lowercase version for initializing syslog logging.
2012-10-29 10:24:27 +01:00
Alexander Barton 1068f88377 Don't log "ngIRCd hello message" two times
Start "regular" logging not until the configuration file has been read in
and "SyslolgFacility" is set, and log all configuration errors using the
generic "daemon" facility.

So if there are no configuration errors, logging starts right after parsing
the configuration and we log the configuration file used _after_ reading it.
But this is no problem because every configuration error message includes
the configuration file name as well.

(The "double hello" has been introduced by commit 3641e51109)
2012-03-02 09:41:13 +01:00
Alexander Barton 3641e51109 Correctly re-open syslog logging after reading of configuration
Syslog logging has been initialized before reading the configuraton
file, so ngIRCd always used the default facility and ignored the
"SyslogFacility" configuration option.

Thanks to Patrik Schindler for reporting this issue!
2012-02-14 11:01:13 +01:00
Alexander Barton 3f46e93ccc Logging: remove "Activating ..." info message 2012-02-14 10:32:58 +01:00
Alexander Barton 2a7dd06ebd Code cleanup: mostly removing empty lines 2011-02-13 17:52:38 +01:00
Alexander Barton 03628dbeaf Add Doxygen @file documentation to each source and header file 2011-02-13 17:52:38 +01:00
Alexander Barton 5da98ec389 Don't log critical (or worse) messages to stderr
stderr isn't redirected to the "error file" any more, so there is
no point in trying to log to it ...
2010-12-02 13:36:19 +01:00
Alexander Barton 790fa89e67 Remove "error file" when compiled with debug code enabled
The information written to the "error file" (/tmp/ngircd-<PID>.err) when
ngIRCd is compiled with debug code enabled isn't that usefule, so don't
create this file at all.
2010-12-01 21:22:20 +01:00
Alexander Barton 5e82a91d13 New configuration option "SyslogFacility"
The new option "SyslogFacility" deines the syslog "facility" to which
ngIRCd should send log messages.

Possible values are system dependant, but most probably "auth", "daemon",
"user" and "local1" through "local7" are possible values; see syslog(3).
Default is "local5" for historical reasons.
2010-09-24 17:39:11 +02:00
Alexander Barton 41034950d9 Mark some variables as "unused" to prevent compiler warnings
Some variables are only used when compiling with IDENT or PAM support
or when the debug code is enabled. Mark them as "unused" so that gcc
doesn't generate warnings when neither of these options is enabled.
2010-07-13 16:50:00 +02:00
Alexander Barton 0db9a31e50 Rename Log_[{Init|Exit}_]Resolver to Log_[{Init|Exit}_]Subprocess
Rename Log_Init_Resolver, Log_Exit_Resolver, and Log_Resolver to
Log_Init_Subprocess, Log_Exit_Subprocess, and Log_Subprocess and
make it more generic thereby.
2010-07-01 00:34:56 +02:00
Alexander Barton 5462c6c50f Don't #include client.h when conn.h/conn-func.h is already included
conn.h and cinn-func.h both already #include client.h, so it is
not needed to do it twice.
2010-06-30 23:49:52 +02:00
Alexander Barton 51ed742054 Refactor Wall_ServerNotice() into more generic Log_ServerNotice()
Log_ServerNotice() sends a messages to all users having a given
user mode set.
2010-06-25 00:33:00 +02:00
Alexander Barton 615d09459e Display total number of served connections on daemon shutdown 2010-04-23 23:29:22 +02:00
Florian Westphal 544b9884f4 remove or translate old comments 2009-04-21 20:58:30 +02:00
Florian Westphal d26a283ea9 use %ld as format specifier for posix data types
in the same vein as the earlier commit:
cast posix data types (pid_t, ...) to long and use
%ld as format specifier. This will avoid problems
when sizeof(int) != sizeof(type).

We could also cast to int, but this might truncate the value.
2008-12-26 01:07:13 +01:00
Alexander Barton 0eda085f1e Create local &SERVER channel and log server messages to it
ngIRCd now creates a server-local channel &SERVER with channel modes
+mnPt (moderated, no messages from outside the channel, persistent and
with the topic locked) and logs all the messages to it that a user with
mode +s ("server messages") receives.

If an IRC operator withdraws the +P ("persistent") mode and the &SERVER
channel is freed because of no members, nothing special happens. The
channel can be recerated any time later and ngIRCd would begin logging
to it again.
2008-11-17 23:27:06 +01:00
Alexander Barton 9308541e6d Console log: output timestamp (seconds since start) for resolver, too 2008-11-11 22:01:27 +01:00
Alexander Barton 027cf22267 Console log: output timestamp (seconds since start of daemon) 2008-11-10 18:41:19 +01:00
Florian Westphal 83caef4598 if compiling without -DDEBUG, make LogDebug 'static inline' so gcc optimizes it away. 2006-08-05 09:16:21 +00:00
Alexander Barton 63626449f8 Flag the format parameter of LogDebug() as "unused" when not compiling with
debug code to avoid gcc warnings. Added some documentation comments.
2006-07-23 23:23:45 +00:00
Florian Westphal 66060dbce9 new Function: LogDebug() 2006-02-08 17:33:28 +00:00
Alexander Barton a2e4eb5aaf Fixed server NOTICEs to users with "s" mode ("server messages"). 2005-08-29 10:58:00 +00:00
Alexander Barton 77f54693ef Removed unnecessary #define of "LOCAL", now use plain C "static" instead. 2005-07-31 20:13:07 +00:00
Alexander Barton de395db8e3 Get rid of Log_SetDaemonized(). 2005-06-24 19:55:10 +00:00
Florian Westphal dbea187373 removed global variable NGIRCd_NoDaemon 2005-06-24 19:20:56 +00:00
Florian Westphal aec535c8b6 s/sprintf/snprintf 2005-06-17 19:16:53 +00:00
Florian Westphal aee48a3b38 added kludge to make ngircd (with syslog) compile on mips-dec-ultrix4.5 2005-04-16 09:31:30 +00:00
Florian Westphal 8adff59223 Remove INT, LONG, BOOLEAN, STATIC, CONST, CHAR datatypes.
use stdbool.h / inttypes.h if available.
2005-03-19 18:43:48 +00:00
Alexander Barton 9537542647 Write "error file" (/tmp/ngircd-XXX.err) only if compiled with debug
code ("--enable-debug") and running as daemon process.
2005-02-10 12:49:04 +00:00
Alexander Barton 894cd2cd68 Don't create version information string each time a client connects but
insetead on server startup. By Florian Westphal.
2005-02-09 09:52:58 +00:00
Alexander Barton 8308c170db Fixed a bug that could case a root exploit when the daemon is compiled
to do IDENT lookups and is logging to syslog. Bug discovered by CoKi,
<coki@nosystem.com.ar>, thanks a lot!
(http://www.nosystem.com.ar/advisories/advisory-11.txt)
2005-02-03 09:26:42 +00:00
Alexander Barton d16ce5a735 Code cleanups from Florian Westphal, <westphal@foo.fh-furtwangen.de>. 2005-01-20 00:11:49 +00:00
Alexander Barton c1f32e8214 Made ngIRCd compile on HP/UX 10.20 with native HP pre-ANSI C compiler and
most probably other older C compilers on other systems.
2004-10-20 13:47:32 +00:00
Alexander Barton 364ff7087d Added cast to integer for Solaris. 2004-06-26 08:50:44 +00:00
Alexander Barton 26390c60fb Added PID to all log messages on the console; enhanced logging of
resolver sub-processes in debug mode.
2004-05-10 23:57:46 +00:00
Alexander Barton 7281b8dd4d New "chroot" feature (from Benjamin Pineau), introducing new configuration
variables "ChrootDir" and "MotdPhrase".
2004-05-07 11:19:20 +00:00
Alexander Barton c40592d2ce Removed "USE_" prefixes of configuration #defines. 2003-12-26 15:55:07 +00:00
Alexander Barton 62796722f1 Changed all PACKAGE's to PACKAGE_NAME and all VERSION's to PACKAGE_VERSION. 2003-03-31 15:54:21 +00:00
Alexander Barton 43a4bc5b8b - New signal handler. 2002-12-19 04:29:59 +00:00
Alexander Barton 490f28ffd1 - new file header format (in english);
- new file ident semantics.
2002-12-12 12:24:18 +00:00
Alexander Barton c7b55aa6f4 - verwendete Datentypen aufgeraumt: beispielsweise INT32 ist nun oft ein LONG. 2002-10-09 16:53:02 +00:00