Commit Graph

455 Commits

Author SHA1 Message Date
J-P Nurmi
84e289cc76 CUser: C++11 range-based for loops 2015-02-26 00:17:46 +01:00
J-P Nurmi
21a04c3b98 CWebModules: C++11 range-based for loops 2015-02-25 07:58:37 +01:00
J-P Nurmi
6084990163 CModules: C++11 range-based for loops 2015-02-25 07:58:37 +01:00
J-P Nurmi
0485aa8033 CClient: C++11 range-based for loops 2015-02-25 07:58:37 +01:00
Alexey Sokolov
9e966513c8 Merge pull request #882 from jpnurmi/for-loops
ClientCommand: C++11 range-based for loops
2015-02-24 07:42:27 -08:00
J-P Nurmi
728108913c ClientCommand: C++11 range-based for loops 2015-02-24 09:27:06 +01:00
ManiacTwister
27d78795a7 Also strip controls from private messages 2015-02-23 22:15:01 +01:00
ManiacTwister
f27109f1b4 Implemented StripControls for channel messages and notices 2015-02-23 22:14:58 +01:00
Alexey Sokolov
962cb945eb Merge pull request #869 from jpnurmi/wildcmp
CString::WildCmp(): add an optional case-sensitivity argument
2015-02-23 00:05:25 -08:00
J-P Nurmi
afaf255246 CString::WildCmp(): add an optional case-sensitivity argument
It's getting a common pattern to call AsLower() or MakeLower() on
the arguments passed to WildCmp(), we might as well add this for
convenience. It's tempting to make it case-insensitive by default,
since pretty much any IRC related comparison should be, but that
could potentially break some existing code.
2015-02-23 08:45:52 +01:00
OGAWA Hirofumi
c6d093a53a Change to return the value from OnUserQuit() as request 2015-02-22 04:33:15 +09:00
OGAWA Hirofumi
feec20b013 Add OnUserQuit() for extending clearbufferonmsg
Add OnUserQuit() callback. On smartphone, user doesn't want to see
same lines repeatedly. But, meanwhile, user doesn't want to miss lines
when connection was lost.

To do it, this uses OnUserQuit() callback. With this callback,
clearbufferonmsg can clear buffer if user quited client explicitly.
And when connection was lost, buffer is still not cleared.
2015-02-22 04:33:14 +09:00
J-P Nurmi
c0abef2c00 Merge remote-tracking branch 'origin/1.6' 2015-02-19 09:37:47 +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
5f9ad5cc87 SSLVerifyHost: Make some functions static
These functions shouldn't be visible outside of this file. This was caught by
-Werror=missing-declarations.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-02-19 08:39:22 +01:00
Uli Schlachter
fd34f84bfd ~CThreadPool(): Handle spurious wakeups
From pthread_cond_wait()'s man page:

  When using condition variables there is always a boolean predicate involving
  shared variables associated with each condition wait that is true if the
  thread should proceed. Spurious wakeups from the pthread_cond_wait() or
  pthread_cond_timedwait() functions may occur. Since the return from
  pthread_cond_wait() or pthread_cond_timedwait() does not imply anything about
  the value of this predicate, the predicate should be re-evaluated upon such
  return.

Fix ~CThreadPool() to account for this possibility.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-02-19 08:38:28 +01:00
J-P Nurmi
00b1a7eedf Use CString::StartsWith()
Replace the use of deprecated CString::Equals(str,bool,int) by
CString::StartsWith(str,cs) which is more pleasant to read.
2015-02-18 00:42:25 +01:00
J-P Nurmi
7680421053 Fix #840 - channel hopping/cycling
A regression caused by aed1d61.
2015-02-02 10:41:13 +01:00
Alexey Sokolov
d4a36aaa93 Fix crash in znc --version, caused by latest commits.
Fix #838
2015-02-01 15:36:31 +00:00
Alexey Sokolov
ff88f24494 Merge branch 'version' 2015-02-01 09:23:41 +00:00
Alexey Sokolov
cf6ec5646b Add ZNC to CTCP VERSION reply even if client is connected.
Previously, it replied to CTCP VERSION, but only if no client is connected.

