From d5b50d9ed107d6a8b9241a831c1dae713963b524 Mon Sep 17 00:00:00 2001 From: Matt Schatz Date: Thu, 24 Jan 2019 09:01:56 -0700 Subject: 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-. --- src/modules/m_cban.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/modules/m_cban.cpp') 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 { -- cgit v1.2.3