Explorar o código

logout and disconnect clients

Kolja Strohm %!s(int64=3) %!d(string=hai) anos
pai
achega
755205ca8b
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      FactoryCraft/Server.cpp

+ 4 - 0
FactoryCraft/Server.cpp

@@ -228,6 +228,8 @@ void FCKlient::setForegroundClient( SKlient* foreground )
             if( !zGameClient )
                 Sleep( 100 );
         }
+        zGameClient->logout();
+        ls->removeKlient( this );
     } );
 }
 
@@ -244,6 +246,8 @@ void FCKlient::setBackgroundClient( SKlient* background )
             if( !zGameClient )
                 Sleep( 100 );
         }
+        zGameClient->logout();
+        ls->removeKlient( this );
     } );
 }