about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)Author
2009-01-20Support individual channel keys for pre-defined channels.Alexander Barton
This patch introduces the new configuration variable "KeyFile" for [Channel] sections in ngircd.conf. Here a file can be configured for each pre-defined channel which contains individual channel keys for different users. This file is line-based and must have the following syntax: <user>:<nick>:<key> <user> and <nick> can contain the wildcard character "*". Please not that these channel keys are only in effect, when the channel has a regular key set using channel mode "k"!
2009-01-20RFC 2812, sec. 3.3.1: really check for the last dotAlexander Barton
This fixes commit 5a3128243f4b60 and makes the test suite ("make check") run again without errors.
2009-01-18irc.c: reject masks with wildcard after last dotFlorian Westphal
RFC 2812 says in section 3.3.1 ("Private Messages"): The mask MUST have at least 1 (one) "." in it and no wildcards following the last ".".
2009-01-18irc.c: Fix handling of channels containing dotsFlorian Westphal
commit 2546a13ad2949192eb70bf21e114ec60af287ee4 ('Cumulative Message Patch') broke PRIVMSG to channels containing dots. Fix this by switching evaluation order: Check first if the target matches a existing channel and only do a check for target masks if that failed. PRIVMSG with host/server masks is described in RFC 2812, section 3.3.1. Makes one wonder how a server is _really_ supposed to tell the difference between hostmasks and channel names. Sigh.
2009-01-10remove unneeded LOG_DEBUG when not compiling with DEBUG supportFlorian Westphal
when ngircd is build without DEBUG enabled, LOG_DEBUG messages are always discarded. To avoid the extra code, ngircd has a LogDebug() wrapper which gets removed by the compiler when compiling without DEBUG defined. Update a few functings which were using the Log(LOG_DEBUG, .. interface directly without #ifdef DEBUG guards. text data bss dec hex filename 127748 1900 28280 157928 268e8 ngircd.before 126836 1896 28280 157012 26554 ngircd.after
2009-01-05Rename Channel_Free() to Free_Channel(), it is a local functionAlexander Barton
2009-01-05Clean up channel allocation table on shutdown/restart.Alexander Barton
Silly bug: the condition of a while() loop in the Channel_Exit() function used the wrong variable and therefore got never executed ... This bug is in the code since the beginning (see commit bb19cfda in 2002); shame on me!
2009-01-05Add Channel_Free().Florian Westphal
Central function to free a channel structure and all its resources (invite/ban lists, topic, ...).
2009-01-04Clean up (reformat and comment) Delete_Channel() function.Alexander Barton
2009-01-04Free topic array on channel deletion.Alexander Barton
The topic array in the CHANNEL structure must be free()'d before the channel itself becomes deleted.
2008-12-30Allow pre-defined server local channels ("&").Alexander Barton
2008-12-27defines.h: remove MAX_LISTEN_PORTS, MAX_SERVICESFlorian Westphal
_SERVICES was never used; _LISTEN_PORTS is a leftover from commit 51ccb5928ad1453b0593fedd934298384d09e619 ('internal changes needed for future ssl support').
2008-12-26Remove limit on max number of predefined channels.Florian Westphal
This resolves Bugzilla Bug 68 ('Too many pre-defined channels configured.')
2008-12-26channel.c: constify a few function arguments.Florian Westphal
2008-12-26use %ld as format specifier for posix data typesFlorian Westphal
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-17don't print pid_t type with %ld format specifierFlorian Westphal
Reported by Christoph Biedl: ngircd[21581]: Running as user irc(39), group irc(39), with PID 140733193409613. cast pid_t to long to avoid this. While we are there, cast uid_t and gid_t, too.
2008-12-03Testsuite start-server.sh: return correct exit code.Alexander Barton
src/testsuite/start-server.sh returns 0 when no errors occurred and the daemon has been startet and 1 on errors. Always returning 0 is wrong ...
2008-12-03Make testsuite (getpid.sh) work on OpenSolaris (i386/pc/solaris2.11).Alexander Barton
2008-11-20Change formatting of some log messagesAlexander Barton
- Fix formatting of some log messages, mostly punctuation. - cb_Connect_to_Server(): don't use string concatenation, because it is not supported by pre-ANSI C compilers ...
2008-11-20Fix pem_passwd_cb(): unused variable "rwflag" (OpenSSL)Alexander Barton
This patch fixes the following warning of GCC (version 4.3.2) in function pem_passwd_cb() when compiling with OpenSSL support and without debug code: conn-ssl.c: In function 'pem_passwd_cb': conn-ssl.c:122: warning: unused parameter 'rwflag'
2008-11-19New configuration option "NoIdent" to disable IDENT lookupsAlexander Barton
The new configuration option "NoIdent" in ngircd.conf can be used to disable IDENT lookups even when the ngIRCd daemon is compiled with IDENT lookups enabled.
2008-11-19Implement the IRC command "SERVLIST"Alexander Barton
The IRC command "SERVLIST" lists all the registered services, see RFC 2811, section 3.5.1. The syntax is "SERVLIST [<mask> [<type>]]". The parameter <type> is not used by ngIRCd at the moment, all registered services are of type 0 (which is the default when omitted).
2008-11-17Create local &SERVER channel and log server messages to itAlexander Barton
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-17Implement local channels (prefix "&")Alexander Barton
This patch implements server-local channels, prefix "&", that are only visible to users of the same local server and not in the network. Patch written by Scott Perry (2008-06-04), see: - http://arthur.barton.de/cgi-bin/bugzilla/show_bug.cgi?id=87 - http://arthur.barton.de/cgi-bin/bugzilla/attachment.cgi?id=24&action=view
2008-11-13Added some missing files of GIT tree to distribution archivesAlexander Barton
The following bits and bytes were not included in distribution archives: - contrib: ngindent, ngircd.sh - contrib/Debian: ngircd.postinst - contrib/MacOSX: preinstall.sh, postinstall.sh - doc/src: Doxyfile, header.inc.html, footer.inc.html, ngircd-doc.css - src/portab: splint.h
2008-11-13Test suite: start two servers and test server-server linksAlexander Barton
I changed the test suite to start two test servers (on port 6789 and 6790), so server-server links can be tested as well for which I included the new test script "server-link-test.e". In addition the documentation of the test suite (src/testsuite/README) has been updated and is more complete now.
2008-11-13Add conf-ssl.h to "noinst_HEADERS"Alexander Barton
conf-ssl.h must be listed in "noinst_HEADERS" so that it becomes included in distribution archives generated by "make dist" and "make distcheck".
2008-11-12Connection counter: count outgoing connections as well.Alexander Barton
This patch lets ngIRCd count outgoing connections as well as incoming connections (up to now only outgoing connections have been counted). This change is required because the Conn_Close() function doesn't know whether it closes an outgoing connection or not and therefore would decrement the counter below zero when an outgoing connection existed -- which would trigger an assert() call ... Please note that this patch changes the (so far undocumented but now fixed) behaviour of the "MaxConnections" configuration option to account the sum of the in- and outbound connections!
2008-11-11Ignore numeric 020 ("please wait while we process your coinnection")Alexander Barton
Some servers send the numeric 020 ("please wait while we process your connection") when a client connects. This is no useful information for this server, so we simply ignore it :-)
2008-11-11GNUTLS: define new API types when installed library is too oldAlexander Barton
This patch enables ngIRCd to use GNUTLS in really old versions, tested with version 1.0.16, that don't define the "new" data types ending in xxx_t. LIBGNUTLS_VERSION_MAJOR isn't defined there as well, so we use it to test if we must define the new types on our own.
2008-11-11Console log: output timestamp (seconds since start) for resolver, tooAlexander Barton
2008-11-10Console log: output timestamp (seconds since start of daemon)Alexander Barton
2008-10-29conn-ssl.c: work around gnutls API problems on 64 bit platformsFlorian Westphal
Alexander Barton reported a compiler warning on 64-bit platforms: cc1: warnings being treated as errors conn-ssl.c: In function 'ConnSSL_Init_SSL': conn-ssl.c:403: error: cast to pointer from integer of different size Unfortunately, I couldn't find a real solution; the GNUTLS API expects 'gnutls_transport_ptr_t' (which is void*), but the default push/pull functions (send/recv) expect an int. The only alternative solution is to pass in an address to the file descriptor, then add send/recv wrappers that expect a pointer. What a mess[tm].
2008-10-29GIT: don't ignore cvs-version.{h|new}, because it isn't used any more.Alexander Barton
2008-10-19Fix ForwardLookup(): "ISO C90 forbids specifying subobject to initialize"Alexander Barton
This patch fixes the following warning of GCC (version 4.3.2) in function ForwardLookup(): resolve.c: In function 'ForwardLookup': resolve.c:282: warning: ISO C90 forbids specifying subobject to initialize resolve.c:284: warning: ISO C90 forbids specifying subobject to initialize resolve.c:285: warning: ISO C90 forbids specifying subobject to initialize
2008-10-19Fix ConnSSL_LogCertInfo(): unused variable "cred" (GNUTLS)Alexander Barton
This patch fixes the following warning of GCC (version 4.3.2) in function ConnSSL_LogCertInfo() when compiling with GNUTLS support: conn-ssl.c: In function 'ConnSSL_LogCertInfo': conn-ssl.c:542: warning: unused variable 'cred'
2008-09-23Enable KICK to be handled from remote servers and from services.Alexander Barton
2008-09-23Respect RFC 1459 compatibility mode when announcing channels (no NJOIN).Alexander Barton
2008-09-23Announce IRC services in the network.Alexander Barton
This patch - introduces a new server flag "S" to indicate that the server can handle the SERVICE command (on server links), - implements the IRC command "SERVICE" for server-server links, - uses the "SERVICE" command to announce IRC services when a new server connects to it, - and fixes the Send_Message() function to let it send messages to services using a "target mask". If the remote server doesn't indicate that it can handle the "SERVICE" command (it has not set the "S" flag), services are announced as regular users as before.
2008-09-23Change Introduce_Client() to set the correct client type (user/service).Alexander Barton
2008-09-23Convert SQUERY to PRIVMSG on RFC 1459 compliant links.Alexander Barton
2008-09-23Don't allow SQUERY to send to "target masks" and channels; only services!Alexander Barton
2008-09-23Fix PRIVMSG/NOTICE handler (II): keep command when forwarding to channels.Alexander Barton
- new function ngt_UpperStr(). - change Channel_Write() to take command name and error flag. - remove now unneeded function Channel_Notice().
2008-09-23New function ngt_UpperStr()Alexander Barton
2008-09-23Fix PRIVMSG/NOTICE handler Send_Message(): don't forward NOTICE as PRIVMSG.Alexander Barton
2008-09-23Make real use of the CLIENT_SERVICE client type.Alexander Barton
This patch enables ngIRCd to handle IRC services as real services, and not as "fake users": - Set correct client type CLIENT_SERVICE for services, - Change log messages to include correct client type, - PRIVMSG: allow users to send messages to services, - Send services nick names to other servers (as users). Please note that this patch doesn't announce services as services in the network, but as regular users (as before). Only the local server knows of services as services (see LUSERS command, for example). It is up to one of the next patches to fix this and to introduce the SERVICE command in server to server communication. The propagation of services as regular users between servers doesn't limit the functionality of the IRC services and will be the fallback for servers that don't support "real" services propagation in the future.
2008-09-23Allow IRC services to change their nick names.Alexander Barton
2008-09-23New function Client_TypeText() and Destroy_UserOrService().Alexander Barton
Client_TypeText() is used to get correct naming ("Client", "Service", ...) for log messages, and Destroy_UserOrService() is used to correctly destroy user and services clients.
2008-09-23Send_Message(): really enforce target client type.Alexander Barton
2008-09-23Allow ngIRCd to detect services connected to an "virtual services server".Alexander Barton
Introduce a new configuration variable "ServiceMask" in SERVER blocks to define a mask matching nick names that should be treated as services. Regular servers don't need this parameter (leave it empty, the default), but you should set it to "*Serv" when connection ircservices, for example. This patch allows ngIRCd to detect services, it doesn't change the functionality: you only get different log messages ;-)