diff options
| author | 2014-02-21 15:11:24 +0100 | |
|---|---|---|
| committer | 2014-02-21 15:11:24 +0100 | |
| commit | 7ffef79f97c8dc9f21da35dff9f822be7f62edf3 (patch) | |
| tree | 075be36de9df1ee6e1a5845343e4bf970824dc00 /src/channels.cpp | |
| parent | Assign an id to user modes, parameter chanmodes and simple chanmodes (diff) | |
Index Channel::modes and User::modes with the id of the mode instead of its letter
Diffstat (limited to 'src/channels.cpp')
| -rw-r--r-- | src/channels.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/channels.cpp b/src/channels.cpp index 448764e1c..99c25fbfc 100644 --- a/src/channels.cpp +++ b/src/channels.cpp @@ -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) |
