]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/connection.cpp
Added documentation to manpages of Request, Event and ModuleMessage
[user/henk/code/inspircd.git] / src / connection.cpp
index d60da90aced4d9c08c77d8d5cef0e743be48a74c..b197caef1a43097200e71771fece4e344a885e9c 100644 (file)
@@ -25,6 +25,7 @@
 #include <deque>
 #include "inspircd.h"
 #include "modules.h"
+#include "inspstring.h"
 
 using namespace std;
 
@@ -34,7 +35,7 @@ extern std::vector<ircd_module*> factory;
 
 extern int MODCOUNT;
 
-
+extern time_t TIME;
 
 connection::connection()
 {
@@ -60,7 +61,7 @@ bool connection::CreateListener(char* host, int p)
 
        setsockopt(fd,SOL_SOCKET,SO_REUSEADDR,(const char*)&on,sizeof(on));
        linger.l_onoff = 1;
-       linger.l_linger = 0;
+       linger.l_linger = 1;
        setsockopt(fd,SOL_SOCKET,SO_LINGER,(const char*)&linger,sizeof(linger));
        
        // attempt to increase socket sendq and recvq as high as its possible
@@ -468,7 +469,6 @@ bool connection::RecvPacket(std::deque<std::string> &messages, char* host)
 
 long connection::GenKey()
 {
-       srand(time(NULL));
        return (random()*time(NULL));
 }