send 422 event if MOTD buffer is empty

This commit is contained in:
Lee Aylward
2011-12-07 19:09:23 -06:00
parent 9e047a3beb
commit f4019b6740
+8 -3
View File
@@ -403,9 +403,14 @@ void CIRCNetwork::ClientConnected(CClient *pClient) {
// Send the cached MOTD
uSize = m_MotdBuffer.Size();
for (uIdx = 0; uIdx < uSize; uIdx++) {
pClient->PutClient(m_MotdBuffer.GetLine(uIdx, *pClient, msParams));
}
if (uSize > 0) {
for (uIdx = 0; uIdx < uSize; uIdx++) {
pClient->PutClient(m_MotdBuffer.GetLine(uIdx, *pClient, msParams));
}
}
else {
pClient->PutClient(":irc.znc.in 422 :MOTD File is missing");
}
if (GetIRCSock() != NULL) {
CString sUserMode("");