X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Finspstring.cpp;h=3cbf0660282a5b082b36fd53d1e1e83ba7d4a1d1;hb=868dc21ffbf73921f24ba0c31708feb21556dae6;hp=283c00d5b2fd7cfe458df77000ed55a96aea7597;hpb=35b70631f0532a5828b04a8e0c02092a285f331a;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/inspstring.cpp b/src/inspstring.cpp index 283c00d5b..3cbf06602 100644 --- a/src/inspstring.cpp +++ b/src/inspstring.cpp @@ -1,9 +1,14 @@ /* * InspIRCd -- Internet Relay Chat Daemon * - * Copyright (C) 2010 Daniel De Graaf + * Copyright (C) 2017-2018 Sadie Powell + * Copyright (C) 2013-2014 Attila Molnar + * Copyright (C) 2012 Robby + * Copyright (C) 2010 Craig Edwards + * Copyright (C) 2009-2010 Daniel De Graaf + * Copyright (C) 2009 Uli Schlachter + * Copyright (C) 2007 Robin Burchell * Copyright (C) 2007 Dennis Friis - * Copyright (C) 2005-2007 Craig Edwards * * This file is part of InspIRCd. InspIRCd is free software: you can * redistribute it and/or modify it under the terms of the GNU General Public @@ -136,7 +141,6 @@ void TokenList::AddList(const std::string& tokenlist) else Add(token); } - } void TokenList::Add(const std::string& token) { @@ -206,12 +210,8 @@ void TokenList::Remove(const std::string& token) std::string TokenList::ToString() const { - std::string buffer(permissive ? "*" : "-*"); - for (insp::flat_set::const_iterator iter = tokens.begin(); iter != tokens.end(); ++iter) - { - buffer.push_back(' '); - buffer.append(*iter); - } + std::string buffer(permissive ? "* " : "-* "); + buffer.append(stdalgo::string::join(tokens)); return buffer; }