]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_restrictchans.cpp
Fix the cloaking module on C++98 compilers.
[user/henk/code/inspircd.git] / src / modules / m_restrictchans.cpp
index 853b6b75c14d647e000efbf2419c1af16bf1969d..6327ea48704f4deed4e91df6669fa669c16ab537 100644 (file)
@@ -1,10 +1,13 @@
 /*
  * InspIRCd -- Internet Relay Chat Daemon
  *
+ *   Copyright (C) 2018-2019 linuxdaemon <linuxdaemon.irc@gmail.com>
+ *   Copyright (C) 2013, 2020 Sadie Powell <sadie@witchery.services>
+ *   Copyright (C) 2013 Attila Molnar <attilamolnar@hush.com>
+ *   Copyright (C) 2012 Robby <robby@chatbelgie.be>
  *   Copyright (C) 2009 Daniel De Graaf <danieldg@inspircd.org>
  *   Copyright (C) 2007 Dennis Friis <peavey@inspircd.org>
- *   Copyright (C) 2007 Robin Burchell <robin+git@viroteck.net>
- *   Copyright (C) 2005-2006 Craig Edwards <craigedwards@brainbox.cc>
+ *   Copyright (C) 2005, 2007, 2010 Craig Edwards <brain@inspircd.org>
  *
  * 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
@@ -77,14 +80,17 @@ class ModuleRestrictChans : public Module
        {
                // channel does not yet exist (record is null, about to be created IF we were to allow it)
                if (!chan && !CanCreateChannel(user, cname))
+               {
+                       user->WriteNumeric(ERR_BANNEDFROMCHAN, cname, "You are not allowed to create new channels.");
                        return MOD_RES_DENY;
+               }
 
                return MOD_RES_PASSTHRU;
        }
 
        Version GetVersion() CXX11_OVERRIDE
        {
-               return Version("Allows restricting who can create channels", VF_VENDOR);
+               return Version("Prevents unprivileged users from creating new channels.", VF_VENDOR);
        }
 };