diff options
author | Peter Powell <petpow@saberuk.com> | 2013-05-06 11:49:50 +0100 |
---|---|---|
committer | Peter Powell <petpow@saberuk.com> | 2013-05-15 03:32:56 +0100 |
commit | accccc212cd4f08a3c5532b1ae7a17e76bac8718 (patch) | |
tree | 18f4370778cc79d2f21a4308dafbb29a77cfa213 /src/xline.cpp | |
parent | 23e8bba13c55d33ce89d505780da36c9589e300a (diff) |
Replace some C-isms with C++-isms.
* 'const char*' to 'const std::string&'.
* snprintf to std::string concatenation.
* Replace duplicated OneOfMatches with InspIRCd::MatchMask.
Diffstat (limited to 'src/xline.cpp')
-rw-r--r-- | src/xline.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/xline.cpp b/src/xline.cpp index fd82ea2df..ff86997bb 100644 --- a/src/xline.cpp +++ b/src/xline.cpp @@ -531,15 +531,15 @@ bool XLine::IsBurstable() void XLine::DefaultApply(User* u, const std::string &line, bool bancache) { - char sreason[MAXBUF]; - snprintf(sreason, MAXBUF, "%s-Lined: %s", line.c_str(), this->reason.c_str()); + const std::string banReason = line + "-Lined: " + reason; + if (!ServerInstance->Config->MoronBanner.empty()) u->WriteNotice("*** " + ServerInstance->Config->MoronBanner); if (ServerInstance->Config->HideBans) - ServerInstance->Users->QuitUser(u, line + "-Lined", sreason); + ServerInstance->Users->QuitUser(u, line + "-Lined", banReason.c_str()); else - ServerInstance->Users->QuitUser(u, sreason); + ServerInstance->Users->QuitUser(u, banReason); if (bancache) |