summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/inspsocket.h9
-rw-r--r--src/inspsocket.cpp9
-rw-r--r--src/modules.cpp1
3 files changed, 6 insertions, 13 deletions
diff --git a/include/inspsocket.h b/include/inspsocket.h
index af93baa56..ae18afabd 100644
--- a/include/inspsocket.h
+++ b/include/inspsocket.h
@@ -159,15 +159,6 @@ class CoreExport BufferedSocket : public EventHandler
* socket has timed out.
*/
bool timeout;
-
- /**
- * Socket input buffer, used by read(). The class which
- * extends BufferedSocket is expected to implement an extendable
- * buffer which can grow much larger than 64k,
- * this buffer is just designed to be temporary storage.
- * space.
- */
- char ibuf[65535];
/**
* The IP address being connected
diff --git a/src/inspsocket.cpp b/src/inspsocket.cpp
index e70b7647b..d4e7e93e7 100644
--- a/src/inspsocket.cpp
+++ b/src/inspsocket.cpp
@@ -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, sizeof(ReadBuffer) - 1,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, sizeof(ReadBuffer) - 1, 0);
}
/*
@@ -428,8 +429,8 @@ const char* BufferedSocket::Read()
*/
if (n > 0)
{
- ibuf[n] = 0;
- return ibuf;
+ ReadBuffer[n] = 0;
+ return ReadBuffer;
}
else
{
diff --git a/src/modules.cpp b/src/modules.cpp
index e25f4bf10..d3de60f6a 100644
--- a/src/modules.cpp
+++ b/src/modules.cpp
@@ -143,6 +143,7 @@ int Module::OnCheckInvite(User*, Channel*) { return 0; }
int Module::OnCheckKey(User*, Channel*, const std::string&) { return 0; }
int Module::OnCheckLimit(User*, Channel*) { return 0; }
int Module::OnCheckBan(User*, Channel*) { return 0; }
+int Module::OnCheckExtBan(User *, Channel *, char) { return 0; }
int Module::OnStats(char, User*, string_list&) { return 0; }
int Module::OnChangeLocalUserHost(User*, const std::string&) { return 0; }
int Module::OnChangeLocalUserGECOS(User*, const std::string&) { return 0; }