 
     robot.respond /steam status (.*)/i, (msg) ->
         summary = (steamID) ->
-            steam_request msg, "/ISteamUser/GetPlayerSummaries", steamids: steamID, (object) ->
+            steamRequest msg, "/ISteamUser/GetPlayerSummaries", steamids: steamID, (object) ->
                 player = object.response.players[0]
                 status = if player.communityvisibilitystate is 1 then 'Unavailable (Private)' else personaStates[player.personastate]
                 lastOnline = moment.unix(player.lastlogoff).fromNow()

                history params, 'profile URL'

    robot.respond /dota match (\d+)\s*(.*)?/i, (msg) ->
        steam_request msg, "/IDOTA2Match_570/GetMatchDetails", match_id: msg.match[1], (object) ->
            match = object.result
            start = moment.unix(match.start_time).fromNow()
            duration = moment.duration(match.duration, 'seconds').minutes()

    for status, tower in "00000000000#{(+dec).toString(2)}".slice(-11).split('')
        if parseInt(status) then towers[tower] else continue

steamRequest = (msg, endpoint, params = {}, handler, version = 1) ->
    params.key = STEAM_API_KEY

    msg.http("http://api.steampowered.com#{endpoint}/v#{version}/")
