Commit Graph

173 Commits

Author SHA1 Message Date
Alexey Sokolov
0a45c4710a SASL: Support receiving USER and NICK after CAP END 2025-03-16 09:44:10 +00:00
Alexey Sokolov
8778a2bb5d Parse network and client from authzid. Tests will be in future commit 2025-02-24 09:21:30 +00:00
Alexey Sokolov
4f07558a7d Remove a footgun by decreasing the SASL API surface for modules
Even without the bad vtable of mutex inside shared_ptr, if a module
creates a subclass of CAuthBase, but then unloads, we have the same
problem.
2025-02-23 09:25:24 +00:00
Alexey Sokolov
6e9980d67f Various SASL changes 2025-02-22 15:59:52 +00:00
Alexey Sokolov
4ef64eb4d5 rename next sasl module hook 2025-02-13 21:36:07 +00:00
Alexey Sokolov
c8266aafda Rename new callback, fix build 2025-02-13 21:22:09 +00:00
Alexey Sokolov
22f27b2e88 Fix indentation of SASL code.
This should help understanding what it's trying to do.
2025-02-13 21:03:16 +00:00
Alexey Sokolov
41a0030fdb Merge branch 'master' into sasl
Conflicts:
	include/znc/Client.h
	src/Client.cpp
	src/Modules.cpp
	test/integration/tests/modules.cpp
