diff options
| author | 2016-08-30 16:33:46 +0200 | |
|---|---|---|
| committer | 2016-08-30 16:33:46 +0200 | |
| commit | 6a35f493f316be130357dd2c75b64343a3aacdeb (patch) | |
| tree | 3a481eb1ffff84f92e3e735d744a0b88c61e0963 /src/channels.cpp | |
| parent | m_deaf Remove pointless member prefix check (diff) | |
Return std::string from Membership::GetAllPrefixChars()
Diffstat (limited to 'src/channels.cpp')
| -rw-r--r-- | src/channels.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/channels.cpp b/src/channels.cpp index a757cdc5a..49fa75f98 100644 --- a/src/channels.cpp +++ b/src/channels.cpp @@ -611,20 +611,17 @@ unsigned int Membership::getRank() return rv; } -const char* Membership::GetAllPrefixChars() const +std::string Membership::GetAllPrefixChars() const { - static char prefix[64]; - int ctr = 0; - + std::string ret; for (std::string::const_iterator i = modes.begin(); i != modes.end(); ++i) { PrefixMode* mh = ServerInstance->Modes->FindPrefixMode(*i); if (mh && mh->GetPrefix()) - prefix[ctr++] = mh->GetPrefix(); + ret.push_back(mh->GetPrefix()); } - prefix[ctr] = 0; - return prefix; + return ret; } unsigned int Channel::GetPrefixValue(User* user) |
