summaryrefslogtreecommitdiff
path: root/src/modules/m_ident.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-08-18 23:49:10 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-08-18 23:49:10 +0000
commit033cf7bfdbe73dbd446efc7b08f58bf6c7262bf6 (patch)
tree918021bf0a0a84974ab70857463004bbad752034 /src/modules/m_ident.cpp
parent2ed8e1820f9e28b6ecbb49c4b87ceeec26e68a10 (diff)
Fix ident timeouts to work properly when the connect succeeds but nothing comes in as a reply to the ident request
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4976 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_ident.cpp')
-rw-r--r--src/modules/m_ident.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/modules/m_ident.cpp b/src/modules/m_ident.cpp
index a7ffe6052..6c2f0cf52 100644
--- a/src/modules/m_ident.cpp
+++ b/src/modules/m_ident.cpp
@@ -41,8 +41,9 @@ class RFC1413 : public InspSocket
userrec* u; // user record that the lookup is associated with
int ufd;
- RFC1413(InspIRCd* SI, userrec* user, int maxtime) : InspSocket(SI, user->GetIPString(), 113, false, maxtime), u(user), ufd(user->GetFd())
+ RFC1413(InspIRCd* SI, userrec* user, int maxtime) : InspSocket(SI, user->GetIPString(), 113, false, maxtime), u(user)
{
+ ufd = user->GetFd();
}
virtual void OnTimeout()
@@ -137,6 +138,7 @@ class RFC1413 : public InspSocket
virtual bool OnConnected()
{
+ Instance->Log(DEBUG,"Ident: connected");
if (u && (Instance->SE->GetRef(ufd) == u))
{
uslen = sizeof(sock_us);
@@ -230,6 +232,14 @@ class ModuleIdent : public Module
* have an ident field any more.
*/
RFC1413* ident;
+ if (user->GetExt("ident_data", ident))
+ {
+ if (ident->timeout_end > ServerInstance->Time())
+ {
+ ident->u = NULL;
+ ServerInstance->RemoveSocket(ident);
+ }
+ }
return (!user->GetExt("ident_data", ident));
}