]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/inspsocket.cpp
Increase the size of the matrix for map drawing to 250x250
[user/henk/code/inspircd.git] / src / inspsocket.cpp
index e70b7647b6da46507953d537a93f9378fcb13190..c096d9076faf2ab26eb07dc94c017e39079909e1 100644 (file)
@@ -11,7 +11,7 @@
  * ---------------------------------------------------
  */
 
-/* $Core: libIRCDinspsocket */
+/* $Core */
 
 #include "socket.h"
 #include "inspstring.h"
@@ -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
        {