Commit Graph

701 Commits

Author SHA1 Message Date
Alexey Sokolov e210ade2ef Merge commit 'refs/pull/1205/head' of github.com:znc/znc 2015-12-14 18:03:25 +00:00
Donal Cahill 0a3ef43a2e Fix string comparison. 2015-12-13 23:23:12 +00:00
Donal Cahill 15c200c908 Disallow CIDR /00000 2015-12-13 23:16:58 +00:00
Donal Cahill 2ec724a256 Fix char comparison. 2015-12-13 20:13:19 +00:00
Donal Cahill db7e1ef162 Fix up CIDR code. 2015-12-13 15:36:35 +00:00
Donal Cahill 56c97af14b Improve code quality. 2015-12-13 12:23:08 +00:00
Donal Cahill a5540557ac Fix another memory leak. 2015-12-13 08:10:40 +00:00
Donal Cahill 8748abb525 Try to fix memory leak. 2015-12-13 07:58:04 +00:00
Donal Cahill d6b839ef85 Remove AI_ADDRCONFIG from CIDR IP conversion.
IPv6 tests will fail if AI_ADDRCONFIG is set. It's not really needed.
2015-12-13 07:39:10 +00:00
Donal Cahill b4bb4fa0cd Add support for CIDR notation in allowed hosts list.
Fixes #207
2015-12-13 06:31:51 +00:00
Alexey Sokolov 481fdf64a4 Fix build without SSL 2015-12-10 22:15:46 +00:00
Alexey Sokolov 16a8c77737 Replace virtual with override where possible.
Using clang-tidy
2015-12-08 20:51:50 +00: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 7869de1e0f Decrease max select()/poll() timeout to 5 sec.
With signals on a different thread, select() isn't interrupted anymore.
Probably need to wake up it differently now...
2015-12-06 16:16:29 +00:00
Alexey Sokolov e3da51cfaa Add comment
[skip ci]
2015-12-06 14:39:41 +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 85700bdee3 Add a comment for #820 and #1012 2015-12-05 18:04:32 +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 569f057561 Call CTCP callback for actions too, as it was before switch to CMessage.
Partyline had both of callbacks, one of which is redundant.

Fix #1134
Fix #1190
2015-11-29 00:59:50 +00:00
Dylan Lloyd dcd259778a support separate SSLKeyFile & SSLDHParamFile configuration 2015-11-25 17:00:23 -08:00
Alexey Sokolov 11b19a63f1 Fix behavior of HALTCORE and HALTMODS for On*BufferPlayLine after introduction of CMessage. 2015-11-22 23:36:03 +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 0d8bb7e597 Merge branch '1.6.x'
Conflicts:
	modules/cyrusauth.cpp
	modules/keepnick.cpp
	modules/notes.cpp
2015-10-30 14:56:28 +00:00
Alexey Sokolov c8edabb035 Fix memory leak when reading invalid znc.conf
Found by https://scan.coverity.com/
2015-10-30 14:36:01 +00:00
John Reese 9aff0cd566 See #1147: show new server name when jumping
This updates the connect command in *status to retrieve the next server
object before triggering the jump, thereby allowing it to display the
next server's name rather than a generic message.
2015-10-25 12:41:00 -07:00
Alexey Sokolov 933aa6db0c Add some more tests and fix a bug which sometimes blocked login of users.
This bug wasn't released yet.
cc @jpnurmi
2015-10-18 23:22:32 +01:00
Alexey Sokolov f3762e8b05 Use termios instead of deprecated getpass().
Also this fixes flaky integration test. Sometimes it hanged because
getpass() sometimes didn't want to believe that it already got the
password from input.
2015-10-16 23:33:11 +01:00
Alexey Sokolov 44bbde35ee Revert "Fix #1147: show new server name when jumping" 2015-10-15 08:38:02 +01:00
Alexey Sokolov e57f6460a1 Merge pull request #1149 from jreese/server-details
Fix #1147: show new server name when jumping
2015-10-15 08:33:58 +01:00
Alexey Sokolov 87a921d87a Merge pull request #1139 from Zarthus/expandstring-network
Expandstring network, alphabeticize expandstring list
2015-10-15 08:31:50 +01:00
John Reese 5f79f2d01f Fix #1147: show new server name when jumping
This updates the connect command in *status to retrieve the next server
object before triggering the jump, thereby allowing it to display the
next server's name rather than a generic message.
2015-10-12 16:27:01 -07:00
Jos Ahrens 2c8baa8193 ExpandString %network%, alphabeticize ExpandString list 2015-10-08 21:39:02 +02:00
Alexey Sokolov 0750e529c5 Don't print anything from signal handler.
Thread sanitizer doesn't like that.
2015-10-03 19:29:01 +01:00
Jos Ahrens 2031a82a77 Remove 'ok' from bootup
ZNC previously sent 'ok' on a new line every time a process went alright in CUtils::PrintStatus

No longer is this the case! ZNC now remains silent when everything is going well.
2015-09-25 13:11:33 +02:00
J-P Nurmi 3cb2834cc5 Fix STATUSMSG buffering 2015-09-21 15:41:20 +02:00
J-P Nurmi c83a41ce89 CClient: message handlers 2015-09-20 23:22:03 +02:00
J-P Nurmi 4d3b47f2b1 Refactor CClient::ReadLine() to take advantage of CMessage::Type 2015-09-20 23:22:03 +02:00
J-P Nurmi 0c6215df9e CClient: use CModeMessage 2015-09-20 23:22:03 +02:00
J-P Nurmi 658db6bbe6 Make CMessage::ToString() use GetParams()
Avoids having the same loop in two places.

GetParams() was under consideration to be removed after the CMessage
porting work is done, but it's starting to look like it's here to stay.
There are cases, such as mode messages, where "get all params starting
from position N" is handy.
2015-09-20 23:22:03 +02:00
J-P Nurmi ecb9b21055 Move message tags related code from CUtils to CMessage 2015-09-20 23:22:03 +02:00
J-P Nurmi 7d10ad2625 CBuffer: add CMessage-based API 2015-09-20 23:22:03 +02:00
J-P Nurmi cbd860c2a9 Add CMessage::Equals()
Compares sender, command, and parameters. Not timestamp nor tags.
2015-09-20 23:22:02 +02:00
J-P Nurmi dce6d4f0ea Make CClient::PutClient() handle multi-prefix 2015-09-20 23:22:02 +02:00