]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_auditorium.cpp
Add support for blocking tag messages with the deaf mode.
[user/henk/code/inspircd.git] / src / modules / m_auditorium.cpp
index 81824279510f5275dd77e1ac0d5aca8eff3d36a8..0e18d3e36444f22348016b125b48416964a6723f 100644 (file)
@@ -1,10 +1,13 @@
 /*
  * InspIRCd -- Internet Relay Chat Daemon
  *
+ *   Copyright (C) 2013-2014, 2016, 2018 Attila Molnar <attilamolnar@hush.com>
+ *   Copyright (C) 2013, 2017-2019 Sadie Powell <sadie@witchery.services>
+ *   Copyright (C) 2012, 2019 Robby <robby@chatbelgie.be>
  *   Copyright (C) 2009-2010 Daniel De Graaf <danieldg@inspircd.org>
- *   Copyright (C) 2007-2008 Craig Edwards <craigedwards@brainbox.cc>
- *   Copyright (C) 2007 Dennis Friis <peavey@inspircd.org>
- *   Copyright (C) 2007 Robin Burchell <robin+git@viroteck.net>
+ *   Copyright (C) 2008 Robin Burchell <robin+git@viroteck.net>
+ *   Copyright (C) 2007-2008, 2010 Craig Edwards <brain@inspircd.org>
+ *   Copyright (C) 2007, 2009 Dennis Friis <peavey@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
@@ -22,6 +25,7 @@
 
 #include "inspircd.h"
 #include "modules/exemption.h"
+#include "modules/names.h"
 #include "modules/who.h"
 
 class AuditoriumMode : public SimpleChannelModeHandler
@@ -58,6 +62,7 @@ class JoinHook : public ClientProtocol::EventHook
 
 class ModuleAuditorium
        : public Module
+       , public Names::EventListener
        , public Who::EventListener
 {
        CheckExemption::EventProvider exemptionprov;
@@ -69,7 +74,8 @@ class ModuleAuditorium
 
  public:
        ModuleAuditorium()
-               : Who::EventListener(this)
+               : Names::EventListener(this)
+               , Who::EventListener(this)
                , exemptionprov(this)
                , aum(this)
                , joinhook(this)
@@ -86,7 +92,7 @@ class ModuleAuditorium
 
        Version GetVersion() CXX11_OVERRIDE
        {
-               return Version("Allows for auditorium channels (+u) where nobody can see others joining and parting or the nick list", VF_VENDOR);
+               return Version("Adds channel mode u (auditorium) which hides unprivileged users in a channel from each other.", VF_VENDOR);
        }
 
        /* Can they be seen by everyone? */
@@ -118,7 +124,7 @@ class ModuleAuditorium
                return false;
        }
 
-       ModResult OnNamesListItem(User* issuer, Membership* memb, std::string& prefixes, std::string& nick) CXX11_OVERRIDE
+       ModResult OnNamesListItem(LocalUser* issuer, Membership* memb, std::string& prefixes, std::string& nick) CXX11_OVERRIDE
        {
                if (IsVisible(memb))
                        return MOD_RES_PASSTHRU;