diff options
| author | 2013-05-06 11:49:50 +0100 | |
|---|---|---|
| committer | 2013-05-15 03:32:56 +0100 | |
| commit | accccc212cd4f08a3c5532b1ae7a17e76bac8718 (patch) | |
| tree | 18f4370778cc79d2f21a4308dafbb29a77cfa213 /src/modules/m_namedmodes.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/modules/m_namedmodes.cpp')
| -rw-r--r-- | src/modules/m_namedmodes.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/modules/m_namedmodes.cpp b/src/modules/m_namedmodes.cpp index 4db1f70b9..7d0d3a040 100644 --- a/src/modules/m_namedmodes.cpp +++ b/src/modules/m_namedmodes.cpp @@ -35,9 +35,8 @@ static void DisplayList(User* user, Channel* channel) if (mh->GetNumParams(true)) items << " " << channel->GetModeParameter(letter); } - char pfx[MAXBUF]; - snprintf(pfx, MAXBUF, ":%s 961 %s %s", ServerInstance->Config->ServerName.c_str(), user->nick.c_str(), channel->name.c_str()); - user->SendText(std::string(pfx), items); + const std::string line = ":" + ServerInstance->Config->ServerName + " 961 " + user->nick + " " + channel->name; + user->SendText(line, items); user->WriteNumeric(960, "%s %s :End of mode list", user->nick.c_str(), channel->name.c_str()); } |
