diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/m_helpop.cpp | 20 | ||||
-rw-r--r-- | src/modules/m_operchans.cpp | 14 |
2 files changed, 8 insertions, 26 deletions
diff --git a/src/modules/m_helpop.cpp b/src/modules/m_helpop.cpp index 5aa719c2f..d957fb786 100644 --- a/src/modules/m_helpop.cpp +++ b/src/modules/m_helpop.cpp @@ -39,17 +39,6 @@ enum typedef std::map<std::string, std::string, irc::insensitive_swo> HelpopMap; static HelpopMap helpop_map; -/** Handles user mode +h - */ -class Helpop : public SimpleUserModeHandler -{ - public: - Helpop(Module* Creator) : SimpleUserModeHandler(Creator, "helpop", 'h') - { - oper = true; - } -}; - /** Handles /HELPOP */ class CommandHelpop : public Command @@ -107,16 +96,19 @@ class CommandHelpop : public Command } }; -class ModuleHelpop : public Module, public Whois::EventListener +class ModuleHelpop + : public Module + , public Whois::EventListener { + private: CommandHelpop cmd; - Helpop ho; + SimpleUserModeHandler ho; public: ModuleHelpop() : Whois::EventListener(this) , cmd(this) - , ho(this) + , ho(this, "helpop", 'h', true) { } diff --git a/src/modules/m_operchans.cpp b/src/modules/m_operchans.cpp index 8f6003923..6863fc244 100644 --- a/src/modules/m_operchans.cpp +++ b/src/modules/m_operchans.cpp @@ -28,26 +28,16 @@ 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 { private: - OperChans oc; + SimpleChannelModeHandler oc; std::string space; std::string underscore; public: ModuleOperChans() - : oc(this) + : oc(this, "operonly", 'O', true) , space(" ") , underscore("_") { |