aboutsummaryrefslogtreecommitdiff
path: root/src/usermanager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/usermanager.cpp')
-rw-r--r--src/usermanager.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/usermanager.cpp b/src/usermanager.cpp
index 1b64f61f9..c706d8d90 100644
--- a/src/usermanager.cpp
+++ b/src/usermanager.cpp
@@ -203,13 +203,21 @@ void UserManager::AddUser(int socket, ListenSocket* via, const irc::sockets::soc
{
/* user banned */
ServerInstance->Logs.Debug("BANCACHE", "BanCache: Positive hit for " + New->GetAddress());
+
if (!ServerInstance->Config->XLineMessage.empty())
New->WriteNumeric(ERR_YOUREBANNEDCREEP, ServerInstance->Config->XLineMessage);
- if (ServerInstance->Config->HideBans)
- this->QuitUser(New, b->Type + "-lined", &b->Reason);
- else
+ if (ServerInstance->Config->HideLines.empty())
this->QuitUser(New, b->Reason);
+ else
+ {
+ const std::string publicreason = Template::Replace(ServerInstance->Config->HideLines,
+ {
+ { "reason", b->Reason },
+ { "type", b->Type },
+ });
+ this->QuitUser(New, publicreason, &b->Reason);
+ }
return;
}
else