From bb1f70114cb986aca7299b8a48f6e727853b426c Mon Sep 17 00:00:00 2001 From: danieldg Date: Fri, 5 Mar 2010 18:25:45 +0000 Subject: Register channel mode Z when enabled git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12592 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_namedmodes.cpp | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) (limited to 'src/modules/m_namedmodes.cpp') diff --git a/src/modules/m_namedmodes.cpp b/src/modules/m_namedmodes.cpp index 638d1d29c..7de6a6caa 100644 --- a/src/modules/m_namedmodes.cpp +++ b/src/modules/m_namedmodes.cpp @@ -83,17 +83,19 @@ class CommandProp : public Command class ModuleNamedModes : public Module { CommandProp cmd; + ModeHandler dummyZ; public: - ModuleNamedModes() : cmd(this) + ModuleNamedModes() : cmd(this), dummyZ(this, "namebase", 'Z', PARAM_ALWAYS, MODETYPE_CHANNEL) { } void init() { ServerInstance->Modules->AddService(cmd); + ServerInstance->Modules->AddService(dummyZ); - Implementation eventlist[] = { I_OnPreMode, I_On005Numeric }; - ServerInstance->Modules->Attach(eventlist, this, 2); + Implementation eventlist[] = { I_OnPreMode }; + ServerInstance->Modules->Attach(eventlist, this, 1); } Version GetVersion() @@ -106,18 +108,6 @@ class ModuleNamedModes : public Module ServerInstance->Modules->SetPriority(this, I_OnPreMode, PRIORITY_FIRST); } - void On005Numeric(std::string& line) - { - std::string::size_type pos = line.find(" CHANMODES="); - if (pos != std::string::npos) - { - pos += 11; - while (line[pos] > 'A' && line[pos] < 'Z') - pos++; - line.insert(pos, 1, 'Z'); - } - } - ModResult OnPreMode(User* source, User* dest, Channel* channel, const std::vector& parameters) { if (!channel) -- cgit v1.2.3