Commit Graph

149 Commits

Author SHA1 Message Date
Alexey Sokolov 561a18054c Yet another attempt to use CMake 2016-01-15 10:50:33 +00:00
Alexey Sokolov d13742b132 Add test for znc-buildmod 2016-01-09 22:01:33 +00:00
Alexey Sokolov c1595d0c19 Int test: run executable from installation dir instead of source 2016-01-09 20:47:00 +00:00
Donal Cahill b4bb4fa0cd Add support for CIDR notation in allowed hosts list.
Fixes #207
2015-12-13 06:31:51 +00:00
Patrick Griffis be60ebb4b7 Fix bindir in service file 2015-11-15 18:26:15 -05:00
Alexey Sokolov 90ae78533f Rewrite integration test.
Pexpect was failing too often, even when starting a new process.
Now the test is using Qt and C++.

Fix #772
2015-10-17 15:27:18 +01:00
Alexey Sokolov 8f598273f9 Test: launch ZNC on a config created during --makeconf and connect. 2015-10-03 21:38:18 +01:00
J-P Nurmi 565d04a8ef Resolve 'make test' warnings
Fix our own, and hide csocket, gtest & gmock related.
2015-09-21 15:41:20 +02:00
J-P Nurmi 7d10ad2625 CBuffer: add CMessage-based API 2015-09-20 23:22:03 +02:00
J-P Nurmi 75ee9cec62 Add QueryTest 2015-09-10 01:44:06 +02:00
J-P Nurmi b3bb6fb5db GTest: force the simple internal regex engine...
...to get consistent behavior on all platforms.
2015-09-10 01:44:06 +02:00
J-P Nurmi f71a0a213e Add IRCSockTest 2015-09-07 00:00:28 +02:00
Alexey Sokolov 6f40e5ddca Import latest gtest to third_party to be able to use gmock 2015-09-06 21:42:37 +01:00
Alexey Sokolov 1cc4626226 Add a test for --makeconf 2015-09-04 20:32:13 +01:00
J-P Nurmi 94055c1c82 Add ModulesTest
Just a simple unit test for CModules that checks that the legacy hooks
get called and any modifications flow back to the original CMessage
object as appropriate.
2015-08-31 00:24:30 +02:00
Alexey Sokolov ceb1c5ec27 Move test which requires modules to be installed to a separate target 2015-08-27 23:05:08 +01:00
Alexey Sokolov c8a89ec432 Open modules during make test. 2015-08-27 00:16:35 +01:00
Alexey Sokolov e93b029a3a Link modules against libznc.dll.a on cygwin instead of cygznc-1.7.dll, as it's being built now anyway. 2015-08-22 13:05:57 +01:00
Alexey Sokolov 4aba9fed17 Fix znc-buildmod on cygwin when installed to not /usr
1. Use import library, so don't require -L/bin anymore
2. Move -lznc from LDFLAGS to LIBS
3. Fix variables in znc-buildmod. It worked before only because
   ${exec_prefix} was resolving to empty string, and /bin == /usr/bin on
   cygwin.
