processMsg conn client (ChangeNickname newname) = do
  let q = "update clients set nickname = ? where client_id = ?" 
  execute conn q (newname, clientId client)
  client' <- refreshClient conn client
  case (clientRoomId client') of
      Nothing -> return []
      Just (rid) -> do
        r <- liftM makeUpdatedRoom $ findRoom conn rid
        return [r $ ChangedNickname $ tupClient client]

-- TODO if close to existing live room, Join that room
processMsg conn client (ChangeNickname newname) = do
  let q = "update clients set nickname = ? where client_id = ?" 
  execute conn q (newname, clientId client)
  client' <- refreshClient conn client
  case (clientRoomId client') of
      Nothing -> return []
      Just (rid) -> do
        r <- liftM makeUpdatedRoom $ findRoom conn rid
        return [r $ ChangedNickname $ tupClient client]

-- TODO if close to existing live room, Join that room
processMsg conn client (ChangeNickname newname) = do
  let q = "update clients set nickname = ? where client_id = ?" 
  execute conn q (newname, clientId client)
  client' <- refreshClient conn client
  case (clientRoomId client') of
      Nothing -> return []
      Just (rid) -> do
        r <- liftM makeUpdatedRoom $ findRoom conn rid
        return [r $ ChangedNickname $ tupClient client]

-- TODO if close to existing live room, Join that room