diff options
| author | 2013-05-15 12:33:47 -0700 | |
|---|---|---|
| committer | 2013-05-15 12:33:47 -0700 | |
| commit | e586aaab7c4f7b03514c83451d73b73f55dc6998 (patch) | |
| tree | 18f4370778cc79d2f21a4308dafbb29a77cfa213 /src/modules/m_chanlog.cpp | |
| parent | Merge pull request #523 from SaberUK/master+server-notice (diff) | |
| parent | Replace some C-isms with C++-isms. (diff) | |
Merge pull request #531 from SaberUK/master+snprintf-removal
Replace some C-isms with C++-isms.
Diffstat (limited to 'src/modules/m_chanlog.cpp')
| -rw-r--r-- | src/modules/m_chanlog.cpp | 7 |
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); } } |
