mirror of
https://github.com/inspircd/inspircd.git
synced 2025-03-10 02:59:01 -04:00
Call the OnUserInit hook from earlier in UserManager::AddUser.
This fixes messages being lost when sending them to a user who has only just connected to the server.
This commit is contained in:
parent
0a9c72335a
commit
0a1f9bc594
@ -76,6 +76,7 @@ void UserManager::AddUser(int socket, ListenSocket* via, irc::sockets::sockaddrs
|
||||
this->clientlist[New->nick] = New;
|
||||
this->AddClone(New);
|
||||
this->local_users.push_front(New);
|
||||
FOREACH_MOD(OnUserInit, (New));
|
||||
|
||||
if (!SocketEngine::AddFd(eh, FD_WANT_FAST_READ | FD_WANT_EDGE_WRITE))
|
||||
{
|
||||
@ -162,8 +163,6 @@ void UserManager::AddUser(int socket, ListenSocket* via, irc::sockets::sockaddrs
|
||||
FOREACH_MOD(OnSetUserIP, (New));
|
||||
if (New->quitting)
|
||||
return;
|
||||
|
||||
FOREACH_MOD(OnUserInit, (New));
|
||||
}
|
||||
|
||||
void UserManager::QuitUser(User* user, const std::string& quitreason, const std::string* operreason)
|
||||
|
@ -804,7 +804,11 @@ void LocalUser::Write(const ClientProtocol::SerializedMessage& text)
|
||||
void LocalUser::Send(ClientProtocol::Event& protoev)
|
||||
{
|
||||
if (!serializer)
|
||||
{
|
||||
ServerInstance->Logs->Log("USERS", LOG_DEBUG, "BUG: LocalUser::Send() called on %s who does not have a serializer!",
|
||||
GetFullRealHost().c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
// In the most common case a static LocalUser field, sendmsglist, is passed to the event to be
|
||||
// populated. The list is cleared before returning.
|
||||
|
Loading…
x
Reference in New Issue
Block a user