mirror of
https://github.com/znc/znc.git
synced 2026-08-07 17:33:34 +02:00
Save channel key on user JOIN even if user was not on the channel yet,
which is the usual case. Fix #1223
This commit is contained in:
@@ -262,5 +262,25 @@ TEST_F(ZNCTest, AwayNotify) {
|
||||
client.ReadUntil("DEL :away-notify");
|
||||
}
|
||||
|
||||
TEST_F(ZNCTest, JoinKey) {
|
||||
QFile conf(m_dir.path() + "/configs/znc.conf");
|
||||
ASSERT_TRUE(conf.open(QIODevice::Append | QIODevice::Text));
|
||||
QTextStream(&conf) << "ServerThrottle = 1\n";
|
||||
auto znc = Run();
|
||||
|
||||
auto ircd = ConnectIRCd();
|
||||
auto client = LoginClient();
|
||||
ircd.Write(":server 001 nick :Hello");
|
||||
client.Write("JOIN #znc secret");
|
||||
ircd.ReadUntil("JOIN #znc secret");
|
||||
ircd.Write(":nick JOIN :#znc");
|
||||
client.ReadUntil("JOIN :#znc");
|
||||
ircd.Close();
|
||||
|
||||
ircd = ConnectIRCd();
|
||||
ircd.Write(":server 001 nick :Hello");
|
||||
ircd.ReadUntil("JOIN #znc secret");
|
||||
}
|
||||
|
||||
} // namespace
|
||||
} // namespace znc_inttest
|
||||
|
||||
Reference in New Issue
Block a user