]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/helperfuncs.cpp
mlock: handle case where no mlock has been set on a channel yet
[user/henk/code/inspircd.git] / src / helperfuncs.cpp
index 98dd1fc7ff1661d7ca527f121e5a11db0e99df06..edb5005d25e049e009365e9f12a91c4b45a578a5 100644 (file)
@@ -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 <danieldg@inspircd.org>
+ *   Copyright (C) 2006-2008 Robin Burchell <robin+git@viroteck.net>
+ *   Copyright (C) 2005-2008 Craig Edwards <craigedwards@brainbox.cc>
+ *   Copyright (C) 2008 Thomas Stagner <aquanight@inspircd.org>
+ *   Copyright (C) 2006-2007 Oliver Lupton <oliverlupton@gmail.com>
+ *   Copyright (C) 2007 Dennis Friis <peavey@inspircd.org>
  *
- * 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 <http://www.gnu.org/licenses/>.
  */
 
+
 /* $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"));