See https://github.com/znc/znc/issues/820#issuecomment-70506203
2015-01-31 10:01:27 +00:00
Alexey Sokolov
f9a4507669 Add a global setting whether to show ZNC version or not
Close #820
Close #821
2015-01-30 23:01:06 +00:00
Alexey Sokolov
cbbd18cc6b Merge pull request #823 from Zarthus/pass-patch
Tell user to use PASS <username>/<network> instead of just the username.
2015-01-26 23:13:16 +00:00
OGAWA Hirofumi
b8dcb5f706 Don't polling to wait the exit of threads in CThreadPool destructor
All values are protected by m_mutex. So we don't need the polling to
wait m_num_threads==0 with wakeups, instead simply use CConditionVariable.
2015-01-25 21:55:42 +09:00
Jos
26e466c677 More detailed instructions on how to connect to ZNC when not yet logged in.
The message now mentions you should configure your client to automatically log you in, and also lets you know how to connect to a specific network.
2015-01-25 10:25:13 +01:00
Jos
35b5525cc1 Tell user to use PASS <username>/<network> instead of just the username.
In versions prior to 1.0, ZNC did not allow multiple networks per user. The string telling users to connect has never been changed after ZNC 1.0, and this fixes just that.
2015-01-24 11:40:51 +01:00
Alexey Sokolov
94f2b4dc97 Don't expose ZNC version in CTCP VERSION.
Thanks to Mikaela for finding this.
See #818
2015-01-18 08:15:34 +00:00
Alexey Sokolov
38353a67d7 Remove message which should be removed before release 2015-01-18 00:00:15 +00:00
J-P Nurmi
045f7752cb savebuff: save & load query buffers - fixes #802
The old internal storage format was:

    ::__:SAVEBUFF:__::<buffer lines>

The new storage format for channels:

    ::__:CHANBUFF:__::<buffer name>
    <buffer lines>

The new storage format for queries:

    ::__:QUERYBUFF:__::<buffer name>
    <buffer lines>

See #802 for details why the storage format had to be changed. Reading
the old storage format is still supported so old saved buffers load as
appropriate.
2015-01-16 21:13:44 +01:00
Alexey Sokolov
600f91f128 Fix implicit context of OnSendTo* hooks
Thanks for markus-j for reporting it
2015-01-11 17:08:00 +00:00
Alexey Sokolov
9166e6ed40 Move Csocket to git submodule 2015-01-03 12:45:12 +00:00
Edoardo Spadolini
507f9b3392 Follow SSL Cipher Server Preference 2015-01-02 23:40:15 +01:00
Edoardo Spadolini
cac9da4951 Update Csocket to 0119a006bdfb6223a1a86d48b02efee87d11b721 2015-01-02 23:36:36 +01:00
Falk Seidel
2e29d49a53 Welcome to 2015 2014-12-31 11:28:38 +01:00
Alexey Sokolov
a0ec20b110 Fix HTTP basic auth.
It looks like it was broken since we implemented cookies...
2014-12-30 21:35:39 +00:00
Alexey Sokolov
d56621f9f6 Fix modperl startup 2014-12-25 16:36:55 +00:00
Mikaela Suomalainen
963ecf6753 src/Utils.cpp: don't lie to --makepem
I removed C, ST, L and O as certificate would be fine with just CN too
and the other variables are get from environment correctly.
2014-12-23 11:31:27 +02:00
Alexey Sokolov
60367fb2bf Provide DH parameters in --makepem 2014-12-23 09:02:22 +00:00
Alexey Sokolov
5c72c8232f Show fingerprints with colons 2014-12-23 00:58:59 +00:00
Alexey Sokolov
72ca970731 Make default ciphers a bit better 2014-12-23 00:57:59 +00:00
Alexey Sokolov
012bb6e134 Make self-signed cert with SHA-256 in --makepem 2014-12-23 00:55:39 +00:00
Alexey Sokolov
2aa6c7e1d9 Merge pull request #775 from DarthGandalf/table
Wrap lines in CTable
2014-12-22 15:18:15 +00:00
Alexey Sokolov
79d33925c4 Update Csocket to f3267e4cb21ba5b83c15da75f52706253817ddab
* Fix SSL crash. Thanks to kerio for reporting it.
2014-12-22 15:08:50 +00:00
Alexey Sokolov
8930fc4d7a Don't break IRC control characters in some encodings
Fix #577
2014-12-21 17:09:59 +00:00
Alexey Sokolov
bd9450b99e Webadmin: Add GUI for character encoding 2014-12-21 17:08:41 +00:00
Alexey Sokolov
86e5ca3fd3 Update Csocket to 7c9c6ef676818457a952c2bda478ce7e27a928bf
* Add encoding mode which reads UTF-8 and something else, but sends UTF-8
* Expose encoding conversion error callbacks to subclasses
2014-12-21 17:07:29 +00:00
James Taylor
6720eec669 Update Csocket to jimloco/Csocket@09b6430dba
Fixes build failures under musl, an alternative libc, due to
incompatibilities with GLIBC specific code. Also fixes Issue #776
2014-12-18 11:31:32 +00:00
Alexey Sokolov
606ed8312d Wrap lines in CTable
See #743
2014-12-17 15:03:39 +00:00
Alexey Sokolov
2ee19fd415 Make wording of JumpNetwork's help a bit clealer 2014-12-16 21:59:30 +00:00
Alexey Sokolov
4a5fddce7e Fix typo in comment 2014-12-15 15:52:51 +00:00