summaryrefslogtreecommitdiff
path: root/src/channels.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-12-30 16:02:56 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-12-30 16:02:56 +0000
commite5facb2cd00fca595d4b37c4de8ad0938d9eac25 (patch)
tree3649d96bf82dc8d1e075069662e6a71ab9764073 /src/channels.cpp
parent6fff3c54be91dbbfe5e3ffca4204ad0378d70b7d (diff)
Tweaks to instantiate less stuff when writing to a bunch of users
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6172 e03df62e-2008-0410-955e-edbf42e46eb7
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);
}
}
}