summaryrefslogtreecommitdiff
path: root/src/channels.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-08-23 20:50:20 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-08-23 20:50:20 +0000
commit1b87725fef508089024ffaf3d7dd0818c1c9a417 (patch)
tree962ae922e3de70a943d1c543d173fa9651816b4f /src/channels.cpp
parentb83765d756c2568d15b87654963b5237d0482367 (diff)
Document mode prefixes
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4999 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/channels.cpp')
-rw-r--r--src/channels.cpp24
1 files changed, 20 insertions, 4 deletions
diff --git a/src/channels.cpp b/src/channels.cpp
index 312e78aa6..048b77a1f 100644
--- a/src/channels.cpp
+++ b/src/channels.cpp
@@ -880,9 +880,9 @@ long chanrec::GetMaxBans()
/* returns the status character for a given user on a channel, e.g. @ for op,
* % for halfop etc. If the user has several modes set, the highest mode
- * the user has must be returned. */
-
-const char* chanrec::GetStatusChar(userrec *user)
+ * the user has must be returned.
+ */
+const char* chanrec::GetPrefixChar(userrec *user)
{
static char px[2];
unsigned int mx = 0;
@@ -906,6 +906,23 @@ const char* chanrec::GetStatusChar(userrec *user)
return px;
}
+unsigned int chanrec::GetPrefixValue(userrec* user)
+{
+ unsigned int mx = 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++)
+ {
+ if (x->second > mx)
+ mx = x->second;
+ }
+ }
+
+ return mx;
+}
+
int chanrec::GetStatusFlags(userrec *user)
{
@@ -920,7 +937,6 @@ int chanrec::GetStatusFlags(userrec *user)
}
-
int chanrec::GetStatus(userrec *user)
{
if (ServerInstance->ULine(user->server))