   #
   # items - An Array of items (usually Strings).
   #
-  # Returns a random item.
+  # Returns an random item.
   random: (items) ->
     items[ Math.floor(Math.random() * items.length) ]
+
+  # Public: Tell the message to stop dispatching to listeners
+  #
+  # Returns nothing.
+  finish: () ->
+    @message.finish()
 
   # Public: Creates a scoped http client with chainable methods for
   # modifying the request.  This doesn't actually make a request though.


  # Public: Passes the given message to any interested Listeners.
  #
  # message - A Robot.Message instance.
  #
  # Returns nothing.
  receive: (message) ->
    for lst in @listeners
      try
        lst.call message
      catch ex
        @logger.error "Unable to call the listener: #{ex}"

  # Public: Loads every script in the given path.
  #

  # Represents an incoming message from the chat.
  #
  # user - A User instance that sent the message.
  constructor: (@user, @done = false) ->

  # Indicates that no other Listener should be called on this object
  finish: () ->
    @done = true

class Robot.TextMessage extends Robot.Message
  # Represents an incoming message from the chat.
