diff options
| author | 2013-05-06 11:49:50 +0100 | |
|---|---|---|
| committer | 2013-05-15 03:32:56 +0100 | |
| commit | accccc212cd4f08a3c5532b1ae7a17e76bac8718 (patch) | |
| tree | 18f4370778cc79d2f21a4308dafbb29a77cfa213 /src/xline.cpp | |
| parent | Merge pull request #523 from SaberUK/master+server-notice (diff) | |
| download | inspircd++-accccc212cd4f08a3c5532b1ae7a17e76bac8718.tar.gz inspircd++-accccc212cd4f08a3c5532b1ae7a17e76bac8718.tar.bz2 inspircd++-accccc212cd4f08a3c5532b1ae7a17e76bac8718.zip | |
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) |
