summaryrefslogtreecommitdiff
path: root/src/users.cpp
diff options
context:
space:
mode:
authorPeter Powell <petpow@saberuk.com>2018-08-22 13:43:46 +0100
committerPeter Powell <petpow@saberuk.com>2018-08-22 21:25:55 +0100
commitb5bc17fba34044097844263641c0f612db75d466 (patch)
tree342ae94f13a302963003fd4821bff2afccd21c42 /src/users.cpp
parentbc4751a3279b3c058b2f0c5af5fdebbab10474d3 (diff)
Send the 001-004 numerics and MOTD/LUSERS from core_info.
Co-authored-by: Attila Molnar <attilamolnar@hush.com>
Diffstat (limited to 'src/users.cpp')
-rw-r--r--src/users.cpp36
1 files changed, 3 insertions, 33 deletions
diff --git a/src/users.cpp b/src/users.cpp
index e17c8cd79..1ddd3ca0e 100644
--- a/src/users.cpp
+++ b/src/users.cpp
@@ -557,45 +557,15 @@ void LocalUser::FullConnect()
if (quitting)
return;
- this->WriteNumeric(RPL_WELCOME, InspIRCd::Format("Welcome to the %s IRC Network %s", ServerInstance->Config->Network.c_str(), GetFullRealHost().c_str()));
- this->WriteNumeric(RPL_YOURHOSTIS, InspIRCd::Format("Your host is %s, running version %s", ServerInstance->Config->ServerName.c_str(), INSPIRCD_BRANCH));
- this->WriteNumeric(RPL_SERVERCREATED, InspIRCd::TimeString(ServerInstance->startup_time, "This server was created %H:%M:%S %b %d %Y"));
-
- const TR1NS::array<std::string, 3>& modelist = ServerInstance->Modes->GetModeListFor004Numeric();
- this->WriteNumeric(RPL_SERVERVERSION, ServerInstance->Config->ServerName, INSPIRCD_BRANCH, modelist[0], modelist[1], modelist[2]);
-
- ServerInstance->ISupport.SendTo(this);
-
- /* Now registered */
- if (ServerInstance->Users->unregistered_count)
- ServerInstance->Users->unregistered_count--;
-
- /* 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, this, true));
- if (!MOD_RESULT)
- ServerInstance->Parser.CallHandler(command, parameters, this);
-
- MOD_RESULT = MOD_RES_PASSTHRU;
- command = "MOTD";
- FIRST_MOD_RESULT(OnPreCommand, MOD_RESULT, (command, parameters, this, true));
- if (!MOD_RESULT)
- ServerInstance->Parser.CallHandler(command, parameters, this);
-
- if (ServerInstance->Config->RawLog)
- {
- ClientProtocol::Messages::Privmsg rawlogmsg(ServerInstance->FakeClient, this, "*** Raw I/O logging is enabled on this server. All messages, passwords, and commands are being recorded.");
- this->Send(ServerInstance->GetRFCEvents().privmsg, rawlogmsg);
- }
-
/*
* We don't set REG_ALL until triggering OnUserConnect, so some module events don't spew out stuff
* for a user that doesn't exist yet.
*/
FOREACH_MOD(OnUserConnect, (this));
+ /* Now registered */
+ if (ServerInstance->Users->unregistered_count)
+ ServerInstance->Users->unregistered_count--;
this->registered = REG_ALL;
FOREACH_MOD(OnPostConnect, (this));