mirror of
https://github.com/znc/znc.git
synced 2026-03-28 17:42:41 +01:00
Don't request the MOTD if there is none
If a new client logs in and we don't have a MOTD cached, we request it via /motd. Since the IRC server sends it to use on connect anyway, there is no point in requesting it if there is none. (And even if there is no MOTD, we should get a "422 MOTD File is missing" which would be cached, so still no empty MOTD buffer) git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1728 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
12
User.cpp
12
User.cpp
@@ -276,15 +276,11 @@ void CUser::UserConnected(CClient* pClient) {
|
||||
}
|
||||
|
||||
// Send the cached MOTD
|
||||
if (m_MotdBuffer.IsEmpty()) {
|
||||
PutIRC("MOTD");
|
||||
} else {
|
||||
unsigned int uIdx = 0;
|
||||
CString sLine;
|
||||
unsigned int uIdx = 0;
|
||||
CString sLine;
|
||||
|
||||
while (m_MotdBuffer.GetLine(GetIRCNick().GetNick(), sLine, uIdx++)) {
|
||||
pClient->PutClient(sLine);
|
||||
}
|
||||
while (m_MotdBuffer.GetLine(GetIRCNick().GetNick(), sLine, uIdx++)) {
|
||||
pClient->PutClient(sLine);
|
||||
}
|
||||
|
||||
if (GetIRCSock() != NULL) {
|
||||
|
||||
Reference in New Issue
Block a user