From 33ed72a1dfae595132dd50c760b6a312ef2ce8fe Mon Sep 17 00:00:00 2001 From: brain Date: Sat, 8 Jul 2006 17:44:16 +0000 Subject: Refactored user modes to work like the channel modes - core and module data now the same storage format without ::modebits git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4175 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/helperfuncs.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/helperfuncs.cpp') diff --git a/src/helperfuncs.cpp b/src/helperfuncs.cpp index 6250b6285..c190aff4e 100644 --- a/src/helperfuncs.cpp +++ b/src/helperfuncs.cpp @@ -966,7 +966,7 @@ void WriteOpers_NoFormat(const char* text) if (IS_LOCAL(a)) { - if (a->modebits & UM_SERVERNOTICE) + if (a->modes[UM_SERVERNOTICE]) { // send server notices to all with +s WriteServ(a->fd,"NOTICE %s :%s",a->nick,text); @@ -1121,7 +1121,7 @@ void WriteWallOps(userrec *source, bool local_only, char* text, ...) { userrec* t = (userrec*)(*i); - if ((IS_LOCAL(t)) && (t->modebits & UM_WALLOPS)) + if ((IS_LOCAL(t)) && (t->modes[UM_WALLOPS])) { WriteTo_NoFormat(source,t,formatbuffer); } @@ -1334,7 +1334,7 @@ void userlist(userrec *user,chanrec *c) for (CUList::iterator i = ulist->begin(); i != ulist->end(); i++) { - if ((!has_user) && (i->second->modebits & UM_INVISIBLE)) + if ((!has_user) && (i->second->modes[UM_INVISIBLE])) { /* * user is +i, and source not on the channel, does not show @@ -1385,7 +1385,7 @@ int usercount_i(chanrec *c) CUList *ulist= c->GetUsers(); for (CUList::iterator i = ulist->begin(); i != ulist->end(); i++) { - if (!(i->second->modebits & UM_INVISIBLE)) + if (!(i->second->modes[UM_INVISIBLE])) count++; } @@ -1499,7 +1499,7 @@ int usercount_invisible(void) for (user_hash::const_iterator i = clientlist.begin(); i != clientlist.end(); i++) { - if ((i->second->registered == 7) && (i->second->modebits & UM_INVISIBLE)) + if ((i->second->registered == 7) && (i->second->modes[UM_INVISIBLE])) c++; } -- cgit v1.2.3