]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_opermotd.cpp
Get rid of the OnRemoteKill hook, make use of GetRouting() and TR_CUSTOM to route...
[user/henk/code/inspircd.git] / src / modules / m_opermotd.cpp
index b228dc8b771fb8795299e2ed45baed2d1fa238a0..aa5767b4c71f789b0c755fca8f51fba51b4b73db 100644 (file)
@@ -107,9 +107,15 @@ class ModuleOpermotd : public Module
                ConfigTag* conf = ServerInstance->Config->ConfValue("opermotd");
                onoper = conf->getBool("onoper", true);
 
-               FileReader f(conf->getString("file", "opermotd"));
-               for (int i=0, filesize = f.FileSize(); i < filesize; i++)
-                       cmd.opermotd.push_back(f.GetLine(i));
+               try
+               {
+                       FileReader reader(conf->getString("file", "opermotd"));
+                       cmd.opermotd = reader.GetVector();
+               }
+               catch (CoreException&)
+               {
+                       // Nothing happens here as we do the error handling in ShowOperMOTD.
+               }
 
                if (conf->getBool("processcolors"))
                        InspIRCd::ProcessColors(cmd.opermotd);