summaryrefslogtreecommitdiff
path: root/src/modules/m_opermotd.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/m_opermotd.cpp')
-rw-r--r--src/modules/m_opermotd.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/modules/m_opermotd.cpp b/src/modules/m_opermotd.cpp
index 5c107b6b1..fcd248b90 100644
--- a/src/modules/m_opermotd.cpp
+++ b/src/modules/m_opermotd.cpp
@@ -62,7 +62,10 @@ class CommandOpermotd : public Command
user->SendText(":%s 375 %s :- IRC Operators Message of the Day", servername.c_str(), user->nick.c_str());
for (int i=0; i != opermotd.FileSize(); i++)
- user->SendText(":%s 372 %s :- %s", servername.c_str(), user->nick.c_str(), opermotd.GetLine(i).c_str());
+ {
+ std::string line = opermotd.GetLine(i);
+ user->SendText(":%s 372 %s :- %s", servername.c_str(), user->nick.c_str(), line.c_str());
+ }
user->SendText(":%s 376 %s :- End of OPERMOTD", servername.c_str(), user->nick.c_str());
}