summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2010-03-05 18:25:45 +0000
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2010-03-05 18:25:45 +0000
commitbb1f70114cb986aca7299b8a48f6e727853b426c (patch)
tree92a125d66ac782e514bbe3cb902492cfffb5dd1d
parent96309c9e90994ecdfb8c98db81551c4b34aa410c (diff)
Register channel mode Z when enabled
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12592 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--src/modules/m_namedmodes.cpp20
1 files changed, 5 insertions, 15 deletions
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<std::string>& parameters)
{
if (!channel)