 
 exports.use = (robot) ->
   new IrcBot robot
-


    bot.addListener 'join', (channel, who) ->
        console.log('%s has joined %s', who, channel)

    bot.addListener 'part', (channel, who, reason) ->
        console.log('%s has left %s: %s', who, channel, reason)


    bot.addListener 'message', (from, to, message) ->
      console.log "From #{from} to #{to}: #{message}"

      user = self.createUser to, from
      if user.room
        console.log "#{to} <#{from}> #{message}"
      else
        console.log "msg <#{from}> #{message}"

      self.receive new Robot.TextMessage(user, message)
