X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fhelperfuncs.cpp;h=edb5005d25e049e009365e9f12a91c4b45a578a5;hb=663f0620bea4dc1e64ec640992f4d511ae1ef97b;hp=98dd1fc7ff1661d7ca527f121e5a11db0e99df06;hpb=4d46f5f9ef94c295649afad38c6d496ae2bbe5e1;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/helperfuncs.cpp b/src/helperfuncs.cpp index 98dd1fc7f..edb5005d2 100644 --- a/src/helperfuncs.cpp +++ b/src/helperfuncs.cpp @@ -1,16 +1,27 @@ -/* +------------------------------------+ - * | Inspire Internet Relay Chat Daemon | - * +------------------------------------+ +/* + * InspIRCd -- Internet Relay Chat Daemon * - * InspIRCd: (C) 2002-2010 InspIRCd Development Team - * See: http://wiki.inspircd.org/Credits + * Copyright (C) 2009-2010 Daniel De Graaf + * Copyright (C) 2006-2008 Robin Burchell + * Copyright (C) 2005-2008 Craig Edwards + * Copyright (C) 2008 Thomas Stagner + * Copyright (C) 2006-2007 Oliver Lupton + * Copyright (C) 2007 Dennis Friis * - * This program is free but copyrighted software; see - * the file COPYING for details. + * 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 + * License as published by the Free Software Foundation, version 2. * - * --------------------------------------------------- + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more + * details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ + /* $Core */ #include "inspircd.h" @@ -173,6 +184,9 @@ bool InspIRCd::IsValidMask(const std::string &mask) if (exclamation != 1 || atsign != 1) return false; + if (mask.length() > 250) + return false; + return true; } @@ -443,7 +457,7 @@ void GenRandomHandler::Call(char *output, size_t max) ModResult OnCheckExemptionHandler::Call(User* user, Channel* chan, const std::string& restriction) { unsigned int mypfx = chan->GetPrefixValue(user); - char minmode; + char minmode = 0; std::string current; irc::spacesepstream defaultstream(ServerInstance->Config->ConfValue("options")->getString("exemptchanops"));