         msg.send "Oh no! An error occurred: #{error.message}"
   else
     msg.send "I don't know #{user.name}'s Last.fm username!"
+
+usersListeningToArtist = (users, artist) ->
+  listeningToArtist = []
+  usersChecked = 0
+  artist = artist.toLowerCase()
+
+  for user in users
+    unless user.lastfm?.username?
+      usersChecked += 1
+      continue
+    nowPlayingForLastfmUser user.lastfm.username,
+      success: (track) ->
+        listeningToArtist.push user.name if track && track.artist.toLowerCase().indexOf artist >= 0
+        usersChecked += 1
+
+        if usersChecked >= users.length
+          if listeningToArtist.length == 0
+            msg.send "Nobody is listening to #{artist}."
+          else if listeningToArtist.length == 1
+            msg.send "#{listeningToArtist[0]} is listening to #{artist}."
+          else
+            msg.send "People listening to #{artist}: " + listeningToArtist.join ', '
+      error: (error) ->
+        usersChecked += 1

          (user.name for user in users).join(', ')
      else
        msg.send "#{name}? Never heard of 'em!"

  robot.respond /(?:what's playing in the )?men's room/i, (msg) ->
    robot.http('http://wers.tunegenie.com').get() (err, res, body) ->

#   hubot what am I listening to? - Displays what you're currently scrobbling.
#   hubot what's <name> listening to? - Displays what someone's currently scrobbling.
#   hubot what's everyone listening to? - Displays what everyone's currently scrobbling.
#   hubot what's playing in the men's room? - Displays what's on the boys' commode clock radio.
#   hubot who's listening to <artist>? - Displays who's scrobbling a certain artist.

cheerio = require 'cheerio'
LastFm = require('lastfm').LastFmNode
