Commit Graph

77 Commits

Author SHA1 Message Date
J-P Nurmi
1fb321703d Add away-notify support - close #315 2015-07-05 13:33:27 +02:00
Alexey Sokolov
2f65dbbc64 Integrate disconkick module to core.
Fix #968
2015-06-04 22:02:39 +01:00
Alexey Sokolov
8552ca0ff9 Bump accepted line length to 2048
To allow message tags and still have some buffer for cases
when server sends too long lines

Related to #971
2015-06-04 08:05:15 +01:00
J-P Nurmi
5aa8b0dcef Fix copy ctor/assignment oper warnings of -Weffc++ (#270) 2015-03-07 21:54:33 +01:00
J-P Nurmi
a5b4a29c00 Revert StripControls implementation (#850)
This reverts commits 27d78795a7 and
f27109f1b4. It was decided that the
functionality is provided by a separate module instead, to avoid
unnecessarily bloating the core.
2015-03-04 09:50:00 +01:00
J-P Nurmi
1d2650d450 Use member initialization lists [-Weffc++] (#270) 2015-03-01 15:00:10 +01:00
J-P Nurmi
6a6bb648d1 Use member initialization lists [-Weffc++] (#270) 2015-02-28 21:59:01 +01: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
J-P Nurmi
75b210e841 Search'n'replace remaining NULL occurrences (#816) 2015-02-26 20:58:01 +01:00
J-P Nurmi
fd97557ec8 CIRCSock: C++11 range-based for loops 2015-02-26 11:54:21 +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
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
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
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
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
Alexey Sokolov
600f91f128 Fix implicit context of OnSendTo* hooks
Thanks for markus-j for reporting it
2015-01-11 17:08:00 +00:00
Falk Seidel
2e29d49a53 Welcome to 2015 2014-12-31 11:28:38 +01:00
Alexey Sokolov
5c72c8232f Show fingerprints with colons 2014-12-23 00:58:59 +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
60ec923d1f Fix calculation of SSL fingerprints 2014-12-14 09:58:00 +00:00
Alexey Sokolov
4442af724f Validate TLS certificate of IRC server.
Fix #156
2014-11-29 14:25:15 +00:00
J-P Nurmi
78a0331daa CIRCNetwork: add support for join delay (resolves #586) 2014-10-15 22:24:39 +02:00
J-P Nurmi
4fe249280e Fix GetClients() const correctness
It’s dangerous to give a non-const reference to an internal
container that the API users are not supposed to modify.
2014-10-03 09:11:03 +02:00
J-P Nurmi
fb99593f75 Allow network specific quit messages (resolves #273) 2014-09-13 23:40:22 +02:00
J-P Nurmi
6d08bc60cf Fix #664: Custom CTCP will leak the real reply 2014-09-13 12:58:10 +02:00
J-P Nurmi
e6a7bbab75 Fix #631: ZNC fails at finding an available nick name 2014-08-19 18:15:26 +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
Uli Schlachter
ba11b8eecf Less magic numbers for timeout settings
Currently the connection timeout handling of znc uses three magic numbers, each
of which is at least repeated in two unrelated places. This commits defines the
numbers in CIRCNetwork and makes the other places just use this number.

This also renames PING_TIMEOUT to PING_FREQUENCY because I feel that describes
this constant better.

I am not really happy about the name NO_TRAFFIC_TIMEOUT that is used for the
real timeout, but I couldn't think of a better name. PING_TIMEOUT isn't good
because that sounds like the time between sending a PING and the resulting
timeout.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2014-07-14 15:33:36 +02:00
Alexander Færøy
1e9e029227 Start joining channels as soon as we are connected 2014-06-18 21:04:20 +02:00
J-P Nurmi
76bfa99dd0 Add module hooks for raw client and server messages 2014-03-04 00:24:15 +01:00
Alexey Sokolov
c0a5ecb40b Add support for character encodings
Previous commit added support of it to Csocket.
When encoding is specified, core will convert incoming messages to UTF-8,
and outgoing messages from UTF-8.
When no encoding is specified, it will do nothing to bytes, like before.
This is to be changed somewhere in future, to have UTF-8 on wire by
default too.
When encoding's name starts with *, incoming messages will be treated as
UTF-8, if it is already correct UTF-8. Otherwise, it's converted.

Fix #151
Fix #366
2014-01-25 13:50:07 +00:00
Falk Seidel
f19b4caa43 Welcome to 2014 - year 10 with ZNC 2013-12-31 10:10:55 +01:00
Toon Schoenmakers
98ceafb1ba Replaced the GetNick().Equals() with NickEquals() where possible
Signed-off-by: Toon Schoenmakers <nighteyes1993@gmail.com>
2013-10-10 22:35:49 +02:00
Toon Schoenmakers
9166f5a250 Renamed IsNick to NickEquals
Also added a TODO to add proper IRC case comparing.

Signed-off-by: Toon Schoenmakers <nighteyes1993@gmail.com>
2013-10-10 18:36:03 +02:00
Toon Schoenmakers
83b9a28e4c Implemented a nick compare function
As suggested by the todos in IRCSock, added IsNick(CString) method
so the ugly Nick.GetNick().Equals(GetNick()) could be simplified.

Signed-off-by: Toon Schoenmakers <nighteyes1993@gmail.com>
2013-10-10 17:22:16 +02:00
Alexey Sokolov
d5e03cb736 Fix support for /msg @#chan :hi
005 STATUSMSG defines list of characters prependable to channel name,
but we used simple modes instead.

See
https://tools.ietf.org/html/draft-brocklesby-irc-isupport-03#section-3.16

Fix #272

Thanks to grawity for the link to 005 docs draft, and to carrot for
testing the patch.
2013-08-29 22:31:25 +04:00
Alexey Sokolov
b2dcad5fd4 Change ZNC license to Apache 2.0
The following people agreed with the change, in alphabetical order:
(people who approved in several ways are listed only once)
By email:
- Adam (from Anope)
- Austin Morton
- Brian Campbell
- Christian Walde
- Daniel Holbert
- Daniel Wallace
- Falk Seidel
- Heiko Hund
- Ingmar Runge
- Jim Hull
- Kyle Fuller
- Lee Aylward
- Martin Martimeo
- Matt Harper
- Michael J Edgar
- Michael Ziegler
- Nick Bebout
- Paul Driver
- Perry Nguyen
- Philippe (cycomate)
- Reuben Morais
- Roland Hieber
- Sebastian Ramacher
- Stefan Rado
- Stéphan Kochen
- Thomas Ward
- Toon Schoenmakers
- Veit Wahlich
- Wulf C. Krueger

By IRC:
- CNU
- Jonas Gorski
- Joshua M. Clulow
- Prozac/SHiZNO
- SilverLeo
- Uli Schlachter

At https://github.com/znc/znc/issues/311 :
- Alexey Sokolov
- Elizabeth Myers
- flakes
- Jens-Andre Koch
- Jyzee
- KindOne/ineedalifetoday
- Lee Williams
- Mantas Mikulėnas
- md-5
- Reed Loden

At the last few pull requests' comments:
- Allan Odgaard
- Jacob Baines
- Lluís Batlle i Rossell
- ravomavain
- protomouse

The following commits' authors didn't respond:
Trivial changes:
- f70f1086fd
- 4ca8b50e45

The changes which are not presented in master anymore:
- 5512ed2ea0
- 960a4498f7
- 0f739de2c0
- 7f53cc810b

Fix #311
Fix #218
2013-06-14 00:43:34 +04:00
Uli Schlachter
999cc085d2 Revert "Add 381 to the buffer (You are now an IRC Operator)"
This reverts commit 11e5f7636d.

Having this in the raw buffer multiple times is obviously wrong, because you can
use /oper more than once and would get a new 381 numeric each time. So this
would need to use UpdateRawBuffer() instead of AddRawBuffer() (=replace old
entries with the same text).

However, this is still wrong. If you -o yourself, you no longer have oper
status. ZNC wouldn't notice this and still deliver the 381 numeric to new
clients.

Clients which use raw 381 to detect oper status will have to switch to user mode
+o.

Thanks to Han` for reporting this problem.
2013-05-14 18:30:40 +02:00
Uli Schlachter
9b23ee60b8 Debug: Only print queued lines if they are really just queued
Previously, every line that was forwarded to the IRCd was printed twice in debug
mode. Once when it got added to the send queue and a second time when it was
actually sent. However, most of the time this queue is empty and thus the two
events happened at approximately the same time.

Thus, this patch now changes the debug output. Lines are only printed extra if
they really have to wait in the queue for a while before they can be sent out.

This has the positive effect of making the debug output more readable, because
it is shorter and less repetitive and it makes it more obvious when znc actively
throttles the traffic that is sent out.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2013-05-07 20:59:38 +02:00
KindOne
2db7307ac3 Remove unneeded headers. 2013-03-08 01:47:57 +07:00
Un1matr1x
3a34593359 The same procedure as last year, Miss sophie?
Same procedure as every year, James.
2012-12-31 12:44:31 +01:00
Alexey Sokolov
412bdb7869 Fix my fix which was supposed to fix #220
Thanks to KindOne for reporting the issue with that fix.

363 numeric was sent twice to the client for attached channels.
2012-12-25 00:28:10 +07:00
Alexey Sokolov
ebf9aebf51 Fix detached 363 too 2012-12-20 22:12:21 +07:00
Alexey Sokolov
deb38b060e Check detachedness of chans. Fix #220 2012-12-08 23:22:02 +07:00
Alexey Sokolov
978e3b7832 Fix a typo and user modes.
Thanks to KindOne for noticing it.
2012-11-22 01:32:58 +07:00
Kyle Fuller
67299ebfa8 Fix a bunch of conversion warnings #197 2012-08-14 19:31:14 +07:00
Kyle Fuller
7c1e41acc7 Don't replace our motd with a different servers motd
Fixes #167
2012-08-12 22:22:19 +07:00