aboutsummaryrefslogtreecommitdiff
path: root/src/modules/m_operchans.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2020-01-17 12:27:03 +0000
committerGravatar Sadie Powell2020-01-17 12:36:09 +0000
commit1de6f5b4a99d8f36d589cb2404cb510e7434afe1 (patch)
treed4dfa45b2ee444d9e9c9dcfe823da9e6d955f753 /src/modules/m_operchans.cpp
parentMove ISupport logic out of the core and into core_info. (diff)
parentUse irc::equals instead of strcasecmp where appropriate. (diff)
Merge branch 'insp3' into master.
Diffstat (limited to 'src/modules/m_operchans.cpp')
-rw-r--r--src/modules/m_operchans.cpp27
1 files changed, 10 insertions, 17 deletions
diff --git a/src/modules/m_operchans.cpp b/src/modules/m_operchans.cpp
index c6cc27fc7..d5878a799 100644
--- a/src/modules/m_operchans.cpp
+++ b/src/modules/m_operchans.cpp
@@ -1,10 +1,13 @@
/*
* InspIRCd -- Internet Relay Chat Daemon
*
- * Copyright (C) 2009 Daniel De Graaf <danieldg@inspircd.org>
+ * Copyright (C) 2013, 2018-2020 Sadie Powell <sadie@witchery.services>
+ * Copyright (C) 2012-2013 Attila Molnar <attilamolnar@hush.com>
+ * Copyright (C) 2012, 2019 Robby <robby@chatbelgie.be>
+ * Copyright (C) 2009-2010 Daniel De Graaf <danieldg@inspircd.org>
+ * Copyright (C) 2009 Uli Schlachter <psychon@inspircd.org>
* Copyright (C) 2007 Dennis Friis <peavey@inspircd.org>
- * Copyright (C) 2007 Robin Burchell <robin+git@viroteck.net>
- * Copyright (C) 2004, 2006 Craig Edwards <craigedwards@brainbox.cc>
+ * Copyright (C) 2006, 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
@@ -29,29 +32,19 @@ enum
ERR_CANTJOINOPERSONLY = 520
};
-class OperChans : public SimpleChannelModeHandler
-{
- public:
- /* This is an oper-only mode */
- OperChans(Module* Creator) : SimpleChannelModeHandler(Creator, "operonly", 'O')
- {
- oper = true;
- }
-};
-
class ModuleOperChans
: public Module
, public ISupport::EventListener
{
private:
- OperChans oc;
- std::string space;
- std::string underscore;
+ SimpleChannelModeHandler oc;
+ const std::string space;
+ const std::string underscore;
public:
ModuleOperChans()
: ISupport::EventListener(this)
- , oc(this)
+ , oc(this, "operonly", 'O', true)
, space(" ")
, underscore("_")
{