Skip to content
Browse files

Merge https://github.com/leedo/znc into motd

  • Loading branch information...
2 parents 8bb7ea5 + f4019b6 commit c53cf06425bf8a42c86c986e35509699b67b1582 @DarthGandalf DarthGandalf committed Dec 29, 2011
Showing with 8 additions and 3 deletions.
  1. +8 −3 src/IRCNetwork.cpp
View
11 src/IRCNetwork.cpp
@@ -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("");

0 comments on commit c53cf06

Please sign in to comment.
Something went wrong with that request. Please try again.