psychon [Fri, 6 Feb 2009 16:29:29 +0000 (16:29 +0000)]
Some fixes to the kqueue socket engine
The old code choked badly if a socket which was !eh->Readable() was added
(it went into an endless loop where kqueue would keep reporting that socket
for writeability).
This also fixes a bug where DelFd() failed to clean up properly which caused
the next AddFd() for an identical fd number to fail.
Oh and this also adds some error messages and does some minor cleanup...
w00t [Wed, 4 Feb 2009 13:13:36 +0000 (13:13 +0000)]
Document <connect deny> before <connect allow>, as tags are read top-down. Also document the order they are read in. Fixes bug #698, reported by Ankit.
w00t [Wed, 4 Feb 2009 13:07:43 +0000 (13:07 +0000)]
Prioritize nicklock before nickflood, so nickflood does not erroneously count changes that nicklock blocks. Fixes bug #687, reported by Ankit.
TODO: split OnUserPreNick into OnCanChangeNick, to determine whether or not a user may strictly change nick or not?
w00t [Wed, 4 Feb 2009 12:50:19 +0000 (12:50 +0000)]
Allow SANICK, SVSNICK, NICKLOCK, etc to override +bN N:. Fixes bug #607 and #644, reported by SnoFox and others. Based on patch by Phoenix in bug #702. Thanks!
brain [Sat, 31 Jan 2009 15:59:11 +0000 (15:59 +0000)]
Fix for bug #695. For now, we cant be sure what parts of the code might still use empty nick to signify a server, so lets just avoid messing with it until 1.2+1 and use this simple workaround instead.
brain [Sat, 31 Jan 2009 15:46:53 +0000 (15:46 +0000)]
We already have an error for not enough params to the SERVER command, but the error is 'missing SID'. This error can be seen in snomask +l and is sent as ERROR to the connection. Changed to 'Not enough parameters for SERVER command', fixes bug #661
dz [Wed, 28 Jan 2009 02:42:29 +0000 (02:42 +0000)]
Make xline expiry messages a bit clearer that the xline may have expired a while ago, and give the correct time since they were set instead of the duration.
psychon [Tue, 27 Jan 2009 18:37:23 +0000 (18:37 +0000)]
Fix the poll socketengine to actually work.
The old implementation tried to use holes for unused entries in the array for
poll() and the OS replied with POLLNVAL to which we replied with 100% CPU.
Improvements:
- It does compile!
- It works
w00t [Sun, 25 Jan 2009 19:57:07 +0000 (19:57 +0000)]
This can't be case sensitive because it's not consistant, and also would break having two extbans of differing case but same letter on the same mask (+bb m:f M:f). Also found courtesy of Jason.
dz [Sun, 25 Jan 2009 03:59:36 +0000 (03:59 +0000)]
Properly check if the SSL handshake is completed in m_ssl_gnutls, fixes the recent issue where connections would hang with nothing recieved on either end until registration timeout. Also reverts r10998.
brain [Fri, 23 Jan 2009 13:20:57 +0000 (13:20 +0000)]
Fix m_nationalchars using a copy and paste of my unsafe copy and paste algorithm, that will lock up if the string to replace contains the string to search for.
Finally make this function a core utility function and remove the copies from 3 modules m_alias m_nationalchars and m_sqlauth
brain [Thu, 22 Jan 2009 17:39:50 +0000 (17:39 +0000)]
Fix for bug found by danieldg, where remote nicks were truncated to NICKMAX, but NICKMAX can now vary from server to server,
so only truncate the nickname for local nicknames. For remote nicknames, allow any length nickname up to MAXBUF (the max length
of an IRC line)
w00t [Thu, 22 Jan 2009 15:14:22 +0000 (15:14 +0000)]
Fixes bug #655: National characters support, patch written mostly by Phoenix, bits of core support by myself. This means that nicknames using *non ASCII* are now supported when configured, and more importantly, that /msg lowercasenick will go to a person with UPPERCASENICK in foreign character sets. The locale setting MUST be the same network-wide.
w00t [Thu, 22 Jan 2009 15:02:37 +0000 (15:02 +0000)]
Fix bug #659, #524 and others: Allow operoverride to set +qa. Based on patch by Phoenix. Note that this is currently untested, feedback is very welcome.
w00t [Sun, 18 Jan 2009 12:19:01 +0000 (12:19 +0000)]
Fix what should have been the (real) problems with kqueue, so far so good for me.. this *does* need more testing though. Fix spotted by dz (check .filter, not .flags, and don't try to use it as a bitmask). TOR, ratbox, and similar projects use code like this, so I am fairly confident it is ok.
w00t [Sun, 18 Jan 2009 12:19:00 +0000 (12:19 +0000)]
Revert "Revert some of w00ts kqueue massacre from september, for some reason its not too stable, e.g. placing wantwrite sockets into oneshot wantread? :P"
brain [Wed, 14 Jan 2009 18:45:03 +0000 (18:45 +0000)]
Revert some of w00ts kqueue massacre from september, for some reason its not too stable, e.g. placing wantwrite sockets into oneshot wantread? :P
randomly uses 100% cpu with the newer code, seems kqueue doesnt quite like to work exactly the same as epoll and poll.
Fixed behavior of KICK in m_auditorium, fixes bug #649 reported by Schiz0.
Also replaced usage of Channel::WriteAllExcept() with WriteAllExceptSender()
as the former does not except the sender and requires an extra unused variable.
brain [Fri, 2 Jan 2009 23:15:09 +0000 (23:15 +0000)]
If a module is loaded after m_spanningtree that it needs, then it will now re-read its configuration file. The code is also now in the right place to pick this up on rehash too not just on load.
brain [Wed, 31 Dec 2008 13:00:01 +0000 (13:00 +0000)]
Change numeric 671, starttls failure to 691. 671 conflicts with unreal's ssl user numeric. It's documented on our wiki as 'kineircd' but kineircd was never even realeased, so we cant go on that, we'll go with what the unreal numeric says.
brain [Sun, 28 Dec 2008 22:18:49 +0000 (22:18 +0000)]
Fix bug spotted by KingTarquin, if an empty string is given to /stats with "STATS :", then a byte of undefined memory in a std::string object is read as the stats char. Probably unsafe.
w00t [Sun, 28 Dec 2008 03:27:28 +0000 (03:27 +0000)]
Change a few bits to use std::list instead of std::vector.
Vector is better than list, unless:
- you require random access (these don't)
- you require that the memory they are stored in are contiguous (these don't)
This will save a couple of bytes here and there perhaps (along with
much less problems with memory fragmentation and allocation).
w00t [Sat, 27 Dec 2008 03:18:51 +0000 (03:18 +0000)]
Place CRT debug defines in win32wrapper.h, so they are defined everywhere. This was also incorrectly inside an ifndef WINDOWS, and hadbeen for a while. (oops.)
brain [Sat, 27 Dec 2008 02:41:12 +0000 (02:41 +0000)]
Cover most of the included oper commands in the default examples of class tags, so that less users are confused about missing commands from the defaults