Giving a user the choice to appear offline in a view showing online users I created a views block which displays users which are online. I would like to give a user a choice to be able to appear offline (i.e not be listed in the block) when he/she is online.

Thank you in anticipation.
Assuming Drupal 7, you can go to /admin/config/people/accounts/fields, attach a Boolean field to user accounts to allow the user to select their preference, then filter on that user field in your view to exclude those who opt out.