diff options
author | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-04-01 16:30:49 +0000 |
---|---|---|
committer | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-04-01 16:30:49 +0000 |
commit | 1fe8085c6dbecc9558e61ea1829dbf3fcb41830e (patch) | |
tree | 059a6417749695fe232125d974c84b5d79bd184b | |
parent | 5b4e92cc2ca9a08a1a9740daa25c64578325ed78 (diff) |
Remove this, it won't work (reliably), use ModeParser::ModeString() instead, ta B
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9243 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r-- | include/channels.h | 6 | ||||
-rw-r--r-- | src/channels.cpp | 29 | ||||
-rw-r--r-- | src/modules/m_spanningtree/netburst.cpp | 2 |
3 files changed, 1 insertions, 36 deletions
diff --git a/include/channels.h b/include/channels.h index 7ef73bb10..693f429f4 100644 --- a/include/channels.h +++ b/include/channels.h @@ -491,12 +491,6 @@ class CoreExport Channel : public Extensible */ const char* GetAllPrefixChars(User* user); - /** Returns all of the prefix MODES a user has on channel. - * @param user The user to look up - * @return A list of all prefix modes. - */ - const char *GetAllPrefixModes(User *user); - /** Get the value of a users prefix on this channel. * @param user The user to look up * @return The module or core-defined value of the users prefix. diff --git a/src/channels.cpp b/src/channels.cpp index dd41d1344..6782ffc5b 100644 --- a/src/channels.cpp +++ b/src/channels.cpp @@ -1001,35 +1001,6 @@ const char* Channel::GetAllPrefixChars(User* user) return prefix; } - -const char* Channel::GetAllPrefixModes(User* user) -{ - static char prefix[MAXBUF]; - int ctr = 0; - *prefix = 0; - - prefixlist::iterator n = prefixes.find(user); - if (n != prefixes.end()) - { - for (std::vector<prefixtype>::iterator x = n->second.begin(); x != n->second.end(); x++) - { - ModeHandler *mh = ServerInstance->Modes->FindPrefix(x->first); - - if (!mh) - { - ServerInstance->Logs->Log("MODES", DEFAULT, "WTF: Can't find mode from prefix %c", x->first); - throw CoreException("I can't find a mode from prefix, HALP!"); - } - else - prefix[ctr++] = mh->GetModeChar(); - } - } - - prefix[ctr] = 0; - - return prefix; -} - unsigned int Channel::GetPrefixValue(User* user) { prefixlist::iterator n = prefixes.find(user); diff --git a/src/modules/m_spanningtree/netburst.cpp b/src/modules/m_spanningtree/netburst.cpp index 4e6c1dfd1..978a798ff 100644 --- a/src/modules/m_spanningtree/netburst.cpp +++ b/src/modules/m_spanningtree/netburst.cpp @@ -97,7 +97,7 @@ void TreeSocket::SendFJoins(TreeServer* Current, Channel* c) for (CUList::iterator i = ulist->begin(); i != ulist->end(); i++) { // The first parameter gets a : before it - size_t ptrlen = snprintf(ptr, MAXBUF, " %s%s,%s", !numusers ? ":" : "", c->GetAllPrefixModes(i->first), i->first->uuid); + size_t ptrlen = snprintf(ptr, MAXBUF, " %s%s,%s", !numusers ? ":" : "", this->Instance->Modes->ModeString(i->first, c, false).c_str(), i->first->uuid); curlen += ptrlen; ptr += ptrlen; |