]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/channels.cpp
Create the core_xline module
[user/henk/code/inspircd.git] / src / channels.cpp
index 448764e1c46a3c272d6a908a0e321ecb261dc073..99c25fbfc8777cd9c386660b849704c1d0a5d35b 100644 (file)
@@ -48,7 +48,7 @@ Channel::Channel(const std::string &cname, time_t ts)
 
 void Channel::SetMode(ModeHandler* mh, bool on)
 {
-       modes[mh->GetModeChar() - 65] = on;
+       modes[mh->GetId()] = on;
 }
 
 void Channel::SetTopic(User* u, const std::string& ntopic)
@@ -598,12 +598,10 @@ const char* Channel::ChanModes(bool showkey)
        /* This was still iterating up to 190, Channel::modes is only 64 elements -- Om */
        for(int n = 0; n < 64; n++)
        {
-               if(this->modes[n])
+               ModeHandler* mh = ServerInstance->Modes->FindMode(n + 65, MODETYPE_CHANNEL);
+               if (mh && IsModeSet(mh))
                {
                        scratch.push_back(n + 65);
-                       ModeHandler* mh = ServerInstance->Modes->FindMode(n+'A', MODETYPE_CHANNEL);
-                       if (!mh)
-                               continue;
 
                        ParamModeBase* pm = mh->IsParameterMode();
                        if (!pm)