/// <summary> /// Removes a specific connection to the connection queue. /// </summary> public void RemoveFromQueue(ConnectionCore connection) { if (ConnectionQueue.Contains(connection)) { ConnectionQueue.Remove(connection); ServerLogger.PrivateRoom($"Removed {connection.ConnectionData.Username} ({connection.ConnectionData.ClientIP.ToString()}) from the privatechatroom queue"); } }
/// <summary> /// Adds a specific connection to the connection queue. /// </summary> public void AddToQueue(ConnectionCore connection) { if (ConnectionQueue.Contains(connection)) { return; } ServerLogger.PrivateRoom($"Added {connection.ConnectionData.Username} ({connection.ConnectionData.ClientIP.ToString()}) to the private chatroom queue"); ConnectionQueue.Enqueue(connection); if (ConnectionQueue.Count >= 2) { CreatePrivateRoom(2); } }