]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_spanningtree/fjoin.cpp
Make the maximum hostname length configurable in the config.
[user/henk/code/inspircd.git] / src / modules / m_spanningtree / fjoin.cpp
index d697af63d52f1d93d37b7d35bf14de6887d34d84..ea7711332d0877c828b35a0bbbff9c2ffbd988ed 100644 (file)
@@ -214,16 +214,16 @@ void CommandFJoin::RemoveStatus(Channel* c)
 {
        irc::modestacker stack(false);
 
-       for (char modeletter = 'A'; modeletter <= 'z'; ++modeletter)
+       const ModeParser::ModeHandlerMap& mhs = ServerInstance->Modes->GetModes(MODETYPE_CHANNEL);
+       for (ModeParser::ModeHandlerMap::const_iterator i = mhs.begin(); i != mhs.end(); ++i)
        {
-               ModeHandler* mh = ServerInstance->Modes->FindMode(modeletter, MODETYPE_CHANNEL);
+               ModeHandler* mh = i->second;
 
                /* Passing a pointer to a modestacker here causes the mode to be put onto the mode stack,
                 * rather than applied immediately. Module unloads require this to be done immediately,
                 * for this function we require tidyness instead. Fixes bug #493
                 */
-               if (mh)
-                       mh->RemoveMode(c, stack);
+               mh->RemoveMode(c, stack);
        }
 
        ApplyModeStack(ServerInstance->FakeClient, c, stack);