summaryrefslogtreecommitdiff
path: root/src/xline.cpp
diff options
context:
space:
mode:
authorMatt Schatz <genius3000@g3k.solutions>2019-01-24 09:01:56 -0700
committerPeter Powell <petpow@saberuk.com>2019-01-24 16:01:56 +0000
commitd5b50d9ed107d6a8b9241a831c1dae713963b524 (patch)
tree37371ed3c1ca1234e7e75361800f6285f9abb1bc /src/xline.cpp
parent2f35b78fbaadb8d9a6c47ffc198bd97f91af3306 (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/xline.cpp')
-rw-r--r--src/xline.cpp4
1 files changed, 3 insertions, 1 deletions
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;