diff options
| author | 2006-01-27 15:26:59 +0000 | |
|---|---|---|
| committer | 2006-01-27 15:26:59 +0000 | |
| commit | 653638c68684ec035fd58bc2d0d91c9bf9aa2ab9 (patch) | |
| tree | 364fd9cce4e2e8d6e86ddc3f1267b98dbed51854 /src/inspircd.cpp | |
| parent | Moved to extra/ - not all systems have stdint.h yet? (diff) | |
Improved IP handling. Now uses in_addr to store client ip, not char[16]!
Added global and local session limits
All of this needs TESTING.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2934 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/inspircd.cpp')
| -rw-r--r-- | src/inspircd.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/inspircd.cpp b/src/inspircd.cpp index 4b390eeb0..a834d4d5c 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -714,7 +714,6 @@ int InspIRCd::Run() { in_port = ntohs(sock_us.sin_port); log(DEBUG,"Accepted socket %d",incomingSockfd); - target = (char*)inet_ntoa(client.sin_addr); /* Years and years ago, we used to resolve here * using gethostbyaddr(). That is sucky and we * don't do that any more... @@ -722,10 +721,10 @@ int InspIRCd::Run() NonBlocking(incomingSockfd); if (Config->GetIOHook(in_port)) { - Config->GetIOHook(in_port)->OnRawSocketAccept(incomingSockfd, target, in_port); + Config->GetIOHook(in_port)->OnRawSocketAccept(incomingSockfd, (char*)inet_ntoa(client.sin_addr), in_port); } stats->statsAccept++; - AddClient(incomingSockfd, target, in_port, false, target); + AddClient(incomingSockfd, in_port, false, client.sin_addr); log(DEBUG,"Adding client on port %lu fd=%lu",(unsigned long)in_port,(unsigned long)incomingSockfd); } else |
