+ if ((parameters.empty()) || (parameters[0] == ServerInstance->Config->ServerName))
+ ShowOperMOTD(user);
+ return CMD_SUCCESS;
+ }
+
+ RouteDescriptor GetRouting(User* user, const std::vector<std::string>& parameters)
+ {
+ if ((!parameters.empty()) && (parameters[0].find('.') != std::string::npos))
+ return ROUTE_OPT_UCAST(parameters[0]);
+ return ROUTE_LOCALONLY;
+ }
+
+ void ShowOperMOTD(User* user)
+ {
+ if (opermotd.empty())
+ {
+ user->WriteRemoteNumeric(455, "OPERMOTD file is missing");
+ return;
+ }
+
+ user->WriteRemoteNumeric(375, "- IRC Operators Message of the Day");
+
+ for (file_cache::const_iterator i = opermotd.begin(); i != opermotd.end(); ++i)
+ {
+ user->WriteRemoteNumeric(372, InspIRCd::Format("- %s", i->c_str()));
+ }
+
+ user->WriteRemoteNumeric(376, "- End of OPERMOTD");