Commit Graph

137 Commits

Author SHA1 Message Date
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
Uli Schlachter 12d9aee507 Makefile: Fix generation of the VERSION_EXTRA flag
When you checkout the znc-1.0 tag and try to build znc, this will fail. The
reason is that "git describe" prints just "znc-1.0" and the sed-magic in the
Makefile fails to handle this correctly.

Fix this by moving this magic into a short shell script which doesn't try to
parse the output of "git describe" but instead gets its information from various
sources directly.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-12-16 18:48:17 +01:00
Uli Schlachter 84ec49780e Get rid of the modpythin jobhack
This exists to fix a problem where the python swig API was generated multiple
times in parallel with "make -j3". This problems turns out to be due to the
multiple target rule that this commit removes. Such a rule doesn't mean "this
commands generate multiple files at once" but means "you can use this command
for each of these targets".

Fix this by including Makefile.gen instead of calling it in its own make
process. That way we don't need this "meta rule" which just calls another
Makefile but can use the "real" rules immediately.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-09-23 12:03:22 +02:00
Alexey Sokolov a9a869488a Fuck those makefiles
It tries to run SWIG for modpython several times simultaneously.
Just force modules to be built in 1 thread for now if modpython is going
to be built.

Makefiles should be thrown away.

Also don't show warning about unused perl, fix #219
2012-09-07 00:44:20 +07:00
Alexey Sokolov 701c0f3576 Show message after installation of znc.service from $srcdir 2012-09-04 08:48:06 +07:00
Alexey Sokolov 3d280b1c58 Merge commit 'refs/pull/183/head' of github.com:znc/znc 2012-09-04 07:41:40 +07:00
Alexey Sokolov f1932b9322 Make post-installation message a bit more visible. 2012-07-26 20:21:49 +07:00
Alexey Sokolov 5b50003f33 Ignore fail of git-describe differently.
Now it doesn't show an error message and still continues.

Thanks to Han` for reporting this.
2012-07-22 17:34:05 +07:00
Alexey Sokolov a131127770 Show commit id in version for git builds. 2012-07-21 23:27:53 +07:00
Kyle Fuller 9be208c242 Drop znc-config, change znc-buildmod so it doesn't need znc-config
This fixes issues where znc-buildmod was grabbing a different ZNC installation
from path.
2012-07-04 22:21:37 +01:00
Alexey Sokolov 1f9b20a938 Rearrange messages to user during installation.
To make installation process more like step-by-step guide.
2012-07-02 13:19:00 +07:00
Wulf C. Krueger 40641b40a4 Add support for --with-systemdsystemunitdir.
--with-systemdsystemunitdir is the usual way to configure the directory
to which any systemd service file gets installed.
2012-06-02 21:48:03 +02:00
Alexey Sokolov 34d0da2097 Make sources to depend on headers again.
Wrong dependency Makefiles were generated since moving core to src/
2012-02-21 19:40:29 +07:00