cmd_invite Check if the inviting user is on the channel before potentially telling him the target is already on it
cmd_stats List opers without iterating the whole userlist
Fix LUSERS not working in a PURE_STATIC build
Don't attempt to unload or reload modules that are waiting to be unloaded
Remove some uline checks that ran after an IS_LOCAL() check
m_spanningtree Create new TreeServers for incoming connections only when they've accepted our credentials, not when they send SERVER
Fix ModuleManager error caused by a lack of arguments.
Merge pull request #484 from SaberUK/insp20+fix-modulemanager

Fix ModuleManager error caused by a lack of arguments.
Do not enable SO_LINGER on our sockets

Using this option allowed close() to block for up to a second

Thanks to Shamsdeen and Rix for their assistance that made this fix possible

Fixes issue #445 reported by @shaggie76
Fixes issue #494 reported by @Rixcho
Close listening sockets regardless of the return value of shutdown()
m_kicknorejoin Minor improvements

- Ignore remote users
- Remove expired items in one pass
m_kicknorejoin Limit time to 30m by default

In the current implementation we only expire entries when someone joins, without a limit it was possible to make us practically never remove entries and consume (a tiny amount of) memory for each entry until the mode was removed/parameter was changed

The default limit of 30m is chosen to not surprise people when they upgrade. If you need to prevent rejoins for more than a minute then you should set a (timed)ban instead

Config option is available to change the limit (2.0 only)
m_kicknorejoin Store and compare uuids instead pointers

Fixes the off chance scenario where we disallow a join because a previously kicked user has quit and the User who is trying to join happens to be allocated at the exact same memory location
Fix m_ssl_gnutls and perhaps some other things on Windows by recognizing WSAEWOULDBLOCK
Fix Windows build
m_callerid Fix bookkeeping error introduced when unserializing callerid_data

This also fixes a memory leak that didn't occur naturally but was triggerable by remote servers

Thanks to @SimosNap for the report
m_callerid Ignore duplicate entries when unserializing callerid_data
m_spanningtree Fix IS_LOCAL() check in OnRehash handler
Fix building with libc++.

- Purged std::tr1::strlower (was never used).
- Moved std::tr1::insensitive to irc::insensitive.
- Added TR1NS macro to point to the correct C++ TR1 namespace.
m_callerid Allow messaging yourself while +g regardless of the ACCEPT list