Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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

  • Loading branch information...
commit c53cf06425bf8a42c86c986e35509699b67b1582 2 parents 8bb7ea5 + f4019b6
@DarthGandalf DarthGandalf authored
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("");
Please sign in to comment.
Something went wrong with that request. Please try again.