summaryrefslogtreecommitdiff
path: root/src/usermanager.cpp
diff options
context:
space:
mode:
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-10-25 15:21:45 +0000
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-10-25 15:21:45 +0000
commit6fe52cbb3ba72a5ecdded3f51c8515bf75e6801f (patch)
tree19b755377e2d830c78346930b8df27bca7d522f6 /src/usermanager.cpp
parent5d73e8928826340aaca9e78205ffb093a6b4f95c (diff)
Fixes found by removing User inheritance from StreamSocket
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11975 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/usermanager.cpp')
-rw-r--r--src/usermanager.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/usermanager.cpp b/src/usermanager.cpp
index 06d6ad1cd..f620a264d 100644
--- a/src/usermanager.cpp
+++ b/src/usermanager.cpp
@@ -195,13 +195,14 @@ void UserManager::QuitUser(User *user, const std::string &quitreason, const char
if (IS_LOCAL(user))
{
- FOREACH_MOD(I_OnUserDisconnect,OnUserDisconnect(IS_LOCAL(user)));
- user->DoWrite();
- if (user->GetIOHook())
+ LocalUser* lu = IS_LOCAL(user);
+ FOREACH_MOD(I_OnUserDisconnect,OnUserDisconnect(lu));
+ lu->DoWrite();
+ if (lu->GetIOHook())
{
try
{
- user->GetIOHook()->OnStreamSocketClose(user);
+ lu->GetIOHook()->OnStreamSocketClose(lu);
}
catch (CoreException& modexcept)
{
@@ -209,10 +210,8 @@ void UserManager::QuitUser(User *user, const std::string &quitreason, const char
}
}
- ServerInstance->SE->DelFd(user);
- user->Close();
- // user->Close() will set fd to -1; this breaks IS_LOCAL. Fix
- user->SetFd(INT_MAX);
+ ServerInstance->SE->DelFd(lu);
+ lu->Close();
}
/*