X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fwildcard.cpp;h=f9e706906b3f4bbe3339b22b36088680a035bf6d;hb=e2b0f3dc9ef4d56c71d7abda13e6139ca092e387;hp=b62fd8a613d1b82802390a1d3178abae290daab9;hpb=1e89f510705753a33644b0356cdd902ecc2d9128;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/wildcard.cpp b/src/wildcard.cpp index b62fd8a61..f9e706906 100644 --- a/src/wildcard.cpp +++ b/src/wildcard.cpp @@ -1,8 +1,11 @@ /* * InspIRCd -- Internet Relay Chat Daemon * - * Copyright (C) 2008 Robin Burchell - * Copyright (C) 2003, 2006-2008 Craig Edwards + * Copyright (C) 2013, 2017 Sadie Powell + * Copyright (C) 2012 Robby + * Copyright (C) 2009 Uli Schlachter + * Copyright (C) 2008, 2010 Craig Edwards + * Copyright (C) 2007-2008 Robin Burchell * Copyright (C) 2007-2008 Dennis Friis * * This file is part of InspIRCd. InspIRCd is free software: you can @@ -20,8 +23,6 @@ #include "inspircd.h" -#include "hashcomp.h" -#include "inspstring.h" static bool MatchInternal(const unsigned char* str, const unsigned char* mask, unsigned const char* map) { @@ -111,9 +112,9 @@ bool InspIRCd::MatchCIDR(const char* str, const char* mask, unsigned const char* bool InspIRCd::MatchMask(const std::string& masks, const std::string& hostname, const std::string& ipaddr) { - std::stringstream masklist(masks); + irc::spacesepstream masklist(masks); std::string mask; - while (masklist >> mask) + while (masklist.GetToken(mask)) { if (InspIRCd::Match(hostname, mask, ascii_case_insensitive_map) || InspIRCd::MatchCIDR(ipaddr, mask, ascii_case_insensitive_map))