diff options
author | Matt Schatz <genius3000@g3k.solutions> | 2019-01-24 09:01:56 -0700 |
---|---|---|
committer | Peter Powell <petpow@saberuk.com> | 2019-01-24 16:01:56 +0000 |
commit | d5b50d9ed107d6a8b9241a831c1dae713963b524 (patch) | |
tree | 37371ed3c1ca1234e7e75361800f6285f9abb1bc /src/modules/m_cban.cpp | |
parent | 2f35b78fbaadb8d9a6c47ffc198bd97f91af3306 (diff) |
Add the reason to xline removal notices. (#1545)
Show the reason in manual xline removal SNOTICEs, just like
expiry SNOTICEs do.
This modifies XLineManager::DelLine() to require another string
reference passed to it.
Requested by @Robby-.
Diffstat (limited to 'src/modules/m_cban.cpp')
-rw-r--r-- | src/modules/m_cban.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/modules/m_cban.cpp b/src/modules/m_cban.cpp index 3cdbbbdfb..8d08de9d9 100644 --- a/src/modules/m_cban.cpp +++ b/src/modules/m_cban.cpp @@ -98,9 +98,11 @@ class CommandCBan : public Command if (parameters.size() == 1) { - if (ServerInstance->XLines->DelLine(parameters[0].c_str(), "CBAN", user)) + std::string reason; + + if (ServerInstance->XLines->DelLine(parameters[0].c_str(), "CBAN", reason, user)) { - ServerInstance->SNO->WriteGlobalSno('x', "%s removed CBan on %s.",user->nick.c_str(),parameters[0].c_str()); + ServerInstance->SNO->WriteGlobalSno('x', "%s removed CBan on %s: %s", user->nick.c_str(), parameters[0].c_str(), reason.c_str()); } else { |