]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_services_account.cpp
Merge pull request #173 from Robby-/insp20-moddesc
[user/henk/code/inspircd.git] / src / modules / m_services_account.cpp
index 4b047ea0703d29364d881ac5583de20a90dd44ca..7f3c5490719eb6e72bc57b54b98b33d4f4fc31d4 100644 (file)
@@ -1,21 +1,31 @@
-/*       +------------------------------------+
- *       | 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 Daniel De Graaf <danieldg@inspircd.org>
+ *   Copyright (C) 2006-2008 Robin Burchell <robin+git@viroteck.net>
+ *   Copyright (C) 2008 Pippijn van Steenhoven <pip88nl@gmail.com>
+ *   Copyright (C) 2006, 2008 Craig Edwards <craigedwards@brainbox.cc>
+ *   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/>.
  */
 
+
+/* $ModDesc: Provides support for ircu-style services accounts, including chmode +R, etc. */
+
 #include "inspircd.h"
 #include "account.h"
 
-/* $ModDesc: Povides support for ircu-style services accounts, including chmode +R, etc. */
-
 /** Channel mode +r - mark a channel as identified
  */
 class Channel_r : public ModeHandler
@@ -154,7 +164,7 @@ class ModuleServicesAccount : public Module
                        std::vector<std::string> modechange;
                        modechange.push_back(user->nick);
                        modechange.push_back("-r");
-                       ServerInstance->SendMode(modechange, user);
+                       ServerInstance->SendMode(modechange, ServerInstance->FakeClient);
                }
        }
 
@@ -175,8 +185,7 @@ class ModuleServicesAccount : public Module
                if (target_type == TYPE_CHANNEL)
                {
                        Channel* c = (Channel*)dest;
-                       ModResult res;
-                       FIRST_MOD_RESULT(OnChannelRestrictionApply, res, (user,c,"regmoderated"));
+                       ModResult res = ServerInstance->OnCheckExemption(user,c,"regmoderated");
 
                        if (c->IsModeSet('M') && !is_registered && res != MOD_RES_ALLOW)
                        {
@@ -280,7 +289,7 @@ class ModuleServicesAccount : public Module
 
        Version GetVersion()
        {
-               return Version("Povides support for ircu-style services accounts, including chmode +R, etc.",VF_OPTCOMMON|VF_VENDOR);
+               return Version("Provides support for ircu-style services accounts, including chmode +R, etc.",VF_OPTCOMMON|VF_VENDOR);
        }
 };