Commit Graph

102 Commits

Author SHA1 Message Date
Alexey Sokolov
33b0627d75 Add clang-format configuration.
For now, it uses tabs like before, to make the diff easier to read/check.
One of following commits will switch it to spaces.
2015-12-07 00:53:01 +00:00
Alexey Sokolov
85700bdee3 Add a comment for #820 and #1012 2015-12-05 18:04:32 +00:00
Alexey Sokolov
103ed00861 Move Message assertions to special cast operators.
Don't use static_cast directly anymore, but use these operators.
2015-11-21 12:13:54 +00:00
Alexey Sokolov
933aa6db0c Add some more tests and fix a bug which sometimes blocked login of users.
This bug wasn't released yet.
cc @jpnurmi
2015-10-18 23:22:32 +01:00
J-P Nurmi
3cb2834cc5 Fix STATUSMSG buffering 2015-09-21 15:41:20 +02:00
J-P Nurmi
c83a41ce89 CClient: message handlers 2015-09-20 23:22:03 +02:00
J-P Nurmi
4d3b47f2b1 Refactor CClient::ReadLine() to take advantage of CMessage::Type 2015-09-20 23:22:03 +02:00
J-P Nurmi
0c6215df9e CClient: use CModeMessage 2015-09-20 23:22:03 +02:00
J-P Nurmi
7d10ad2625 CBuffer: add CMessage-based API 2015-09-20 23:22:03 +02:00
J-P Nurmi
dce6d4f0ea Make CClient::PutClient() handle multi-prefix 2015-09-20 23:22:02 +02:00
J-P Nurmi
f7802209ae Make CClient::PutClient() handle extended-join 2015-09-20 23:22:02 +02:00
J-P Nurmi
f4c22aff6c Incorporate CIRCSock::ForwardRaw353() into CClient::PutClient() 2015-09-20 23:22:02 +02:00
J-P Nurmi
69f1138052 CClient::PutClient(): handle away-notify and account-notify 2015-09-20 23:22:02 +02:00
J-P Nurmi
7f03484899 CClient: add ATTACH command
The main benefit is that (unlike JOIN) ATTACH allows wildcards.
It's also nicely symmetric with DETACH.
2015-09-10 01:12:19 +02:00
J-P Nurmi
832430659f CClient: share the chan detaching code 2015-09-10 01:12:19 +02:00
J-P Nurmi
7916efa997 CClient: share the chan matching code 2015-09-10 01:12:19 +02:00
J-P Nurmi
77ddb3c420 CClient::ReadLine(): use CMessage::GetType() 2015-09-07 00:00:25 +02:00
J-P Nurmi
b95f1f7fbf echo-message: status/module should echo before replies (#1022) 2015-09-06 10:45:42 +02:00
J-P Nurmi
ce0ddd3aac Merge pull request #1059 from jpnurmi/networklesshooks
Don't require network for OnUserXxxMessage() hooks
2015-09-04 23:29:49 +02:00
J-P Nurmi
0faafbf3bf Merge pull request #1056 from jpnurmi/handlecap
Implement CClient::HandleCap() using CMessage (ref #1013)
2015-09-04 20:49:11 +02:00
J-P Nurmi
81e6d0bbf2 Don't require network for OnUserXxxMessage() hooks
- OnUserJoinMessage()
- OnUserPartMessage()
- OnUserTopicMessage()
- OnUserActionMessage()
- OnUserCTCPMessage()

Supersedes #503
2015-09-02 23:46:05 +02:00
J-P Nurmi
2a40c355f4 Fix #1022: Status and module commands not echoed back to client 2015-09-02 20:15:15 +02:00
J-P Nurmi
453401eef4 Implement CClient::HandleCap() using CMessage (ref #1013) 2015-09-02 00:08:43 +02:00
J-P Nurmi
31ba15d686 CClient::ReadLine(): use CMessage 2015-08-31 00:24:30 +02:00
J-P Nurmi
8a7c79bb78 Pass known/compatible tags to clients 2015-08-15 12:33:23 +02:00
J-P Nurmi
c17c8c022b Buffer message tags and the original timestamps 2015-08-15 12:28:38 +02:00
J-P Nurmi
4995e7517e Prefer StartsWith(s) over Left(n) == s 2015-08-14 13:51:44 +02:00
Alexey Sokolov
a3f748448e Merge branch '1.6.x' 2015-08-11 21:32:33 +01:00
J-P Nurmi
45183612c8 Fix CClient::GetNickMask()
A regression introduced by cebc093. A potentially empty network
specific bind _host_ should not be used as nick mask _ident_.
2015-08-11 14:06:41 +02:00
J-P Nurmi
d6d57cb708 Merge branch '1.6.x' 2015-08-01 12:44:06 +02:00
J-P Nurmi
ad99d5f46e Merge pull request #1013 from DarthGandalf/cap-end
Support "CAP :END"
2015-08-01 12:33:26 +02:00
J-P Nurmi
015a8f6502 Merge branch '1.6.x'
Conflicts:
	src/Client.cpp
	znc-buildmod.in
2015-07-31 23:56:04 +02:00
Alexey Sokolov
89e99bfe35 Support "CAP :END"
Thanks to jaybe for complaining about this.
2015-07-30 22:01:11 +01:00
J-P Nurmi
b2c83321ef Fix #1008: Channel keys get saved in a very wrong way 2015-07-27 02:06:21 +02:00
J-P Nurmi
d39b20b505 Fix sources to include their respective header 2015-07-14 19:05:23 +02:00
J-P Nurmi
089a0fd925 Add cap-notify support
This change alone doesn’t notify any capabilities to clients, but makes
ZNC itself offer cap-notify and builds the foundations for various
notifiable capabilities, such as away-notify, can be easily added.
2015-07-05 13:33:27 +02:00
Alexey Sokolov
d7a6a136db Update capability names as they are named in IRCv3.2.
Old names will be available for a while, then removed.
self-message is superseded by echo-message and will be removed in future
too.
2015-04-26 22:37:27 +01:00
Alexey Sokolov
06e365215b Remove CAP CLEAR, because it's useless, and got deprecated in IRCv3.1 2015-04-26 22:36:36 +01:00
J-P Nurmi
e3954f4824 Implement IRCv3.2 echo-message capability on the "client side"
http://ircv3.net/specs/extensions/echo-message-3.2.html

TODO: Add echo-message support to CIRCSock when IRCds start supporting it.
Manual echoing won't be necessary for networks that support echo-message.
2015-04-26 19:49:39 +02:00
J-P Nurmi
6a6bb648d1 Use member initialization lists [-Weffc++] (#270) 2015-02-28 21:59:01 +01:00
J-P Nurmi
75b210e841 Search'n'replace remaining NULL occurrences (#816) 2015-02-26 20:58:01 +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
70c0ffb10b Use nullptr (#816)
Changes applied by 'clang-modernize -use-nullptr [...]'
2015-02-25 09:20:20 +01:00
J-P Nurmi
0485aa8033 CClient: C++11 range-based for loops 2015-02-25 07:58:37 +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
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
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
600f91f128 Fix implicit context of OnSendTo* hooks
Thanks for markus-j for reporting it
2015-01-11 17:08:00 +00:00