steamutils 1.0.79 → 1.0.80
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/SteamClient.js +16 -0
- package/package.json +1 -1
package/SteamClient.js
CHANGED
@@ -156,6 +156,21 @@ function SteamClient({
|
|
156
156
|
})
|
157
157
|
}
|
158
158
|
|
159
|
+
function offAllEvent() {
|
160
|
+
for (const name in events) {
|
161
|
+
for (const event of events[name]) {
|
162
|
+
if (event.timeout) {
|
163
|
+
try {
|
164
|
+
clearTimeout(event.timeout)
|
165
|
+
} catch (e) {
|
166
|
+
}
|
167
|
+
delete event.timeout
|
168
|
+
}
|
169
|
+
}
|
170
|
+
delete events[name]
|
171
|
+
}
|
172
|
+
}
|
173
|
+
|
159
174
|
const intervals = {}
|
160
175
|
const intervalRandoms = {}
|
161
176
|
|
@@ -1116,6 +1131,7 @@ function SteamClient({
|
|
1116
1131
|
return steamClient?._logOnDetails
|
1117
1132
|
},
|
1118
1133
|
onEvent,
|
1134
|
+
offAllEvent,
|
1119
1135
|
setPersona(state, name) {
|
1120
1136
|
steamClient.setPersona(state, name)
|
1121
1137
|
},
|