From 93ddad5bdbd70844ef713126d930f561ff0e0437 Mon Sep 17 00:00:00 2001 From: brain Date: Sat, 22 Jul 2006 10:53:17 +0000 Subject: Make OnCheckReady safe against the user being killed, SO LONG AS THE MODULE WHICH D/C'S THE USER RETURNS FALSE git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4501 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/userprocess.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/userprocess.cpp b/src/userprocess.cpp index a6f86d2f2..c4c43ca16 100644 --- a/src/userprocess.cpp +++ b/src/userprocess.cpp @@ -360,6 +360,10 @@ void DoBackgroundUserStuff(time_t TIME) FullConnectUser(curr,&GlobalGoners); continue; } + + if ((fd_ref_table[cfd] != curr) && (curr)) + /* Somebody blatted this user in OnCheckReady (!) */ + continue; if ((curr->dns_done) && (curr->registered == 3) && (AllModulesReportReady(curr))) { @@ -368,6 +372,10 @@ void DoBackgroundUserStuff(time_t TIME) ZapThisDns(curr->fd); continue; } + + if ((fd_ref_table[cfd] != curr) && (curr)) + /* Somebody blatted this user in OnCheckReady (!) */ + continue; // It's time to PING this user. Send them a ping. if ((TIME > curr->nping) && (curr->registered == 7)) -- cgit v1.2.3