Merge pull request #2042 from RealKindOne/bugfixes

Stop znc from prepending '#' in join command if missing and fix corecaps wiki link.
This commit is contained in:
Alexey Sokolov authored and GitHub committed 2026-09-22 01:12:03 +01:00
commit 4a19b6ffb1
3 files changed
+30 -2

No files matched your search

+5
View File
@@ -70,6 +70,11 @@ class CCoreCaps : public CModule {
}
};
template <>
void TModInfo<CCoreCaps>(CModInfo& Info) {
Info.SetWikiPage("corecaps");
}
GLOBALMODULEDEFS(
CCoreCaps,
t_s("Adds support for several IRC capabilities, extracted from ZNC core."))
+2 -2
View File
@@ -375,7 +375,7 @@ void CClient::AuthUser() {
}
}
/** Username+password auth, which reports success/failure to client via SASL. */
/** Username+password auth, which reports success/failure to client via SASL. */
class CClientSASLAuth : public CClientAuth {
public:
using CClientAuth::CClientAuth;
@@ -1463,7 +1463,7 @@ bool CClient::OnJoinMessage(CJoinMessage& Message) {
else
pChan->JoinUser(sKey);
continue;
} else if (!sChannel.empty()) {
} else if (!sChannel.empty() && m_pNetwork->IsChan(sChannel)) {
pChan = new CChan(sChannel, m_pNetwork, false);
if (m_pNetwork->AddChan(pChan)) {
pChan->SetKey(sKey);
+23
View File
@@ -1463,5 +1463,28 @@ TEST_F(ZNCTest, MotdBufferDoesNotAccumulate376) {
Not(HasSubstr("End of /MOTD command")));
}
// https://github.com/znc/znc/issues/1794
TEST_F(ZNCTest, PrependJoinBug) {
auto znc = Run();
auto ircd = ConnectIRCd();
auto client = LoginClient();
ircd.Write(":server 001 nick :Hello");
ircd.Write(":server 005 nick CHANTYPES=# :supports");
client.ReadUntil("005");
client.Write("JOIN 0");
ircd.ReadUntil("JOIN 0");
client.Write("znc listchans");
ASSERT_THAT(client.ReadRemainder().toStdString(), Not(HasSubstr("#0")));
client.Write("JOIN test");
ircd.ReadUntil("JOIN test");
client.Write("znc listchans");
ASSERT_THAT(client.ReadRemainder().toStdString(), Not(HasSubstr("#test")));
}
} // namespace
} // namespace znc_inttest