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_spanningtree/delline.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_spanningtree/delline.cpp')
-rw-r--r-- | src/modules/m_spanningtree/delline.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/modules/m_spanningtree/delline.cpp b/src/modules/m_spanningtree/delline.cpp index c64bec654..e376147fd 100644 --- a/src/modules/m_spanningtree/delline.cpp +++ b/src/modules/m_spanningtree/delline.cpp @@ -25,12 +25,13 @@ CmdResult CommandDelLine::Handle(User* user, Params& params) { const std::string& setter = user->nick; + std::string reason; // XLineManager::DelLine() returns true if the xline existed, false if it didn't - if (ServerInstance->XLines->DelLine(params[1].c_str(), params[0], user)) + if (ServerInstance->XLines->DelLine(params[1].c_str(), params[0], reason, user)) { - ServerInstance->SNO->WriteToSnoMask('X',"%s removed %s%s on %s", setter.c_str(), - params[0].c_str(), params[0].length() == 1 ? "-line" : "", params[1].c_str()); + ServerInstance->SNO->WriteToSnoMask('X', "%s removed %s%s on %s: %s", setter.c_str(), + params[0].c_str(), params[0].length() == 1 ? "-line" : "", params[1].c_str(), reason.c_str()); return CMD_SUCCESS; } return CMD_FAILURE; |