]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/users.cpp
Dont check APrefix both times :p
[user/henk/code/inspircd.git] / src / users.cpp
index 95ae87f5dd067fbd887a64f81c688c13966d261b..9bc7705040f4a9156f1e0fa3cf235396f3f42d56 100644 (file)
@@ -314,7 +314,7 @@ char* User::MakeHostIP()
 
 void User::CloseSocket()
 {
-       if (this > -1)
+       if (this->fd > -1)
        {
                ServerInstance->SE->Shutdown(this, 2);
                ServerInstance->SE->Close(this);
@@ -1450,7 +1450,7 @@ void User::WriteCommonExcept(const std::string &text)
 
 void User::WriteWallOps(const std::string &text)
 {
-       if (!IS_OPER(this) && IS_LOCAL(this))
+       if (!IS_LOCAL(this))
                return;
 
        std::string wallop("WALLOPS :");
@@ -1466,6 +1466,9 @@ void User::WriteWallOps(const std::string &text)
 
 void User::WriteWallOps(const char* text, ...)
 {
+       if (!IS_LOCAL(this))
+               return;
+
        char textbuffer[MAXBUF];
        va_list argsPtr;