From ea3ba4bfd1b072b4f14fb588286eedd0ea8c1d22 Mon Sep 17 00:00:00 2001 From: brain Date: Wed, 23 Aug 2006 21:34:04 +0000 Subject: Multi-prefix FJOIN, and allowing module-defined prefixes across the network git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5002 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/channels.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'src/channels.cpp') diff --git a/src/channels.cpp b/src/channels.cpp index d417ab763..e7564c3ea 100644 --- a/src/channels.cpp +++ b/src/channels.cpp @@ -906,6 +906,26 @@ const char* chanrec::GetPrefixChar(userrec *user) return px; } +const char* chanrec::GetAllPrefixChars(userrec* user) +{ + static char prefix[MAXBUF]; + int ctr = 0; + *prefix = 0; + + prefixlist::iterator n = prefixes.find(user); + if (n != prefixes.end()) + { + for (std::vector::iterator x = n->second.begin(); x != n->second.end(); x++) + { + prefix[ctr++] = x->first; + } + } + + prefix[ctr] = 0; + + return prefix; +} + unsigned int chanrec::GetPrefixValue(userrec* user) { unsigned int mx = 0; -- cgit v1.3.1-10-gc9f91