]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/helperfuncs.cpp
Gah, im forgetting to SetMode!
[user/henk/code/inspircd.git] / src / helperfuncs.cpp
index 6250b62851a619a0e0fffab9018ac329e6ff6532..77a74c32c111d6b2ceea501d2f2d15fff28b8158 100644 (file)
@@ -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);
@@ -1045,7 +1045,7 @@ void WriteMode(const char* modes, int flags, const char* text, ...)
 
                        for (int n = 0; n < modelen; n++)
                        {
-                               if (!hasumode(t,modes[n]))
+                               if (!t->modes[modes[n]-65])
                                {
                                        send_to_user = false;
                                        break;
@@ -1058,7 +1058,7 @@ void WriteMode(const char* modes, int flags, const char* text, ...)
 
                        for (int n = 0; n < modelen; n++)
                        {
-                               if (hasumode(t,modes[n]))
+                               if (t->modes[modes[n]-65])
                                {
                                        send_to_user = true;
                                        break;
@@ -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++;
        }