diff options
Diffstat (limited to 'src/channels.cpp')
-rw-r--r-- | src/channels.cpp | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/channels.cpp b/src/channels.cpp index c47bcb119..a8f8db43c 100644 --- a/src/channels.cpp +++ b/src/channels.cpp @@ -756,20 +756,16 @@ unsigned int Membership::getRank() return rv; } -const char* Channel::GetAllPrefixChars(User* user) +const char* Membership::GetAllPrefixChars() const { static char prefix[64]; int ctr = 0; - UserMembIter m = userlist.find(user); - if (m != userlist.end()) + for (std::string::const_iterator i = modes.begin(); i != modes.end(); ++i) { - for(unsigned int i=0; i < m->second->modes.length(); i++) - { - PrefixMode* mh = ServerInstance->Modes->FindPrefixMode(m->second->modes[i]); - if (mh && mh->GetPrefix()) - prefix[ctr++] = mh->GetPrefix(); - } + PrefixMode* mh = ServerInstance->Modes->FindPrefixMode(*i); + if (mh && mh->GetPrefix()) + prefix[ctr++] = mh->GetPrefix(); } prefix[ctr] = 0; |