summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-07-28 10:53:54 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-07-28 10:53:54 +0000
commit2696e5f05d2e4720706ab12371d56d5dafe0f9ab (patch)
tree324b56791526d55e3a856190cc1a8fcdab39697d
parentea7ec0c1c1219ebfd682c0bfef189b635bc146d7 (diff)
Change chlist() to use a chained append
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4566 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--src/message.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/message.cpp b/src/message.cpp
index e4dc380cd..483cf87d0 100644
--- a/src/message.cpp
+++ b/src/message.cpp
@@ -312,8 +312,7 @@ char lst[MAXBUF];
std::string chlist(userrec *user,userrec* source)
{
- /* Should this be a stringstream? Not sure if it would be faster as streams are more oriented at appending stuff, which is all we do */
- std::ostringstream list;
+ std::string list;
if (!user || !source)
return "";
@@ -336,11 +335,11 @@ std::string chlist(userrec *user,userrec* source)
*/
if ((source == user) || (*source->oper && Config->OperSpyWhois) || (((!rec->channel->modes[CM_PRIVATE]) && (!rec->channel->modes[CM_SECRET]) && !(user->modes[UM_INVISIBLE])) || (rec->channel->HasUser(source))))
{
- list << cmode(user, rec->channel) << rec->channel->name << " ";
+ list.append(cmode(user, rec->channel)).append(rec->channel->name).append(" ");
}
//}
}
}
- return list.str();
+ return list;
}