git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4276
e03df62e-2008-0410-955e-
edbf42e46eb7
*/
const char* FormatNoticeMasks();
+ bool userrec::ProcessNoticeMasks(const char *sm);
+
bool IsNoticeMaskSet(unsigned char sm);
void SetNoticeMask(unsigned char sm, bool value);
return true;
}
+bool userrec::ProcessNoticeMasks(const char *sm)
+{
+ bool adding = true;
+ const char *c = sm;
+
+ while (c && *c)
+ {
+ switch (*c)
+ {
+ case '+':
+ adding = true;
+ break;
+ case '-':
+ adding = false;
+ break;
+ default:
+ if ((*c >= 'A') && (*c <= 'z'))
+ this->SetNoticeMask(*c, adding);
+ break;
+ }
+
+ *c++;
+ }
+
+ return true;
+}
+
bool userrec::IsNoticeMaskSet(unsigned char sm)
{
return (snomasks[sm-65]);