Commit Graph

384 Commits

Author SHA1 Message Date
J-P Nurmi
9a8786377b Update Csocket to aefa339
> Support ECDHE exchange if available in OpenSSL
> add openssl's fix for POODLE bug in server mode.
> Give Csocket consumers the ability to disable less desirable protocols
2014-10-26 11:53:18 +01:00
J-P Nurmi
ba64324a39 Introduce patch level version number for bug fix releases
The patch level version number is ignored in module and config
version compatibility checks. Radically simplified, bug fix
releases shall not touch the headers nor change the config file.
2014-10-20 07:45:58 +02:00
J-P Nurmi
c424bd7aca CChan: keep track of the state
Make CChan keep track of the channel key, and schedule saving of the
config file when appropriate. This is more robust than trying to do
it from within the chansaver module.
2014-10-20 07:11:38 +02:00
J-P Nurmi
206c149f48 Scheduling of quiet vs. verbose config saving
Rename the current ECONFIG_NEED_WRITE to ECONFIG_NEED_VERBOSE_WRITE
as it always broadcasts the result for SIGUSR1, even on success.
Keep ECONFIG_NEED_WRITE for cases where the config should be written
without a notification of success.
2014-10-20 06:55:02 +02:00
Alexey Sokolov
a888d38511 Merge pull request #704 from jpnurmi/joindelay
Configurable join delay
2014-10-19 23:57:22 +01:00
J-P Nurmi
2286291d6b Add CUser::LoadModule() helper
Makes it easier to retry loading replacement modules when
loading retired modules fail.
2014-10-18 12:11:26 +02:00
J-P Nurmi
78a0331daa CIRCNetwork: add support for join delay (resolves #586) 2014-10-15 22:24:39 +02:00
J-P Nurmi
eaf2d737d7 Add CIRCNetwork::LoadModule() helper
Makes it easier to retry loading replacement modules when
loading retired modules fail.
2014-10-14 22:17:52 +02:00
J-P Nurmi
ef4caae6d1 const correctness fixes 2014-10-03 09:14:12 +02:00
J-P Nurmi
4fe249280e Fix GetClients() const correctness
It’s dangerous to give a non-const reference to an internal
container that the API users are not supposed to modify.
2014-10-03 09:11:03 +02:00
J-P Nurmi
705e79f808 Remove redundant CWebSocket::GetModule()
CWebSocket inherits CSocket::GetModule()
2014-10-03 09:11:03 +02:00
J-P Nurmi
f67acdc7a3 cleanup superfluous semi-colons 2014-10-03 09:10:49 +02:00
J-P Nurmi
d98094f564 Update Csocket to 71dac61
Csocket has received a bunch of const correctness fixes. Notice that
the signature of one virtual method, Csock::ConvertAddress(), has
changed => CZNCSock has been updated accordingly.
2014-10-02 19:51:41 +02:00
Alexey Sokolov
213c3839a8 Merge pull request #693 from jpnurmi/tags
Valueless & escaped message tags
2014-09-29 23:53:55 +01:00
Alexey Sokolov
0b22831958 Merge pull request #681 from jpnurmi/setuservars
Fix #680 - make channels follow user-level settings when appropriate
2014-09-29 23:46:38 +01:00
J-P Nurmi
6457bd6dc1 Fix #680 - make channels follow user-level settings when appropriate 2014-09-30 00:34:01 +02:00
J-P Nurmi
e20ac1a31e Add CString::Contains() for convenience
This is more convenient and readable than comparing Find() to npos,
which is a common task:

$ git grep "find(" | grep "npos" | wc -l
49
2014-09-30 00:15:34 +02:00
J-P Nurmi
5507e9a290 Add CString::Find() with case sensitivity support 2014-09-30 00:15:22 +02:00
J-P Nurmi
92c9a2e6ae Escape message tag values (ref #684) 2014-09-30 00:02:22 +02:00
J-P Nurmi
65f739980d CString::Starts/EndsWith(): allow specifying case sensitivity 2014-09-29 16:41:07 +02:00
J-P Nurmi
e86f43d841 Introduce CaseSensitivity enum class
The enum is a bit more verbose, but leads to more readable code:

str.Equals("foo", true)
// vs.
str.Equals("foo", CString::CaseSensitive)

Deprecate the old Equals() and leave out the length parameter
from the new version => use StartsWith() or StrCmp() instead.
2014-09-29 16:30:45 +02:00
Alexey Sokolov
227f2cfb29 Merge pull request #678 from NuclearW/batch-playback
Add ircv3.2 batch and batch channel and query buffer playback.
2014-09-28 21:37:38 +01:00
NuclearW
73b6936d6d Add ircv3.2 batch and batch channel and query buffer playback. 2014-09-28 14:57:06 -04:00
NuclearW
be27831bf1 Correct documentation for OnUnknownUserRaw 2014-09-28 00:44:30 -04:00
J-P Nurmi
fb99593f75 Allow network specific quit messages (resolves #273) 2014-09-13 23:40:22 +02:00
Uli Schlachter
62328b2c96 CSmartPtr: Remove, superseded by std::shared_ptr
Signed-off-by: Uli Schlachter <psychon@znc.in>
2014-09-12 15:25:57 +02:00
Uli Schlachter
7704bc49d7 client auth: Switch from CSmartPtr to std::shared_ptr
Signed-off-by: Uli Schlachter <psychon@znc.in>
2014-09-12 15:12:46 +02:00
Uli Schlachter
3953185b04 WebModules: Switch from CSmartPtr to std::shared_ptr
Signed-off-by: Uli Schlachter <psychon@znc.in>
2014-09-12 14:55:42 +02:00
Uli Schlachter
67d22c8e42 CTemplate: Switch from CSmartPtr to std::shared_ptr
Signed-off-by: Uli Schlachter <psychon@znc.in>
2014-09-12 14:47:47 +02:00
J-P Nurmi
c73c75181e Update Csocket to 88c633a
The unused m_bBLOCK variable has been cleaned up,
no longer causing a compile time warning.
2014-09-08 22:23:00 +02:00
Alexey Sokolov
8ec2a0940c Merge pull request #629 from jpnurmi/help
Revise *status and *controlpanel help output
2014-09-07 16:24:49 +01:00
J-P Nurmi
2e42f3103c Fix #624: Can´t rename network via webinterface 2014-09-06 23:15:50 +02:00
J-P Nurmi
aec99ea213 Revise *status help output
Make it possible to output help for given command(s) and align
casing & arguments in general help & command specific usage output.
2014-09-06 21:14:35 +02:00
J-P Nurmi
7387f00408 Get rid of the module questions during --makeconf
The following modules are enabled by default:
- global: webadmin
- user: controlpanel, chansaver
- network: simple_away

This reduces a lot makeconf noise and fixes #541.
2014-08-17 15:37:50 +02:00
Alexey Sokolov
f464066088 Merge pull request #616 from psychon/module-jobs2
Add support for CJob cancellation and necessary module support
2014-08-11 21:09:57 +01:00
Uli Schlachter
308df21511 Modules: Add a module version of CJob
Signed-off-by: Uli Schlachter <psychon@znc.in>
2014-08-06 15:32:41 +02:00
Uli Schlachter
1d67e87d90 CThreadPool: Add cancellation support
This adds CThreadPool::cancelJob() and cancelJobs() which can cancel a set of
jobs synchronously. These functions only return when the job was successfully
cancelled.

It tries to cancel the jobs as quickly as possible, skipping any callbacks on
CJob that were not yet called. A job that is already running can use
CJob::wasCancelled() to check if it should quit.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2014-08-06 15:15:57 +02:00
Uli Schlachter
6118ad5345 Threads.h: Add some doxygen comments
Signed-off-by: Uli Schlachter <psychon@znc.in>
2014-08-06 14:50:59 +02:00
Uli Schlachter
d128b41844 Threads: Add some undefined constructors etc
This is needed to "get rid" of the C++ default implementation. Yes, I know that
this can be done way nicer with C++11...

Signed-off-by: Uli Schlachter <psychon@znc.in>
2014-08-06 14:50:58 +02:00
J-P Nurmi
14a534c953 Full-fledged query buffers
Store query buffers per query the same way it's done for channels.

This allows clients to implement persistent query buffers. Queries
remain open across clients and sessions until a client explicitly
sends a command to clear a (closed) query buffer.

A new config option AutoClearQueryBuffer that default to false
ensures behavioral backwards compatibility, and another config
MaxQueries protects from OOM eg. due to PM attacks.
2014-08-04 10:04:21 +02:00
Uli Schlachter
680935723f Fix typo in last commit
Thanks to drbean for reporting this in FreeNode/#znc.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2014-07-14 15:56:03 +02:00
Uli Schlachter
ba11b8eecf Less magic numbers for timeout settings
Currently the connection timeout handling of znc uses three magic numbers, each
of which is at least repeated in two unrelated places. This commits defines the
numbers in CIRCNetwork and makes the other places just use this number.

This also renames PING_TIMEOUT to PING_FREQUENCY because I feel that describes
this constant better.

I am not really happy about the name NO_TRAFFIC_TIMEOUT that is used for the
real timeout, but I couldn't think of a better name. PING_TIMEOUT isn't good
because that sounds like the time between sending a PING and the resulting
timeout.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2014-07-14 15:33:36 +02:00
Alexander Færøy
2521d64a1c Add PING_TIMEOUT constant to CIRCNetwork 2014-06-18 21:04:20 +02:00
Alexander Færøy
299f3aa637 Split CUserTimer into CIRCNetworkPingTimer and CIRCNetworkJoinTimer
This patch splits CUserTimer into two other timers:

CIRCNetworkPingTimer: This timer sends PING messages to connected
client's and IRC servers.

CIRCNetworkJoinTimer: This timer enforces the MaxJoin setting by only
allowing a specified amount of channels to join at the same time.

JoinChans() is modified to reset the ping timer once we hit the MaxJoin.
This allows us to call it from any function without breaking the timing
logic.
2014-06-18 21:04:20 +02:00
Alexey Sokolov
93d2eec4db Update Csocket to ef6bcb9d5c1aecd778c5a57604eabdcb5e1ee06e 2014-06-17 23:22:16 +01:00
Alexey Sokolov
a3f4f1ebd9 Merge commit 'refs/pull/557/head' of github.com:znc/znc 2014-06-01 21:06:25 +01:00
Vasily Fomin
4338ae5cc5 Show empty checkbox if module can be loaded by the topic column.
Fix const correctnes of the CModInfo::SupportsType method.
2014-06-01 21:37:39 +02:00
Alexander Færøy
db0e0995e2 Add OnJoining module hook.
This patch adds an OnJoining module hook that allows a module to allow
or disallow joining any given channel.
2014-05-29 23:10:30 +02:00
Kyle Fuller
ed7119b5bc Update to latest version of Csocket
Fixes #536
2014-04-24 19:28:37 +01:00
Kyle Fuller
5e90bc380b [Csocket] Support and default to TLSv1.2
Updates to 21ac28cc29e9256a21a9aa217e29638360c266d0 of Csocket
2014-04-20 23:35:29 +01:00