]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_channames.cpp
Change type of log messages to MODNAME in several modules
[user/henk/code/inspircd.git] / src / modules / m_channames.cpp
index 1fb5b2a409324795c2439e3261c77a0b2294cc01..7513cb33ab591b30fe77cb7670c91edb9cd568e5 100644 (file)
@@ -64,6 +64,8 @@ class ModuleChannelNames : public Module
 
        void ValidateChans()
        {
+               Modes::ChangeList removepermchan;
+
                badchan = true;
                const chan_hash& chans = ServerInstance->GetChans();
                for (chan_hash::const_iterator i = chans.begin(); i != chans.end(); )
@@ -76,12 +78,11 @@ class ModuleChannelNames : public Module
 
                        if (c->IsModeSet(permchannelmode) && c->GetUserCounter())
                        {
-                               std::vector<std::string> modes;
-                               modes.push_back(c->name);
-                               modes.push_back(std::string("-") + permchannelmode->GetModeChar());
-
-                               ServerInstance->Modes->Process(modes, ServerInstance->FakeClient);
+                               removepermchan.clear();
+                               removepermchan.push_remove(*permchannelmode);
+                               ServerInstance->Modes->Process(ServerInstance->FakeClient, c, NULL, removepermchan);
                        }
+
                        Channel::MemberMap& users = c->userlist;
                        for (Channel::MemberMap::iterator j = users.begin(); j != users.end(); )
                        {