Commit Graph

407 Commits

Author SHA1 Message Date
Alexey Sokolov 80c24b335d Update a comment 2017-02-25 12:13:24 +00:00
Alexey Sokolov a44aa0c699 Revert tables to how they were in 1.4
See #914
2017-02-24 23:49:18 +00:00
Alexey Sokolov 2fcde9f2e1 Fix a couple of issues pointed out by https://scan.coverity.com/ 2016-12-26 17:22:09 +00:00
Alexey Sokolov b666931883 Add an option to change ping timeout time.
Fix #979
2016-12-26 15:49:26 +00:00
Alexey Sokolov d9c1da8a68 Make it possible to translate arguments in help text of module commands
Ref #1354
2016-12-25 21:11:02 +00:00
Alexey Sokolov a1e1591ba5 Add another layer of indirection for translation
To make supporting old modules easier

Ref #1354
2016-12-25 20:31:17 +00:00
Alexey Sokolov c803a85e13 Rename new On...Message modules callbacks to be more consistent.
OnPrivMessage -> OnPrivTextMessage
OnChanMessage -> OnChanTextMessage

Fix #1191
2016-12-25 15:48:29 +00:00
Alexey Sokolov 6fbab7b44c Add CIDR support to TrustedProxy setting
Fix #1219
2016-12-25 13:00:02 +00:00
Alexey Sokolov 13049e5fc3 Refactor the way how modules are loaded.
Make version checks more strict.

This finishes attempt to preserve ABI between patch versions. That
didn't work well, and the people who could make it work, left the
project already.

Close #1255
Close #1274
Close #172
2016-12-22 20:49:01 +00:00
Alexey Sokolov 5c524df298 Merge branch '1.6.x' 2016-11-20 18:09:55 +00:00
Alexey Sokolov 6366430870 Fix deletion of users which are connecting.
Close #1342
2016-11-20 17:56:26 +00:00
Latchezar Tzvetkoff a9a7f17910 Allow modules to override CSRF protection.
Useful for Web APIs and all other kinds of things.

API changes:
	- Added public CHTTPSock::GetURI() method
	- Added public CModule::ValidateWebRequestCSRFCheck() method
	- Made CWebSock::GetCSRFCheck() method public so it can be accessed
	  from CModule
	- Added public CWebSock::ValidateCSRFCheck() method

Other changes:
	- Added a Sample Web API module (modules/samplewebapi.cpp) and a
	  simple web form with no CSRF check.

Implements feature request #1180.
2016-10-05 09:29:40 +01:00
Alexey Sokolov 222ae86fcc Fix newest additions to keepnick module and write the test for it.
Fix the documentation.

See #1324 and #1325
2016-10-05 09:21:21 +01:00
Jos Ahrens b6ffaa6527 Message.h: Add a comment briefly explaining how to use the class, and what exactly a message is. 2016-10-02 00:21:58 +01:00
Alexey Sokolov cc653efb6b Rename translation methods to be not one letter.
It fixes several warnings, when the name was shadowed by a local "p".
2016-09-12 00:01:45 +01:00
Alexey Sokolov 85984ee4be Merge pull request #1277 from xnrand/master
Add network-specific settings for cert validation
2016-08-20 12:08:41 +01:00
Alexey Sokolov aff7e25043 Fix cygwin build
(cherry picked from commit f1ef8c79db)
2016-08-13 09:55:00 +01:00
Alexey Sokolov f1ef8c79db Fix cygwin build 2016-07-20 00:19:19 +01:00
Tor Arne Vestbø 4d5724eb0a Add OnPrivBufferStarting/Ending signals, similar to Chan buffers
Allows hooking into query buffer playback before and after all the
lines of the query buffer are replayed. The EModRet return value
has no effect at the moment, but may be used in the future to e.g.
prevent playback. The Chan version of these signals use EModRet to
skip emitting the status message, but not the whole playback.
2016-07-13 15:15:56 +02:00
Tor Arne Vestbø 02bfb9eaf5 Centralize logic to get current server time
A few different implementations of computing the current time were
spread out through the code base, most of them using gettimeofday().

This centralizes the logic in CUtil::GetTime() for easier maintenance,
and also allows all call sites to get the benefit of the clock_gettime()
code path on systems that support it.
2016-07-06 01:16:15 +02:00
xnrand 409ed4b6bc Add network-specific config for cert validation
Added the following two network-specific configuration options that can
be changed via controlpanel or webadmin:

* TrustAllCerts: Will trust ALL certificates when enabled, effectively
  disabling TLS certificate validation.
  Default value: false
