]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/message.cpp
Improved strhashcomp with no allocations
[user/henk/code/inspircd.git] / src / message.cpp
index 8614acf0e8e49d0a2f056316313e0dcd9b3b5510..29a4ae9985d07539300c1ce2e00c3d054fa9b761 100644 (file)
@@ -63,11 +63,11 @@ int common_channels(userrec *u, userrec *u2)
        }
        for (std::vector<ucrec*>::const_iterator i = u->chans.begin(); i != u->chans.end(); i++)
        {
-               for (std::vector<ucrec*>::const_iterator z = u2->chans.begin(); i != u2->chans.end(); z++)
+               for (std::vector<ucrec*>::const_iterator z = u2->chans.begin(); z != u2->chans.end(); z++)
                {
                        if ((((ucrec*)(*i))->channel != NULL) && (((ucrec*)(*z))->channel != NULL))
                        {
-                               if ((((ucrec*)(*i))->channel == ((ucrec*)(*z))->channel) && (((ucrec*)(*i))->channel) && (((ucrec*)(*z))->channel))
+                               if ((((ucrec*)(*i))->channel == ((ucrec*)(*z))->channel))
                                {
                                        if ((c_count(u)) && (c_count(u2)))
                                        {
@@ -397,7 +397,7 @@ std::string chlist(userrec *user,userrec* source)
        {
                return lst;
        }
-       bool userinvisible = (strchr(user->modes,'i'));
+       bool userinvisible = (user->modebits & UM_INVISIBLE);
        for (std::vector<ucrec*>::const_iterator i = user->chans.begin(); i != user->chans.end(); i++)
        {
                if ((((ucrec*)(*i))->channel != NULL) && (((ucrec*)(*i))->channel->name))