diff options
| author | 2022-05-31 14:04:43 +0100 | |
|---|---|---|
| committer | 2022-05-31 14:04:43 +0100 | |
| commit | bbe6c7c244d9133f87d041d00aec9903c0b0e88d (patch) | |
| tree | 47c3b3c31a01a390dad3ab5e49e092a7174ab141 /src/usermanager.cpp | |
| parent | Fix some compiler warnings on i386. (diff) | |
Make it more obvious when an I/O hook is misconfigured.
Diffstat (limited to 'src/usermanager.cpp')
| -rw-r--r-- | src/usermanager.cpp | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/src/usermanager.cpp b/src/usermanager.cpp index 1b93430d7..47d9c5bbb 100644 --- a/src/usermanager.cpp +++ b/src/usermanager.cpp @@ -157,16 +157,14 @@ void UserManager::AddUser(int socket, ListenSocket* via, irc::sockets::sockaddrs ListenSocket::IOHookProvRef& iohookprovref = *i; if (!iohookprovref) { - if (!iohookprovref.GetProvider().empty()) - { - ServerInstance->Logs->Log("USERS", LOG_DEBUG, "Non-existent I/O hook '%s' in <bind:%s> tag at %s", - iohookprovref.GetProvider().c_str(), - i == via->iohookprovs.begin() ? "hook" : "sslprofile", - via->bind_tag->getTagLocation().c_str()); - this->QuitUser(New, "Internal error handling connection"); - return; - } - continue; + if (iohookprovref.GetProvider().empty()) + continue; + + const char* hooktype = i == via->iohookprovs.begin() ? "hook" : "sslprofile"; + ServerInstance->Logs->Log("USERS", LOG_DEFAULT, "Non-existent I/O hook '%s' in <bind:%s> tag at %s", + iohookprovref.GetProvider().c_str(), hooktype, via->bind_tag->getTagLocation().c_str()); + this->QuitUser(New, InspIRCd::Format("Internal error handling connection (misconfigured %s)", hooktype)); + return; } iohookprovref->OnAccept(eh, client, server); |
