diff options
author | Attila Molnar <attilamolnar@hush.com> | 2015-02-05 17:37:26 +0100 |
---|---|---|
committer | Attila Molnar <attilamolnar@hush.com> | 2015-02-05 17:37:26 +0100 |
commit | 8c71a2a6304f0d77aa7738e04a44f366a158cadd (patch) | |
tree | 3b585697c4a6f7d389bc563b39e5d645fc0a0273 | |
parent | 045747290ba1088daf7f70d5d36d0eb4c8ba2b4e (diff) | |
parent | e0412d5161891c04faf2050cc02e8a9cffdda8a4 (diff) |
Merge pull request #971 from SaberUK/master+numeric-xline
Use ERR_YOUREBANNEDCREEP instead of NOTICE when a user is banned.
-rw-r--r-- | include/numerics.h | 1 | ||||
-rw-r--r-- | src/usermanager.cpp | 2 | ||||
-rw-r--r-- | src/xline.cpp | 2 |
3 files changed, 3 insertions, 2 deletions
diff --git a/include/numerics.h b/include/numerics.h index 2418730d2..0447df353 100644 --- a/include/numerics.h +++ b/include/numerics.h @@ -144,6 +144,7 @@ enum Numerics ERR_NOTREGISTERED = 451, ERR_NEEDMOREPARAMS = 461, ERR_ALREADYREGISTERED = 462, + ERR_YOUREBANNEDCREEP = 465, ERR_UNKNOWNMODE = 472, /* diff --git a/src/usermanager.cpp b/src/usermanager.cpp index 5d07c4d79..1966c9b47 100644 --- a/src/usermanager.cpp +++ b/src/usermanager.cpp @@ -136,7 +136,7 @@ void UserManager::AddUser(int socket, ListenSocket* via, irc::sockets::sockaddrs /* user banned */ ServerInstance->Logs->Log("BANCACHE", LOG_DEBUG, "BanCache: Positive hit for " + New->GetIPString()); if (!ServerInstance->Config->XLineMessage.empty()) - New->WriteNotice("*** " + ServerInstance->Config->XLineMessage); + New->WriteNumeric(ERR_YOUREBANNEDCREEP, ":" + ServerInstance->Config->XLineMessage); this->QuitUser(New, b->Reason); return; } diff --git a/src/xline.cpp b/src/xline.cpp index 13124a392..dedf8c7a9 100644 --- a/src/xline.cpp +++ b/src/xline.cpp @@ -531,7 +531,7 @@ void XLine::DefaultApply(User* u, const std::string &line, bool bancache) const std::string banReason = line + "-Lined: " + reason; if (!ServerInstance->Config->XLineMessage.empty()) - u->WriteNotice("*** " + ServerInstance->Config->XLineMessage); + u->WriteNumeric(ERR_YOUREBANNEDCREEP, ":" + ServerInstance->Config->XLineMessage); if (ServerInstance->Config->HideBans) ServerInstance->Users->QuitUser(u, line + "-Lined", &banReason); |