* | 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.
*
{
try
{
- Instance->Log(DEBUG,"To write: %s", outbuffer[0].c_str());
int result = Instance->Config->GetIOHook(this)->OnRawSocketWrite(this->fd, outbuffer[0].c_str(), outbuffer[0].length());
if (result > 0)
{
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)
{
if (!this->Instance->SE->AddFd(this))
return false;
}
- if (this->IsIOHooked)
+ if (Instance->Config->GetIOHook(this))
{
try
{