summaryrefslogtreecommitdiff
path: root/src/channels.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/channels.cpp')
-rw-r--r--src/channels.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/channels.cpp b/src/channels.cpp
index df1f77976..36436cdc5 100644
--- a/src/channels.cpp
+++ b/src/channels.cpp
@@ -618,11 +618,12 @@ void chanrec::WriteChannel(userrec* user, const std::string &text)
return;
snprintf(tb,MAXBUF,":%s %s",user->GetFullHost(),text.c_str());
+ std::string out = tb;
for (CUList::iterator i = ulist->begin(); i != ulist->end(); i++)
{
if (IS_LOCAL(i->second))
- i->second->Write(std::string(tb));
+ i->second->Write(out);
}
}
@@ -706,6 +707,7 @@ void chanrec::WriteAllExcept(userrec* user, bool serversource, char status, CULi
}
snprintf(tb,MAXBUF,":%s %s",user->GetFullHost(),text.c_str());
+ std::string out = tb;
for (CUList::iterator i = ulist->begin(); i != ulist->end(); i++)
{
@@ -714,7 +716,7 @@ void chanrec::WriteAllExcept(userrec* user, bool serversource, char status, CULi
if (serversource)
i->second->WriteServ(text);
else
- i->second->Write(std::string(tb));
+ i->second->Write(out);
}
}
}