summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2006-07-10 15:07:39 +0000
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2006-07-10 15:07:39 +0000
commitd2381df1f7ba0e7dd2226b83e9e3c98c5cbd8808 (patch)
tree1120a4307c2ad40b0b82ce65588a52a8b978ed6f /src
parent41dabab5f8ffed0c6cc1558b7318a2d118d2bdae (diff)
-Clone mode methods into notice mask methods for userrec.
- Modify userrec to add char [] of notice masks, works in the same function as modes. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4273 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r--src/users.cpp27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/users.cpp b/src/users.cpp
index f51656a55..b18806016 100644
--- a/src/users.cpp
+++ b/src/users.cpp
@@ -110,6 +110,33 @@ bool DoneClassesAndTypes(const char* tag)
return true;
}
+bool userrec::IsNoticeMaskSet(unsigned char sm)
+{
+ return (snomasks[sm-65]);
+}
+
+void userrec::SetNoticeMask(unsigned char sm, bool value)
+{
+ snomasks[sm-65] = value;
+}
+
+const char* userrec::FormatNoticeMasks()
+{
+ static char data[MAXBUF];
+ int offset = 0;
+
+ for (int n = 0; n < 64; n++)
+ {
+ if (snomasks[n])
+ data[offset++] = n+65;
+ }
+
+ data[offset] = 0;
+ return data;
+}
+
+
+
bool userrec::IsModeSet(unsigned char m)
{
return (modes[m-65]);