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/xline.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/xline.cpp') diff --git a/src/xline.cpp b/src/xline.cpp index 55496b424..ccdc58dc2 100644 --- a/src/xline.cpp +++ b/src/xline.cpp @@ -294,7 +294,7 @@ bool XLineManager::AddLine(XLine* line, User* user) // deletes a line, returns true if the line existed and was removed -bool XLineManager::DelLine(const char* hostmask, const std::string &type, User* user, bool simulate) +bool XLineManager::DelLine(const char* hostmask, const std::string& type, std::string& reason, User* user, bool simulate) { ContainerIter x = lookup_lines.find(type); @@ -306,6 +306,8 @@ bool XLineManager::DelLine(const char* hostmask, const std::string &type, User* if (y == x->second.end()) return false; + reason.assign(y->second->reason); + if (simulate) return true; -- cgit v1.3.1-10-gc9f91