summaryrefslogtreecommitdiff
path: root/src/modules/m_chanlog.cpp
diff options
context:
space:
mode:
authorPeter Powell <petpow@saberuk.com>2013-05-06 11:49:50 +0100
committerPeter Powell <petpow@saberuk.com>2013-05-15 03:32:56 +0100
commitaccccc212cd4f08a3c5532b1ae7a17e76bac8718 (patch)
tree18f4370778cc79d2f21a4308dafbb29a77cfa213 /src/modules/m_chanlog.cpp
parent23e8bba13c55d33ce89d505780da36c9589e300a (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/modules/m_chanlog.cpp')
-rw-r--r--src/modules/m_chanlog.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/modules/m_chanlog.cpp b/src/modules/m_chanlog.cpp
index 4bfce2108..0f53ceedf 100644
--- a/src/modules/m_chanlog.cpp
+++ b/src/modules/m_chanlog.cpp
@@ -73,16 +73,15 @@ class ModuleChanLog : public Module
if (itpair.first == itpair.second)
return MOD_RES_PASSTHRU;
- char buf[MAXBUF];
- snprintf(buf, MAXBUF, "\2%s\2: %s", desc.c_str(), msg.c_str());
+ const std::string snotice = "\2" + desc + "\2: " + msg;
for (ChanLogTargets::const_iterator it = itpair.first; it != itpair.second; ++it)
{
Channel *c = ServerInstance->FindChan(it->second);
if (c)
{
- c->WriteChannelWithServ(ServerInstance->Config->ServerName, "PRIVMSG %s :%s", c->name.c_str(), buf);
- ServerInstance->PI->SendChannelPrivmsg(c, 0, buf);
+ c->WriteChannelWithServ(ServerInstance->Config->ServerName, "PRIVMSG %s :%s", c->name.c_str(), snotice.c_str());
+ ServerInstance->PI->SendChannelPrivmsg(c, 0, snotice);
}
}