]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/inspsocket.cpp
Make irc::spacify take 'const char*' instead of 'char*'
[user/henk/code/inspircd.git] / src / inspsocket.cpp
index fc0f7537ad239bb4c2aec3781b96ad4ac7154664..34f4a6201a9e86304f9c9cefa00419b355002022 100644 (file)
@@ -2,12 +2,9 @@
  *       | Inspire Internet Relay Chat Daemon |
  *       +------------------------------------+
  *
- *  InspIRCd is copyright (C) 2002-2006 ChatSpike-Dev.
- *                       E-mail:
- *                <brain@chatspike.net>
- *               <Craig@chatspike.net>
- *     
- * Written by Craig Edwards, Craig McLure, and others.
+ *  InspIRCd: (C) 2002-2007 InspIRCd Development Team
+ * See: http://www.inspircd.org/wiki/index.php/Credits
+ *
  * This program is free but copyrighted software; see
  *            the file COPYING for details.
  *
@@ -390,6 +387,15 @@ bool InspSocket::FlushWriteBuffer()
                                                this->Close();
                                                return true;
                                        }
+                                       else if (result == 0)
+                                       {
+                                               this->Instance->Log(DEBUG,"Write error on socket: EOF");
+                                               this->OnError(I_ERR_WRITE);
+                                               this->state = I_ERROR;
+                                               this->Instance->SE->DelFd(this);
+                                               this->Close();
+                                               return true;
+                                       }
                                }
                                catch (ModuleException& modexcept)
                                {
@@ -505,7 +511,7 @@ bool InspSocket::Poll()
                                if (!this->Instance->SE->AddFd(this))
                                        return false;
                        }
-                       if (this->IsIOHooked)
+                       if (Instance->Config->GetIOHook(this))
                        {
                                try
                                {