summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)Author
2010-04-25Don't reset counters on RESTARTAlexander Barton
When ngIRCd restarts, all the connection counters are preserved now, as well as the command counters for example. It's unclear if resetting or not resetting is the "correct" behaviour, but it's quite clear that the behaviour should be consistent for all the counters ngIRCd uses ... And initializing "WCounter", the global but temporary write counter, is not necessarry at all: it is initialized (reset) before its use in the command parser (see parse.c).
2010-04-23New numeric RPL_STATSCONN (250): display connection statisticsAlexander Barton
The RPL_STATSCONN numeric (250) displays information about the highest simoultaneous connection count and the number of all accepted connections since the daemon started up. Used by ircd-Hybrid, Bahamut, and Unreal for example.
2010-04-23Display total number of served connections on daemon shutdownAlexander Barton
2010-04-23Enhace connection statistics countersAlexander Barton
This patch enables ngIRCd to count the highest maximum simultaneous connections and all the connections accepted since startup. New functions: - Conn_Count(): get current connections - Conn_CountMax(): maximum simultaneous connections - Conn_CountAccepted(): number of connections accepted
2010-04-23Conn_Init: code cleanupAlexander Barton
2010-04-23Only include <netinet/in_systm.h> if it existsAlexander Barton
2010-04-11Include netinet/in_systm.h alongside netinet/ip.hAlexander Barton
This fixes the following error when compiling on e.g. FreeBSD 6.x: In file included from conn.c:40: /usr/include/netinet/ip.h:160: error: syntax error before "n_long" /usr/include/netinet/ip.h:163: error: syntax error before "n_long"
2010-04-09Fix gcc warning "ignoring return value of ..."Alexander Barton
This patch fixes two warnings of gcc 4.4.3 when used with eglibc 2.11.1: ngircd.c: In function ‘NGIRCd_Init’: ngircd.c:801: warning: ignoring return value of ‘chdir’, declared with attribute warn_unused_result conn.c: In function ‘Simple_Message’: conn.c:2041: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result The first by checking the return code and an appropriate error message, the second by "better" ignoring it (which is correct there!) ...
2010-04-09Only compile in Get_Error() if really neededAlexander Barton
This fixes "resolve.c:150: warning: ‘Get_Error’ defined but not used".
2010-04-02Updated some more copyright notices, it's 2010 already (part 2)Alexander Barton
Silly me forgot the most important place, the program output itself ...
2010-02-11Implement WEBIRC commandAlexander Barton
The WEBIRC command is used by some Web-to-IRC gateways to set the correct user name and host name of users instead of their own. Syntax: WEBIRC <password> <username> <hostname> <ip-address> The <password> must be set using the new configuration variable "WebircPassword" in the [Global] section of ngircd.conf. Please note that the <ip-address> is currently not used by ngIRCd (we don't store it in the CLIENT structure, only the resolved hostname).
2010-02-10Re-format Init_New_Client() functionAlexander Barton
2010-01-19Quote received messages of ERROR commands in log outputAlexander Barton
2010-01-17Implemented new "secure clients only" channel mode: +zAlexander Barton
Only clients using a SSL encrypted connection to the server are allowed to join such a channel. But please note three things: a) already joined clients are not checked when setting this mode, b) IRC operators are always allowed to join every channel, and c) remote clients using a server not supporting this mode are not checked either and therefore always allowed to join.
2010-01-16Clean up and document IRC_STATS() functionAlexander Barton
2010-01-16Clean up and document IRC_JOIN() and join_allowed() functionsAlexander Barton
2010-01-16Show our name (IRCD=ngIRCd) in ISUPPORT (005) numericAlexander Barton
Inspired by Hyperion IRC daemon.
2010-01-16Added missing modes to USERMODES #defineAlexander Barton
Now the numeric 004 correctly reports all the supported user and channel modes (user modes "r" and "w" were missing), e. g.: :a.irc.net 004 a a.irc.net ngircd-15 aiorsw biIklmnoPstv
2009-12-31setsockopt(): use IPPROTO_IP instead of SOL_IP to set IPTOS_LOWDELAYAlexander Barton
2009-12-30ReverseLookup(): fix documentation commentAlexander Barton
2009-12-30Move NewConnection handling from callbacks to New_Connection()Alexander Barton
2009-12-30Connection functions: add some more documentation commentsAlexander Barton
2009-12-30Clean up conn.{c|h} a little bitAlexander Barton
2009-11-07Remove limit on max number of configured irc operators.Florian Westphal
2009-10-17configtest: print ssl config options even when unsetFlorian Westphal
Print "SSLOptionVar =" instead of omitting the option when running --configtest with ssl enabled. This better matches the behaviour of other options, e.g. ChrootDir.
2009-09-30Make sure forwarded CONNECT commands are handled correctlyAlexander Barton
2009-09-30Generate WALLOPS message on operator-generated SQUITAlexander Barton
2009-09-30Enable SQUIT command for IRC OperatorsAlexander Barton
This patch enables IRC Operators to use the SQUIT command as specified in RFC 2812, section 3.1.8 "Squit". When forwarding SQUIT commands, the server connected to the target will drop the connection (not the target server itself!). Please note: - the configuration option "AllowRemoteOper" mus be enabled on the server disconnecting the target to allow forwarding of SQUIT commands. - if the remote server is configured to establish the connection, it will just do this; so the disconnect is not permanent in this case!
2009-09-30Use functions provided by op.c "module"Alexander Barton
Local functions Check_Oper() and No_Privileges() have been replaced by global functions in op.c "module": Op_Check() and Op_NoPrivileges().
2009-09-30New "module" op.c/op.h for IRC operator related functionsAlexander Barton
The new "module" op.c is used to implement functions related to IRC Ops. At the moment, these two functions are available: - Op_Check() to check for a valid IRC Op, and - Op_NoPrivileges() to generate "permission denied" messages.
2009-09-30Allow forwarding of CONNECT commands.Alexander Barton
The syntax of the CONNECT command now is: - CONNECT <server-id> - CONNECT <server-id> <port> - CONNECT <server-id> <port> <target> - CONNECT <server-id> <port> <host> <my-pwd> <peer-pwd> - CONNECT <server-id> <port> <host> <my-pwd> <peer-pwd> <target> Note: the configuration option "AllowRemoteOper" mus be enabled on the target server to allow forwarding of CONNECT commands.
2009-09-30Check_Oper(): check origin of forwarded messages instead of server.Alexander Barton
2009-09-30No_Privileges(): handle forwarded messages.Alexander Barton
2009-09-30IRC_SendWallops(): support format string and variable parameter lists.Alexander Barton
2009-09-30CONNECT, DISCONNECT: generate WALLOPS messagesAlexander Barton
2009-09-30New function IRC_SendWallops().Alexander Barton
Implement new global function IRC_SendWallops() that can be called by other functions to generate WALLOPS messages to users with +w mode.
2009-09-30Code cleanup of IRC_DISCONNECT().Alexander Barton
2009-09-30Code cleanup of IRC_SQUIT() in preparation to deal with bug #73.Alexander Barton
2009-09-30New local functions Check_Oper() and No_Privileges().Alexander Barton
2009-09-30Bad_OperPass(): code cleanup.Alexander Barton
2009-09-30New configuration option "AllowRemoteOper"Alexander Barton
Added new configuration option "AllowRemoteOper" to control whether remote IRC operators are allowed to use administrative commands that affect this server or not This commit introduces the configuration variable, but actually no function is using it. That's up for the next patches to come ...
2009-09-26fix assertion failure in ng_ipaddr.cFlorian Westphal
when building with debugging enabled, but without ipv6 support, ngircd dumped core when loading a config file that specified an ipv6 listen address. ngircd: ng_ipaddr.c:45: ng_ipaddr_init: Assertion `sizeof(*addr) >= res0->ai_addrlen' failed.
2009-09-20configtest: complain when ssl keys are not readableFlorian Westphal
2009-09-14Check for sockaddr_in.sin_len and initialize itAlexander Barton
Test for sockaddr_in.sin_len and initialize it to the correct value which some systems (notably Mac OS X) require. Note: this code path is only relevant when not using getaddrinfo().
2009-09-12Fix cb_connserver() to handle aborted outgoing connectionsAlexander Barton
A configured server could have been removed while a connection apptempt is still in progress. So the cb_connserver() callback has to test if the server configuration record is still valid.
2009-09-11conn.c: fix more sizeof(..dst_addr) misuseFlorian Westphal
the wrong sizeof() usage fixed in d76910ce7b9fad5679b7c614ed086e036560e37d (conn.c: fix resolver server address backlog) was a bit more widespread, fix all others, too.
2009-09-11resolve.c: fix valgrind 'uninitialized memory' warningFlorian Westphal
fix the following warning generated by valgrind if ipv6 is enabled: Syscall param write(buf) points to uninitialised byte(s) at 0x4000982: (within /lib/ld-2.9.so) by 0x80681A8: Resolve_Name (resolve.c:477) by 0x805439F: Conn_Handler (conn.c:1658) by 0x804AA7C: main (ngircd.c:331) The warning is because ng_ipaddr_t can be a union, and only the necessary parts are initialised. The callers know what part of the union is valid, so this is not a bug.
2009-09-11conn.c: fix resolver server address backlogFlorian Westphal
if more than one ip address is returned for a single host name, ngircd is supposed to try other addresses in case connect() to the first address returned fails for some reason. Alexander Barton noticed that this did not work at all, as the additional results were not stored.
2009-09-11Fix "implicit conversion shortens 64-bit value" warningAlexander Barton
This patch fixes the following gcc warning in our sources: "implicit conversion shortens 64-bit value into a 32-bit value"
2009-09-11Channel_Mode(): fix return code of functionAlexander Barton
Fix error handling of Channel_Mode() to return the correct connection status ("connected"/"disconnected") insted of always returning success.