]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/message.cpp
Aaaand, fix the typo
[user/henk/code/inspircd.git] / src / message.cpp
index 1cc97743b50073283d49b5160ad77a77946c2306..03bd5fd4115b357ceefb2148a8768d9eac5e74d0 100644 (file)
@@ -18,7 +18,7 @@ using namespace std;
 
 #include "inspircd_config.h"
 #include "inspircd.h"
-#include "inspircd_io.h"
+#include "configreader.h"
 #include <unistd.h>
 #include <fcntl.h>
 #include <sys/errno.h>
@@ -198,16 +198,6 @@ int c_count(userrec* u)
 
 }
 
-bool hasumode(userrec* user, char mode)
-{
-       if (user)
-       {
-               return (strchr(user->modes,mode)>0);
-       }
-       else return false;
-}
-
-
 void ChangeName(userrec* user, const char* gecos)
 {
        if (user->fd > -1)
@@ -422,7 +412,7 @@ std::string chlist(userrec *user,userrec* source)
                                 * If the channel is NOT private/secret AND the user is not invisible.
                                 * If the user is an oper, and the <options:operspywhois> option is set.
                                 */
-                               if ((source == user) || (*source->oper && Config->OperSpyWhois) || (((!rec->channel->modes[CM_PRIVATE]) && (!rec->channel->modes[CM_SECRET]) && !(user->modebits & UM_INVISIBLE)) || (rec->channel->HasUser(source))))
+                               if ((source == user) || (*source->oper && Config->OperSpyWhois) || (((!rec->channel->modes[CM_PRIVATE]) && (!rec->channel->modes[CM_SECRET]) && !(user->modes[UM_INVISIBLE])) || (rec->channel->HasUser(source))))
                                {
                                        list << cmode(user, rec->channel) << rec->channel->name << " ";
                                }