]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/inspsocket.cpp
Add extban +b B: - matching users may not use caps, same as chmode +B (or +P in 1.1)
[user/henk/code/inspircd.git] / src / inspsocket.cpp
index e70b7647b6da46507953d537a93f9378fcb13190..c12494503214fe35005aed2af8ea2e6916f18fef 100644 (file)
@@ -392,6 +392,7 @@ const char* BufferedSocket::Read()
                return NULL;
 
        int n = 0;
+       char* ReadBuffer = Instance->GetReadBuffer();
 
        if (this->IsIOHooked)
        {
@@ -399,7 +400,7 @@ const char* BufferedSocket::Read()
                int MOD_RESULT = 0;
                try
                {
-                       MOD_RESULT = Instance->Config->GetIOHook(this)->OnRawSocketRead(this->fd,this->ibuf,sizeof(this->ibuf) - 1,result2);
+                       MOD_RESULT = Instance->Config->GetIOHook(this)->OnRawSocketRead(this->fd, ReadBuffer, Instance->Config->NetBufferSize, result2);
                }
                catch (CoreException& modexcept)
                {
@@ -417,7 +418,7 @@ const char* BufferedSocket::Read()
        }
        else
        {
-               n = recv(this->fd,this->ibuf,sizeof(this->ibuf) - 1,0);
+               n = recv(this->fd, ReadBuffer, Instance->Config->NetBufferSize, 0);
        }
 
        /*
@@ -428,8 +429,8 @@ const char* BufferedSocket::Read()
         */
        if (n > 0)
        {
-               ibuf[n] = 0;
-               return ibuf;
+               ReadBuffer[n] = 0;
+               return ReadBuffer;
        }
        else
        {