diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-07-22 10:53:17 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-07-22 10:53:17 +0000 |
commit | 93ddad5bdbd70844ef713126d930f561ff0e0437 (patch) | |
tree | a1db001be9254bb84bbfed7b570a9d0984d25114 | |
parent | 06341fb5b8d1c416da762a437827c1eba2b32ca0 (diff) |
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
-rw-r--r-- | src/userprocess.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
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)) |