Commit Graph

482 Commits

Author SHA1 Message Date
Alexey Sokolov e61ee6096f Merge pull request #907 from jpnurmi/weffc++
Use member initialization lists [-Weffc++] (#270)
2015-03-01 12:58:50 -08:00
J-P Nurmi 1d09b41540 Last batch of C++11 range-based for loops (#816) 2015-03-01 21:36:28 +01:00
J-P Nurmi bb36d40580 CIRCNetwork: use member initialization list [-Weffc++] (#270) 2015-03-01 16:03:59 +01:00
J-P Nurmi 21dc83e58f CUser: use member initialization list [-Weffc++] (#270) 2015-03-01 16:03:59 +01:00
J-P Nurmi 3a951b2b6d CZNC: use member initialization list [-Weffc++] (#270) 2015-03-01 16:03:59 +01:00
J-P Nurmi 1d2650d450 Use member initialization lists [-Weffc++] (#270) 2015-03-01 15:00:10 +01:00
J-P Nurmi 05c96a16d1 Merge remote-tracking branch 'origin/1.6.x' 2015-03-01 09:19:01 +01:00
Alexey Sokolov 56f8d8eb76 Merge pull request #906 from jpnurmi/weffc++
Use member initialization lists [-Weffc++] (#270)
2015-02-28 20:29:08 -08:00
J-P Nurmi 6a6bb648d1 Use member initialization lists [-Weffc++] (#270) 2015-02-28 21:59:01 +01:00
J-P Nurmi 2b0c6e595b Restore CIRCNetwork::ClearQueryBuffer() for convenience
Originally removed when query buffers were introduced in 14a534c.
The ideal name would be plural ClearQueryBuffers() now that there
are multiple query buffers, but use the old name for compatibility
reasons (see https://github.com/kylef/znc-contrib/pull/18).
2015-02-28 20:56:02 +01:00
Alexey Sokolov 2b8e3f997f Merge pull request #883 from jpnurmi/clearallbuffers
Add CLEARALLBUFFERS command (closes #852)
2015-02-26 21:42:55 -08:00
Alexey Sokolov e9294e4c81 Merge pull request #898 from jpnurmi/nullptr
Search'n'replace remaining NULL occurrences (#816)
2015-02-26 21:18:37 -08:00
Alexey Sokolov f139171933 Merge pull request #892 from jpnurmi/for-loops
More C++11 range-based for loops
2015-02-26 21:15:38 -08:00
J-P Nurmi 75b210e841 Search'n'replace remaining NULL occurrences (#816) 2015-02-26 20:58:01 +01:00
J-P Nurmi b6f04d4b83 CIRCNetwork: C++11 range-based for loops 2015-02-26 11:54:21 +01:00
J-P Nurmi fd97557ec8 CIRCSock: C++11 range-based for loops 2015-02-26 11:54:21 +01:00
J-P Nurmi b0ddd5082e CZNC: C++11 range-based for loops 2015-02-26 11:53:42 +01:00
J-P Nurmi 284aa1b5b6 CUtils: C++11 range-based for loops 2015-02-26 09:31:55 +01:00
J-P Nurmi 5a338d91cb CHTTPSock: C++11 range-based for loops 2015-02-26 09:31:35 +01:00
J-P Nurmi 36823da403 CTemplate: C++11 range-based for loops 2015-02-26 09:31:18 +01:00
J-P Nurmi 36a03ce29f Fix dead assign/init found by clang static analyzer
Value stored to 'pUser' (during its initialization) is never read
2015-02-26 08:32:49 +01:00
Alexey Sokolov 0794e602a7 Merge pull request #889 from jpnurmi/c++11
Replace some C++98isms with C++11isms (#816)
2015-02-25 22:00:06 -08:00
J-P Nurmi 84e289cc76 CUser: C++11 range-based for loops 2015-02-26 00:17:46 +01:00
J-P Nurmi 6002bd5c2b Remove unnecessary virtual keyword occurrences
This makes it convenient to 'grep virtual' and 'grep override' :)
2015-02-25 18:33:09 +01:00
J-P Nurmi 4935ef4d26 Fix compilation warning when HAVE_LIBSSL is not defined
Building core object Socket...
    src/Socket.cpp:30:16: warning: unused function 'ZNC_DefaultCipher' [-Wunused-function]
    static CString ZNC_DefaultCipher() {
                   ^
    1 warning generated.
2015-02-25 09:36:56 +01:00
J-P Nurmi ef9939e1ec Add override (#816)
Changes applied by 'clang-modernize -add-override [...]'
2015-02-25 09:24:00 +01:00
J-P Nurmi 70c0ffb10b Use nullptr (#816)
Changes applied by 'clang-modernize -use-nullptr [...]'
2015-02-25 09:20:20 +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
J-P Nurmi 616690f269 Add CLEARALLBUFFERS command (closes #852) 2015-02-23 22:24:47 +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