]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/inspstring.cpp
Fix some confusing logic in sanick.
[user/henk/code/inspircd.git] / src / inspstring.cpp
index 283c00d5b2fd7cfe458df77000ed55a96aea7597..3cbf0660282a5b082b36fd53d1e1e83ba7d4a1d1 100644 (file)
@@ -1,9 +1,14 @@
 /*
  * InspIRCd -- Internet Relay Chat Daemon
  *
- *   Copyright (C) 2010 Daniel De Graaf <danieldg@inspircd.org>
+ *   Copyright (C) 2017-2018 Sadie Powell <sadie@witchery.services>
+ *   Copyright (C) 2013-2014 Attila Molnar <attilamolnar@hush.com>
+ *   Copyright (C) 2012 Robby <robby@chatbelgie.be>
+ *   Copyright (C) 2010 Craig Edwards <brain@inspircd.org>
+ *   Copyright (C) 2009-2010 Daniel De Graaf <danieldg@inspircd.org>
+ *   Copyright (C) 2009 Uli Schlachter <psychon@inspircd.org>
+ *   Copyright (C) 2007 Robin Burchell <robin+git@viroteck.net>
  *   Copyright (C) 2007 Dennis Friis <peavey@inspircd.org>
- *   Copyright (C) 2005-2007 Craig Edwards <craigedwards@brainbox.cc>
  *
  * 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<std::string>::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;
 }