* ---------------------------------------------------
*/
-#include <stdio.h>
+#include "inspircd.h"
#include "users.h"
#include "channels.h"
#include "modules.h"
-#include "inspircd.h"
-
/* $ModDesc: Shows a message to opers after oper-up, adds /opermotd */
static FileReader* opermotd;
user->WriteServ(std::string("425 ") + user->nick + std::string(" :OPERMOTD file is missing"));
return CMD_FAILURE;
}
+
user->WriteServ(std::string("375 ") + user->nick + std::string(" :- IRC Operators Message of the Day"));
+
for(int i=0; i != opermotd->FileSize(); i++)
{
user->WriteServ(std::string("372 ") + user->nick + std::string(" :- ") + opermotd->GetLine(i));
}
+
user->WriteServ(std::string("376 ") + user->nick + std::string(" :- End of OPERMOTD"));
- return CMD_SUCCESS;
+ /* don't route me */
+ return CMD_LOCALONLY;
}
/** Handle /OPERMOTD
}
ModuleOpermotd(InspIRCd* Me)
- : Module::Module(Me)
+ : Module(Me)
{
opermotd = NULL;
mycommand = new cmd_opermotd(ServerInstance);
}
};
-extern "C" void* init_module(void)
+extern "C" DllExport void* init_module(void)
{
return new ModuleOpermotdFactory;
}