summaryrefslogtreecommitdiff
path: root/src/modules/m_chanlog.cpp
diff options
context:
space:
mode:
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);
}
}