* TrustPKI: Whether or not to trust PKI-valid certificates. Setting this
  to false will make znc trust only trusted certificates added by the
  user.
  Default value: true

With default values, behavior is exactly the same as before.

This is based on the work of Roelf Wichertjes. See YourBNC/znc@5c747598.

See znc/znc#866.
2016-05-20 01:17:26 +02:00
Adam 6bde0fc270 Add config write delay setting 2016-03-26 13:34:02 -04:00
Alexey Sokolov 8893b90e3a Modules web subpages should have translateable titles 2016-02-24 21:31:38 +00:00
Alexey Sokolov e5ff36eb8e Revert version to 1.6.x after release of 1.6.3 2016-02-23 21:37:38 +00:00
Alexey Sokolov b49a92b1e6 ZNC 1.6.3-rc1 2016-02-08 21:18:12 +00:00
Alexey Sokolov 8eeeaf71a0 Add framework for translating ZNC to different languages 2016-01-31 20:09:19 +00:00
Alexey Sokolov 561a18054c Yet another attempt to use CMake 2016-01-15 10:50:33 +00:00
Alexey Sokolov 1f226d2ade Add test for #1229 and actually fix it. 2016-01-09 18:00:47 +00:00
Alexey Sokolov 4fe4a45dd6 Disable legacy encoding mode when modpython is loaded.
Python is not happy when using non-unicode text as str.

Fix #1229
2016-01-09 14:18:24 +00:00
Ondřej Nový 6881ca5b8f Fixed few misspellings 2016-01-05 20:45:08 +01:00
Falk Seidel 8f73840e74 Welcome to 2016
🎆  Happy 2016 🎆
2016-01-01 20:11:21 +01:00
Alexey Sokolov 79e979e5cd Fix tabs/spaces inside comments 2015-12-07 01:07:45 +00:00
Alexey Sokolov d185d6f22d clang-format: switch tabs to spaces
I like tabs, but I have to admit that spaces make source code more
consistent, because every editor/viewer tends to render tabs differently :(
2015-12-07 00:53:30 +00:00
Alexey Sokolov 3861b6a583 Fix several comments broken by clang-format 2015-12-07 00:53:01 +00:00
Alexey Sokolov 33b0627d75 Add clang-format configuration.
For now, it uses tabs like before, to make the diff easier to read/check.
One of following commits will switch it to spaces.
2015-12-07 00:53:01 +00:00
Alexey Sokolov 582cd635f5 Fix --disable-tdns (thanks kerio) 2015-12-06 12:36:16 +00:00
Alexey Sokolov d45743e0a2 Merge pull request #1174 from DarthGandalf/thread
Rework signal handling and use C++11 threads.
2015-12-06 00:53:58 +00:00
Alexey Sokolov 9c48119897 Use C++11 threads instead of custom pthread wrappers.
Signal handling of CThread was handled in previous commit.
2015-12-06 00:11:15 +00:00
Alexey Sokolov dfa94d6bc1 Move Unix signal processing to a dedicated thread. 2015-12-06 00:10:06 +00:00
Alexey Sokolov 52a4548d51 Fix style a bit. 2015-12-05 17:54:23 +00:00
Adam 47f887ce43 Add SNI client support
Close #1200
2015-12-05 17:48:13 +00:00
Alexey Sokolov bee266a08e Fix test after fixing #1190 2015-11-29 12:26:17 +00:00
Alexey Sokolov 45f661e496 Merge pull request #1192 from nospampleasemam/support-separate-sslkeyfile
support for separate SSLKeyFile configuration
2015-11-27 01:38:45 +00:00
Alexey Sokolov b7aff7f7ea Don't bump compiler requirements from GCC 4.7 to GCC 4.8 yet.
Fix #1189
2015-11-26 14:02:15 +00:00
Dylan Lloyd dcd259778a support separate SSLKeyFile & SSLDHParamFile configuration 2015-11-25 17:00:23 -08:00
Alexey Sokolov cbf5c38d0a Teach modperl and modpython about CMessage and new hooks which accept it.
Fix #1084
Fix #1085
2015-11-22 23:39:30 +00:00
Alexey Sokolov 103ed00861 Move Message assertions to special cast operators.
Don't use static_cast directly anymore, but use these operators.
2015-11-21 12:13:54 +00:00
Alexey Sokolov f33809585f Move Message sizes asserts to their definitions, and add missing ones. 2015-11-21 10:50:52 +00:00
Alexey Sokolov c283d7a07b Fix include guard of Message.h 2015-11-21 10:35:03 +00:00
Alexey Sokolov e2d313d3ba Revert version changes after releasing 1.6.2 to 1.6.x 2015-11-15 17:59:43 +00:00