+ void OnUserConnect(LocalUser* user) CXX11_OVERRIDE
+ {
+ user->WriteNumeric(RPL_WELCOME, InspIRCd::Format("Welcome to the %s IRC Network %s", ServerInstance->Config->Network.c_str(), user->GetFullRealHost().c_str()));
+ user->WriteNumeric(RPL_YOURHOST, InspIRCd::Format("Your host is %s, running version %s", ServerInstance->Config->GetServerName().c_str(), INSPIRCD_BRANCH));
+ user->WriteNumeric(RPL_CREATED, InspIRCd::TimeString(ServerInstance->startup_time, "This server was created %H:%M:%S %b %d %Y"));
+ user->WriteNumeric(numeric004);
+
+ ServerInstance->ISupport.SendTo(user);
+
+ /* Trigger MOTD and LUSERS output, give modules a chance too */
+ ModResult MOD_RESULT;
+ std::string command("LUSERS");
+ CommandBase::Params parameters;
+ FIRST_MOD_RESULT(OnPreCommand, MOD_RESULT, (command, parameters, user, true));
+ if (!MOD_RESULT)
+ ServerInstance->Parser.CallHandler(command, parameters, user);
+
+ MOD_RESULT = MOD_RES_PASSTHRU;
+ command = "MOTD";
+ FIRST_MOD_RESULT(OnPreCommand, MOD_RESULT, (command, parameters, user, true));
+ if (!MOD_RESULT)
+ ServerInstance->Parser.CallHandler(command, parameters, user);
+
+ if (ServerInstance->Config->RawLog)
+ {
+ ClientProtocol::Messages::Privmsg rawlogmsg(ServerInstance->FakeClient, user, "*** Raw I/O logging is enabled on this server. All messages, passwords, and commands are being recorded.");
+ user->Send(ServerInstance->GetRFCEvents().privmsg, rawlogmsg);
+ }
+ }
+
+ void OnServiceAdd(ServiceProvider& service) CXX11_OVERRIDE
+ {
+ OnServiceChange(service);
+ }
+
+ void OnServiceDel(ServiceProvider& service) CXX11_OVERRIDE
+ {
+ OnServiceChange(service);
+ }
+
+ void Prioritize() CXX11_OVERRIDE
+ {
+ ServerInstance->Modules.SetPriority(this, I_OnUserConnect, PRIORITY_FIRST);
+ }
+