2015-08-22 12:42:28 +01:00
Alexey Sokolov 786d94fbe4 Install Csocket.h even when building out of tree 2015-08-22 12:39:47 +01:00
J-P Nurmi a06bf1c985 Introduce a Message type (#506) 2015-08-15 12:26:16 +02:00
Alexey Sokolov c336ef5ec2 Cygwin: Rename libznc.dll to cygznc-1.7.dll
https://cygwin.com/ml/cygwin-apps/2015-07/msg00108.html
2015-07-19 13:49:18 +01:00
Alexey Sokolov da279f9622 Setup continuous testing on cygwin using AppVeyor 2015-05-04 10:17:58 +01:00
J-P Nurmi 7345a6ee3a Fix CIRCNetwork::FindChans() and FindQueries() to be case-insensitive
The playback module failed to clear a buffer, because it tried to
clear "NickServ" whereas ZNC had internally stored it has "nickserv".
2015-02-19 08:45:58 +01:00
Uli Schlachter 2f058fcc80 Remove zncconfig.h in distclean
See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=712254

Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-02-16 23:52:27 +01:00
Alexey Sokolov ce1543c5ed Warn about outdated csocket submodule 2015-01-04 11:26:07 +00:00
Alexey Sokolov ffd1352f76 Advise how to use git submodules 2015-01-04 00:14:18 +00:00
Alexey Sokolov 9166e6ed40 Move Csocket to git submodule 2015-01-03 12:45:12 +00:00
Alexey Sokolov 4442af724f Validate TLS certificate of IRC server.
Fix #156
2014-11-29 14:25:15 +00:00
J-P Nurmi 8d77faa260 Allow clients to specify an ID via PASS or USER
- PASS [user[@identifier][/network]:]password
- USER user[@identifier][/network] ...

NOTE: There's a slight ambiguosity with the '@' character, which happens
to be a valid character in usernames, but also acts as a marker for the
identifier. Therefore, '@' is considered as part of the username if it's
followed by non-word characters (as in an email address), otherwise as
a marker for an identifier.

This is only an enabler for #343. The rest can be done with modules:
- managing client ID specific playback buffers
- filtering channels based on the client ID

The reason this should be part of ZNC core is that only global modules
have access to OnUnknownUserRaw(), which is needed to capture USER/PASS.
First of all, the aforementioned modules shouldn't be global. Furthermore,
it would be possible to have only one module that parsed and removed the
client ID so that ZNC core woulnd't choke.
2014-11-04 00:42:28 +01:00
J-P Nurmi 8fdf51dfeb Fix CNick::Parse()
If the mask started with ':', the following '!' was included to nick.
2014-11-01 13:17:32 +01: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 0e057702db Add a ThreadTest to the testsuite
Signed-off-by: Uli Schlachter <psychon@znc.in>
2014-08-06 14:50:59 +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
Alexey Sokolov 90b4c88276 Use make-tarball.sh for nightlies too 2014-04-21 10:55:55 +01:00
Alexey Sokolov 5237e89bc3 Fix message tags parser and add test of it 2014-03-03 22:35:56 +00:00
Alexey Sokolov 0696a6ed23 Cleanup old tests (pre-gtest) 2014-03-03 21:38:18 +00:00
Alexey Sokolov 1790778417 Add ./configure --with-gtest=/path/to/gtest
The specified dir is expected to contain files DIR/src/gtest-all.cc and
DIR/src/gtest_main.cc

This is to make Debian happy, because make test doesn't require internet
access anymore.
2013-11-17 20:03:24 +04:00
Alexey Sokolov cc279666de Pregenerate version.cpp in release tarballs 2013-10-20 19:36:16 +04:00
Alexey Sokolov 6aaf0770f3 Remove test .o files on make clean 2013-10-20 17:52:04 +04:00
Alexey Sokolov 91c07d5af1 Fix tests on cygwin
Thanks to KindOne for reporting it
2013-10-14 20:27:27 +04:00
Alexey Sokolov 256be59ffe Test CConfig too 2013-10-13 21:00:44 +04:00
Alexey Sokolov 257e681036 Rename EscapeTest to StringTest 2013-10-13 21:00:43 +04:00
Alexey Sokolov 627b53b494 Fix test, make travis output more verbose 2013-10-05 23:50:28 +04:00
Alexey Sokolov e13bfa1110 Use gtest for EscapeTest 2013-10-05 23:30:27 +04:00
Alexey Sokolov 46e9e20a52 "make clean" removes .depend/ 2013-08-18 15:10:12 +04:00
Alexey Sokolov bbde9ab464 Fix git version in nightlies 2013-04-01 21:05:01 +07:00
Uli Schlachter 3a7dc7aa73 Don't ever try to overwrite /usr/bin/git
Previously, version.sh got the path to git as its first and only argument. Since
the previous commit, this is not the path to src/version.cpp and the second
argument is the path to git.

However, let's assume someone does "git pull && make". They still have the old
Makefile laying around, which will pass the path to git as the first argument to
version.sh. Thus, this will overwrite /usr/bin/git with some generated source
code. Whoops.

Thanks to KindOne for reporting this problem!

Signed-off-by: Uli Schlachter <psychon@znc.in>
2013-03-31 20:38:51 +02:00
Uli Schlachter 58a34fa5ad Improve the way that VERSION_EXTRA is calculated
Instead of doing magic with the result from version.sh so that we can add a
preprocessor macro, the script now just writes src/version.cpp with the expected
content. This should fix all the various issues that we have with quoting the
arguments and things that go wrong when not building znc from a git clone.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2013-03-31 19:32:44 +02:00
Uli Schlachter 75f2e3fa41 Add a generic threads abstraction
This should make it easier to work with threads. It provides classes for mutexes
and condition variables. Additionally, there is a special CMutexGuard that
automatically unlocks the mutex on destruction and a CThreadPool class.

This thread pool is used to replace the thread pool in the sockets code.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2013-03-15 11:58:22 +01:00