diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-01-09 00:15:50 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-01-09 00:15:50 +0000 |
commit | c039ac13e29beabd84f884f3cc4530705330c4c4 (patch) | |
tree | 7d409eac3db4a5e9ba8e940da5f62a10b2c2c049 /src/modules.cpp | |
parent | 1ecea715fef0a261dca8541a3c22a7ae7ad4e6f5 (diff) |
m_park.cpp fixes (and anything else using UserToPseudo and PesudoToUser)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2741 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules.cpp')
-rw-r--r-- | src/modules.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/modules.cpp b/src/modules.cpp index d76f20f5f..ca9808ef5 100644 --- a/src/modules.cpp +++ b/src/modules.cpp @@ -598,9 +598,10 @@ int Server::CountUsers(chanrec* c) bool Server::UserToPseudo(userrec* user,std::string message) { unsigned int old_fd = user->fd; - user->fd = FD_MAGIC_NUMBER; - user->ClearBuffer(); Write(old_fd,"ERROR :Closing link (%s@%s) [%s]",user->ident,user->host,message.c_str()); + user->FlushWriteBuf(); + user->ClearBuffer(); + user->fd = FD_MAGIC_NUMBER; ServerInstance->SE->DelFd(old_fd); shutdown(old_fd,2); close(old_fd); @@ -611,6 +612,7 @@ bool Server::PseudoToUser(userrec* alive,userrec* zombie,std::string message) { zombie->fd = alive->fd; alive->fd = FD_MAGIC_NUMBER; + alive->FlushWriteBuf(); alive->ClearBuffer(); Write(zombie->fd,":%s!%s@%s NICK %s",alive->nick,alive->ident,alive->host,zombie->nick); kill_link(alive,message.c_str()); |