 
   robot.respond /check_feed (h[^ ]+)/i, (msg) ->
     url = msg.match[1]
-    robot.brain.data.feed_check[url] = []
-    msg.reply 'Subscribing to ' + url
+    robot.brain.data.feed_check[url] ||= []
+    robot.brain.data.feed_check_user[url] ||= []
+    robot.brain.data.feed_check_user[url].push msg.message.user
+    msg.reply "Subscribing to #{url}"
 
   robot.respond /check_feed stop ([^ ]+)/i, (msg) ->
     url = msg.match[1]
     if robot.brain.data.feed_check[url]?
-      msg.reply 'Unsubscribing from ' + url
+      msg.reply "Unsubscribing from #{url}"
       delete robot.brain.data.feed_check[url]
+      delete robot.brain.data.feed_check_user[url]
     else
-      msg.reply url + ' isn`t subscribed'
+      msg.reply "#{url} isn`t subscribed"
 
   robot.respond /checking_feed/i, (msg) ->
     keys = Object.keys robot.brain.data.feed_check
     if keys.length == 0
       msg.reply 'No feed subscribed'
     else
-      msg.reply 'Subscribed: ' + keys.join(' , ')
+      msg.reply "Subscribed: #{keys.join(' , ')}"

          # .on 'meta', (meta) ->
          .on 'readable', ->
            while item = @read() then next.push item
          .on 'end', ->
            if prev.length != 0 then next.forEach (article) ->
              if is_new prev, article.guid
                robot.send user, "new article: #{article.title} #{article.link}"
                if article.summary? then robot.send user, "summary: #{article.summary}"

            # save feed
            robot.brain.data.feed_check[url] = next


FeedParser = require 'feedparser'
request = require 'request'
_ = require 'underscore'

module.exports = (robot) ->
  feed_check_interval = null
