From 2696e5f05d2e4720706ab12371d56d5dafe0f9ab Mon Sep 17 00:00:00 2001 From: brain Date: Fri, 28 Jul 2006 10:53:54 +0000 Subject: Change chlist() to use a chained append git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4566 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/message.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src') 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; } -- cgit v1.2.3