When a DNS thread is done with its lookup, instead of existing immediately, it
now waits for another DNS lookup to do instead. This avoids the cost of
starting/stopping threads all the time.
To make sure that (for whatever reason) the number of waiting threads doesn't
get too high, threads exit if there are more than two DNS threads idling around
with nothing to do.
Fixes#132.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Drop support for c-ares. Though Csocket still supports it, ZNC's
configure script doesn't enable it anymore.
This should fix big brokenness of c-ares library, which tried to
connect via IPv6 even when IPv6 is disabled on the system.
Also should fix github issue #37
Since this creates a new user, and then clones it. It would clear all
the networks. To fix this, I have made an option bCloneNetworks to
CUser::Clone. This replaces the bCloneChans because this is unnessecery
now.
Fixes#88
This commit does the following:
- Do not segfault on rehash
- Delete CIRCNetwork's when they are removed from config
- Update to the configs nick/altnick/realname/ident
Buflines need to know which part of text to wrap with the timestamp. The
second parameter to `AddLine` (and shorthands) is that text, which after
wrapping is added as the `text` parameter to `NamedFormat`.
Timestamps are formatted at the moment buffers are flushed to the
client. The client parameter to `GetLine` provides access to the User
and the new server-time capability.
This is in preparation of adding more attributes to a CBufLine. Going
forward, at least savebuf will need access to all of these to properly
serialize buffers.
Basically, instead of relying on `GetLine()` to return `false`, the
caller is now expected to check bounds himself using `Size()`.
UpdateModule has been moved to CZNC because it doesn't really fit into
CUser. The new UpdateModule will reload the module for global modules,
user modules and network modules.
Fixes#69
The result of CIRCNetwork::IsUserOnline() will only show clients which
do not have the away state set. This value is not set from the IRC
command AWAY, but a future module could use this behaviour.
Some CIRCNetwork::IsUserAttached() checks are now moved into of
CIRCNetwork::IsUserOnline() checks.
This allows "away" clients to store buffer even if KeepBuffer is false.