X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_namedmodes.cpp;h=8647cebb454daa4cd9aacfa8a78a78a2de78e39b;hb=67de413cad88194972d55a8ff88464370890c5a9;hp=3e27092a7fbb1ec1e329fe5eb9117cd3859b9baf;hpb=4ab1c43c1eee708fc50a4808f714a731891b75e8;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_namedmodes.cpp b/src/modules/m_namedmodes.cpp index 3e27092a7..8647cebb4 100644 --- a/src/modules/m_namedmodes.cpp +++ b/src/modules/m_namedmodes.cpp @@ -17,8 +17,6 @@ */ -/* $ModDesc: Provides the ability to manipulate modes via long names. */ - #include "inspircd.h" static void DisplayList(User* user, Channel* channel) @@ -29,11 +27,11 @@ static void DisplayList(User* user, Channel* channel) ModeHandler* mh = ServerInstance->Modes->FindMode(letter, MODETYPE_CHANNEL); if (!mh || mh->IsListMode()) continue; - if (!channel->IsModeSet(letter)) + if (!channel->IsModeSet(mh)) continue; items << " +" << mh->name; if (mh->GetNumParams(true)) - items << " " << channel->GetModeParameter(letter); + items << " " << channel->GetModeParameter(mh); } const std::string line = ":" + ServerInstance->Config->ServerName + " 961 " + user->nick + " " + channel->name; user->SendText(line, items); @@ -82,7 +80,7 @@ class CommandProp : public Command } } } - ServerInstance->SendGlobalMode(modes, src); + ServerInstance->Modes->Process(modes, src); return CMD_SUCCESS; } }; @@ -109,9 +107,6 @@ class ModuleNamedModes : public Module { ServerInstance->Modules->AddService(cmd); ServerInstance->Modules->AddService(dummyZ); - - Implementation eventlist[] = { I_OnPreMode }; - ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); } Version GetVersion() CXX11_OVERRIDE @@ -196,7 +191,7 @@ class ModuleNamedModes : public Module } } newparms[1] = modelist; - ServerInstance->Modes->Process(newparms, source, false); + ServerInstance->Modes->Process(newparms, source); return MOD_RES_DENY; } };