2025-02-13 20:37:32 +00:00
Peter
44e4b95a20 Welcome to 2025 (#1929) 2025-02-07 23:23:45 +00:00
Alexey Sokolov
d49399bbca Implement chghost capability
Interaction with extended-join doesn't yet work correctly, because ZNC
doesn't keep track of everyone's real names
2024-10-15 13:26:20 +01:00
Alexey Sokolov
ca3b76368d Suspend registration on CAP REQ
Fix #1820
2024-02-10 00:53:44 +00:00
Alexey Sokolov
6e0591ff98 Remove unused field and getter
When account-tag was introduced, these fields were used, but since cap
3.2 this is no longer useful
2024-02-10 00:18:11 +00:00
Alexey Sokolov
b1009bd809 Code cleanup
Since now there are no server-dependent caps defined in the core
2024-01-14 00:27:21 +00:00
Alexey Sokolov
f7ff0ee3f3 Modulefy core server-dependent caps 2024-01-13 23:34:03 +00:00
Alexey Sokolov
b5a6ff528b The test is now working 2024-01-07 22:55:52 +00:00
Alexey Sokolov
1d3b33354f Merge branch 'master' into cap302 2024-01-06 20:36:24 +00:00
Alexey Sokolov
66137bd89a Progress 2024-01-05 00:45:41 +00:00
Falk Rund
17a004aa0b Welcome to 2024
[skip ci]
2023-12-31 21:09:25 +01:00
Alexey Sokolov
4cbccac707 Merge branch 'master' into cap302 2023-11-19 10:53:47 +00:00
KindOne
ee9ad2ff8e Use module names as the module ident.
Some clients will reuse query windows as the client thinks its just a
nick change if you have a existing query window with a module and a different one messages you.

Fix that by using the modules name as the ident.

Update tests to match new modules ident.
2023-09-08 07:21:31 -04:00
delthas
1dd995ef77 Reabse and address PR comments 2023-08-31 14:35:49 +02:00
MrLenin
d27e2cce5c SASL Authentication for Clients 2023-08-30 17:25:32 +02:00
Alexey Sokolov
50a3226b4f Don't duplicate the map of cap handlers per client
The idea here was that modules would dynamically add handlers to the
map, then it needs to be per client; but a simpler way to achieve this
will be in next commit
2023-03-04 10:01:56 +00:00
Alexey Sokolov
9eebb1ff04 Move CClient constructor body to .cpp 2023-03-04 09:32:57 +00:00
Alexey Sokolov
c15fc63c55 Implement cap negotiation 3.2 on server side
Used for "server-dependent" caps which already rely on sending NEW and
DEL to client. This functionality is not yet available for caps added by
modules.
2023-01-09 01:08:04 +00:00
Alexey Sokolov
d49168b93f Make it possible for modules to send values in CAP LS 2023-01-08 15:46:21 +00:00
Alexey Sokolov
b57d794aaf Send multiline CAP LS response for IRCv3.2 clients 2023-01-08 15:32:27 +00:00
Falk Rund
f9fd05c307 Welcome to 2023 2023-01-01 06:49:00 +01:00
Falk Rund
6402d241ac Welcome to 2022
The same procedure as last year, Miss Sophie?
Same procedure as every year, James.
2022-01-01 14:05:32 +01:00
MAGIC
99687b0f24 Welcome to 2021 2021-01-01 19:37:07 +01:00
NuclearW
f5c3ea403d Cleanup capabilities from m_ssAcceptedCaps in CClient::ClearServerDependentCaps after CAP DEL 2020-08-03 13:43:36 -04:00
Alexey Sokolov
6cce5fe08d Check for m_pNetwork being not null in several more places
I don't know whether these are crasheable, but now they will definitely
be not.
2020-05-31 11:46:05 +01:00
Alexey Sokolov
2390ad111b Fix null pointer dereference in echo-message
The bug was introduced while fixing #1705. If a client did not enable
echo-message, and doesn't have a network, it crashes.

Thanks to LunarBNC for reporting this
2020-05-31 11:45:40 +01:00
Alexey Sokolov
d229761821 Fix echo-message for *status
Close #1705
2020-03-29 08:45:10 +01:00
MAGIC
9081aa971d Welcome to 2020 2020-01-02 00:36:05 +01:00
Aspen (linudaemon)
95369455fc Rework MODE/RPL_CHANMODEIS handling for trailing args (#1661)
Some servers may send a colon even if the last parameter doesn't need it, currently this leads to issues with permission/mode tracking, as the core doesn't handle the colon properly.

This fix replaces reconstructing the parameter string with just passing a vector of the relevant parameters to CChan::SetModes() and adds overrides for CChan::SetModes() and CChan::ModeChange() that accept the vector instead.

Clean up uses of old CModeMessage::GetModes()
2019-08-08 21:54:49 +01:00
Alexey Sokolov
0ab205ccfa Merge pull request #1628 from dgw/welcome-to-2019
Welcome to 2019
2019-01-08 22:50:58 +00:00
dgw
8d5427cf9b Welcome to 2019
What are we going to do today, Brain?

The same thing we do every year, Pinky: Update all the copyright
headers!

[Skip CI]
2019-01-01 17:05:05 -06:00
Pierre Gordon
6af027c5dd Normalize methods with 'UserName' to 'Username' 2019-01-01 16:19:27 -05:00
Alexey Sokolov
d22fef8620 Better cleanup lines coming from network.
Thanks for Jeriko One <jeriko.one@gmx.us> for finding and reporting this.
2018-07-14 07:08:50 +01:00
Alexey Sokolov
6d1e77bb52 Revert "transperancy: Make the user aware that DEBUG mode is enabled."
This reverts commit ab501767a1.

Superceded by admindebug module
2018-06-18 00:41:18 +01:00
Alexey Sokolov
e531fe870a Replace the deprecated overload of CMessage::GetParam 2018-06-01 22:22:44 +01:00
Nobody Atoll
55d44c21a7 Fix echo-message regression from 1.6.x
This patch prevents PRIVMSGs from clients frmo being echoed to other clients if their target has the status prefix.
2018-04-12 18:34:15 -04:00
Alexey Sokolov
1eceb5a5c7 More translateable strings (#1354) 2018-04-01 00:35:51 +01:00
Alexey Sokolov
8da45322f0 Fix CClient::PutClient comment, add CClient::PutClientRaw 2018-03-11 15:54:20 +00:00
Alexey Sokolov
15ccaca41a Stop buffering and echoing CTCP requests and responses to other clients, except for /me
Fix interaction between self-message and CTCP:
CTCP request from client A gets reflected from ZNC to client B, because
B has self-message. B sees this as a usual CTCP request (from the same
nick), and replies (to the same nick). ZNC reflects that response to A
because A has self-message, and also passes that response to IRC server,
which sends that response back to ZNC, which sends it to its both clients.

Close #1488
2018-02-18 23:04:14 +00:00
Alexey Sokolov
658a6e6f90 Lie to modules less: make OnUserRaw strings raw 2018-02-18 22:14:18 +00:00
Alexey Sokolov
5cb50eccd1 Save channel key on user JOIN even if user was not on the channel yet,
which is the usual case.

Fix #1223
2018-02-14 08:30:21 +00:00
Alexey Sokolov
eccf5911ae Fill Message.GetChan() in user-originated module callbacks if the channel exists.
Close #1402
2018-02-11 15:13:11 +00:00
Falk Seidel
d647eaabc0 Welcome to 2018
The same procedure as last year, Miss Sophie?
The same procedure as every year, James.

[skip ci]
2018-01-19 19:38:58 +00:00