Commit Graph

3478 Commits

Author SHA1 Message Date
Alexey Sokolov a36cc030c0 Merge pull request #651 from znc/revert-612-opensslthreads
Revert "Initialize OpenSSL locking functions"
2014-09-04 06:24:17 +01:00
Alexey Sokolov 487ff9acc4 Revert "Initialize OpenSSL locking functions" 2014-09-04 06:13:15 +01:00
Alexey Sokolov 7274340b26 Merge pull request #612 from BtbN/opensslthreads
Initialize OpenSSL locking functions
2014-09-04 00:23:50 +01:00
Alexey Sokolov 6621b81d4c Merge pull request #650 from jpnurmi/indentation
makeconf: fix indentation of LoadModule lines
2014-09-04 00:12:57 +01:00
J-P Nurmi c087355c48 makeconf: fix indentation of LoadModule lines
7387f00 missed the tabs
2014-09-03 23:47:06 +02:00
Uli Schlachter 0908023a63 Merge pull request #635 from maksqwe/fix_state
bouncedcc: Fix test for "Connected" state
2014-08-20 10:28:36 +02:00
Maks Naumov 42b0a794d9 bouncedcc: Fix test for "Connected" state 2014-08-20 11:16:34 +03:00
Alexey Sokolov acaf44f7d5 Merge pull request #630 from jpnurmi/delchan
controlpanel: make delchan support wildcards (resolves #609)
2014-08-18 21:41:05 +01:00
J-P Nurmi e48fe0a4fc controlpanel: make delchan support wildcards (resolves #609) 2014-08-18 22:27:06 +02:00
Alexey Sokolov c5e69fa199 Merge pull request #626 from jpnurmi/makeconf
Get rid of the module questions during --makeconf (#541)
2014-08-18 20:40:42 +01: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 700c899698 Fix build on cygwin after switch to -std=c++11 2014-08-14 00:17:13 +01:00
Alexey Sokolov 2f9b8f9f52 Fix build on MacOSX.
std::bind conflicted with ::bind
Patch to csocket is already upstream.
2014-08-12 00:20:18 +01:00
Alexey Sokolov 3f87b2fdae Merge pull request #618 from DarthGandalf/cxx11
Enable C++11.
2014-08-11 21:36:56 +01:00
Alexey Sokolov 3db0c0bc40 Merge pull request #627 from jpnurmi/overwrite
Make --makeconf warn early about an existing config (#572)
2014-08-11 21:18:10 +01:00
Alexey Sokolov 1f89b67a88 Enable C++11.
It bumps requirements for SWIG to 3.0.0, and for compiler.
2014-08-11 21:13:53 +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
Alexey Sokolov bfbdac2de3 Fix travis mail in commits to docs. 2014-08-11 20:50:08 +01:00
J-P Nurmi fb0dcc0dd9 Make --makeconf warn early about an existing config (#572) 2014-08-11 10:37:26 +02:00
Uli Schlachter e0e86e8b02 CThreadPool::cancelJobs(): Add a comment explaining the logic a bit
Signed-off-by: Uli Schlachter <psychon@znc.in>
2014-08-11 09:09:38 +02:00
Uli Schlachter 74fdd97a52 CJob: Even cancel finished jobs
When a job was cancelled after its runThread() method finished, but before the
main thread noticed this and reacted, we would just run runMain() before and
pretend the job finished normally.

However, with CModuleJob this means that runMain() might get called for a module
which is currently being destructed. This has bad effects with virtual functions
and thus causes problems. It's better to just really cancel the job instead.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2014-08-11 09:09:38 +02:00
Alexey Sokolov f2f3edb9e1 travis: Use only 3 cores, not all of them.
There's no enough memory for so big parallelism:
https://travis-ci.org/znc/znc/builds/32185840
2014-08-11 08:08:35 +01:00
Alexey Sokolov 2aecdf0be2 Merge pull request #622 from Mkaysi/master
.travis.yml: use more CPUs for compiling
2014-08-10 17:40:56 +01:00
Mikaela Suomalainen 6a1af6bf89 .travis.yml: use more CPUs for compiling 2014-08-10 16:01:14 +03:00
Alexey Sokolov da378afe85 Merge pull request #619 from jpnurmi/cchan-sendbuffer
Fix CChan::SendBuffer()
2014-08-09 09:07:29 +01:00
J-P Nurmi f238a24190 Fix CChan::SendBuffer()
The CChan::SendBuffer(CClient,CBuffer) overload should just playback
the given buffer and obviously not clear the channel's own buffer
=> auto-clear the buffer in CChan::SendBuffer(CClient) as appropriate.
2014-08-08 23:36:21 +02:00
Alexey Sokolov 83a25c5355 Merge pull request #598 from jpnurmi/query
Full-fledged query buffers
2014-08-07 20:44:11 +01:00
Uli Schlachter 5a6224d2b4 sample: Add an example for CModuleJob
Signed-off-by: Uli Schlachter <psychon@znc.in>
2014-08-06 23:31:26 +02: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 0fddbba230 CThreadPool: Fix a race when starting threads
There was a race where threads were themselves responsible for increasing the
counter for the number of running threads. This left an open window where the
thread was already started, but our counter was not yet increased. The effect of
this race would be that we start more threads than we should.

Fix this by increasing the counter before actually starting new worker threads.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2014-08-06 15:20:12 +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 970b802073 modpython, modperl: Parse all headers
Signed-off-by: Uli Schlachter <psychon@znc.in>
2014-08-06 14:50:59 +02: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
Uli Schlachter d4fefd1888 StringTest: Make a local function static
Signed-off-by: Uli Schlachter <psychon@znc.in>
2014-08-06 14:50:58 +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 287a020d21 savebuff: handle query buffers 2014-08-04 10:04:22 +02:00
J-P Nurmi 46bd6b05b2 clearbufferonmsg: handle query buffers 2014-08-04 10:04:22 +02:00
J-P Nurmi 2d532fb8b9 webadmin: add support for AutoClearQueryBuffer & MaxQueries 2014-08-04 10:04:21 +02:00
J-P Nurmi 5bed1e537c controlpanel: add support for AutoClearQueryBuffer & MaxQueries 2014-08-04 10:04:21 +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 e97a3ce9d0 Merge pull request #611 from NuclearW/awaystore-timestamp
Add timestamp parsing to awaystore away messages
2014-08-01 22:40:43 +01:00
BtbN 62e13457a9 Initialize OpenSSL locking functions 2014-07-31 10:03:22 +02:00
NuclearW 6aaf3ba96a Add timestamp parsing to awaystore away messages
Pass the given reason through CUtils::FormatTime before setting it, allows use of strftime formatting in away messages.
2014-07-29 11:17:17 -04:00
Alexey Sokolov 8a5e7ef8ed Merge pull request #600 from NuclearW/route-reply
Add numerics 307 and 379 to route_replies for whois
2014-07-23 22:40:40 +01:00
NuclearW 658252948a Add numerics 307 and 379 to route_replies for whois
UnrealIRCd (at least version Unreal3.2.10+) sends numerics 307 and 379 on whois if the client is an IRCop.
These are non-rfc and they can be seen documented here: https://www.alien.net.au/irc/irc2numerics.html
2014-07-21 18:58:00 -04:00
Alexey Sokolov b1b3888231 Merge pull request #590 from FruitieX/master
Use only lower case characters in log filenames
2014-07-21 23:14:24 +01:00
Rasmus Eskola 9670d0bdc0 make the log filename lower case always
this fixes an annoying bug where two separate log files will be written
if an irc client sends to channel #Foobar and another irc client sends
to channel #foobar.
2014-07-22 00:50:54 +03:00
Alexey Sokolov 67122090ae Merge pull request #599 from NuclearW/awaystore-action
In awaystore, store CTCP ACTIONs
2014-07-21 22:47:40 +01:00
NuclearW 3bf9350769 Store CTCP ACTIONs recieved as well as normal PRIVMSGs.
Prepends CTCP ACTION messages recieved with a "* " before storing them.
Additionally change AddMessage to accept const CString&
2014-07-21 17:24:03 -04:00