steamutils 1.4.57 → 1.4.58
Sign up to get free protection for your applications and to get access to all the features.
- package/SteamClient.js +24 -11
- package/package.json +1 -1
package/SteamClient.js
CHANGED
@@ -191,7 +191,7 @@ function SteamClient({ username, password, cookie, clientJsToken, isAutoRequestF
|
|
191
191
|
}
|
192
192
|
}
|
193
193
|
|
194
|
-
|
194
|
+
events[name] = [];
|
195
195
|
}
|
196
196
|
|
197
197
|
function onAnyEvent(callback) {
|
@@ -208,7 +208,7 @@ function SteamClient({ username, password, cookie, clientJsToken, isAutoRequestF
|
|
208
208
|
delete event.timeout;
|
209
209
|
}
|
210
210
|
}
|
211
|
-
|
211
|
+
events[name] = [];
|
212
212
|
}
|
213
213
|
onAnyCallbacks.length = 0;
|
214
214
|
}
|
@@ -2558,17 +2558,29 @@ SteamClient.isAccountPlayable = async function isAccountPlayable({ cookie, clien
|
|
2558
2558
|
...rest,
|
2559
2559
|
});
|
2560
2560
|
|
2561
|
-
steamClient.onEvent(
|
2562
|
-
|
2563
|
-
|
2561
|
+
steamClient.onEvent(
|
2562
|
+
SteamClientEvents.error,
|
2563
|
+
({ eresult, msg, error }) => {
|
2564
|
+
doResolve({ eresult, msg, error });
|
2565
|
+
},
|
2566
|
+
true,
|
2567
|
+
);
|
2564
2568
|
|
2565
|
-
steamClient.onEvent(
|
2566
|
-
|
2567
|
-
|
2569
|
+
steamClient.onEvent(
|
2570
|
+
SteamClientEvents.csgoOnline,
|
2571
|
+
(ClientWelcome) => {
|
2572
|
+
doResolve({ playable: true });
|
2573
|
+
},
|
2574
|
+
true,
|
2575
|
+
);
|
2568
2576
|
|
2569
|
-
steamClient.onEvent(
|
2570
|
-
|
2571
|
-
|
2577
|
+
steamClient.onEvent(
|
2578
|
+
SteamClientEvents.csgoClientHello,
|
2579
|
+
(ClientHello) => {
|
2580
|
+
doResolve({ playable: true });
|
2581
|
+
},
|
2582
|
+
true,
|
2583
|
+
);
|
2572
2584
|
|
2573
2585
|
steamClient.onEvent(SteamClientEvents.playingState, ({ playing_blocked, playing_app }) => {
|
2574
2586
|
if (playing_blocked) {
|
@@ -2616,6 +2628,7 @@ SteamClient.isAccountPlayable = async function isAccountPlayable({ cookie, clien
|
|
2616
2628
|
steamClient.logOff();
|
2617
2629
|
return resolve(data);
|
2618
2630
|
} else {
|
2631
|
+
steamClient.offAllEvent();
|
2619
2632
|
return resolve({ ...data, steamClient });
|
2620
2633
|
}
|
2621
2634
|
}
|