private void KillConnectedClients()
{
// Grab a copy of the list of users still currently logged in
var shutdownClientList = this.Server.Clients.ToList<ChannelClient>();
// Kill all clients still logged in
foreach (var user in shutdownClientList)
{
try
{
if (user.State == ClientState.LoggedIn)
user.Kill();
}
catch (Exception e)
{
Log.Exception(e, "Error killing client.");
}
}
}
}