Jump to content
McKay Development

Mole

Member
  • Posts

    14
  • Joined

  • Last visited

Posts posted by Mole

  1. That's what I thought as well, was just hoping that it's been done already.

    The point of this project is to allow to invite users using TS3, by right clicking them and selecting "invite to game" as you usually do - game info might be taken from running game session from client, the problem is how to send the invite itself.

     

    Maybe a hint where to look for something like that before researching Steam on my own?

  2. Partially answered your question in GitHub issue (DoctorMcKay/node-steam-tradeoffer-manager#146). `getReceivedItems` method doesn't really fail often. It's mostly likely something with your code that's causing it. What I'd say - there's no received item in these trades at all. If you want to check what items are meant to be sent before accepting the trade - check itemsToGive property of the offer, if the array length is 0 - you're safe to accept the offer, as it shouldn't take any items from your inventory.

     

    @EDIT

    Check if itemsToGive.length is 0, and itemsToReceive.length is greater than 0. If both tests pass, then accept the offer.

     

    Make sure you check both, as both itemsToGive and itemsToReceive could be empty when the Steam econ server is acting up, even though you might be giving items in that offer.


  3. var config = {
    maxRetries: 5
    };

    function getItems(offer, retries, callback) {
    if (typeof retries === 'function') {
    callback = retries;
    retries = 0;
    }

    if (retries >= config.maxRetries) return callback(new Error('Max retries reached!'));

    offer.getReceivedItems(function(err, items) {
    if (err) return getItems(offer, retries + 1, callback);
    return callback(null, items);
    });
    }
    Better? It was just a simple example, not a serious code...
  4. Hey,

    out of curiosity - my test app crashed a moment ago because of async callback being called twice after steam-user fired `webSession` without calling `webLogOn()`. Any idea why could that happen? When steam-user is requesting new web session on its own, or if/when Steam does that automatically?

     

    The account wasn't used in any other way than this application, which was kinda experimental and left alone for ~3 days before that happen. Of course it was bad coded, but I didn't expect `webSession` event being fired more than once.

     

    Steam-user version: 3.3.4

  5. I have nothing against the feature itself, just can't think of any valid use case.

    Storing trade URL in any kind of database is pointless. Of course - getting it directly from the user every trade is fine, but it's rather unusual, and in most cases script owners would convert the URL to get the id anyway (eg. for logging). 

    Also, covering this potential security issue is (imo) what the script owner should do, not the module itself.

×
×
  • Create New...