]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/users.cpp
Only examine local messages
[user/henk/code/inspircd.git] / src / users.cpp
index 361b7ba2183bcc032d74d6063d0f74240e7998d6..9bc7705040f4a9156f1e0fa3cf235396f3f42d56 100644 (file)
@@ -314,8 +314,11 @@ char* User::MakeHostIP()
 
 void User::CloseSocket()
 {
-       ServerInstance->SE->Shutdown(this, 2);
-       ServerInstance->SE->Close(this);
+       if (this->fd > -1)
+       {
+               ServerInstance->SE->Shutdown(this, 2);
+               ServerInstance->SE->Close(this);
+       }
 }
 
 char* User::GetFullHost()
@@ -1447,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 :");
@@ -1463,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;