hackchat-engine 1.1.17 → 1.1.18
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/package.json +1 -1
- package/structures/UserStruct.js +16 -0
package/package.json
CHANGED
package/structures/UserStruct.js
CHANGED
|
@@ -125,6 +125,12 @@ class User {
|
|
|
125
125
|
* @type {number}
|
|
126
126
|
*/
|
|
127
127
|
this.permissionLevel = data.level || false;
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* User's ui effect
|
|
131
|
+
* @type {number}
|
|
132
|
+
*/
|
|
133
|
+
this.userEffect = data.effect || 0;
|
|
128
134
|
}
|
|
129
135
|
|
|
130
136
|
/**
|
|
@@ -253,6 +259,15 @@ class User {
|
|
|
253
259
|
return this.permissionLevel;
|
|
254
260
|
}
|
|
255
261
|
|
|
262
|
+
/**
|
|
263
|
+
* User's ui effect
|
|
264
|
+
* @type {number}
|
|
265
|
+
* @readonly
|
|
266
|
+
*/
|
|
267
|
+
get effect() {
|
|
268
|
+
return this.userEffect;
|
|
269
|
+
}
|
|
270
|
+
|
|
256
271
|
/**
|
|
257
272
|
* Patch new user info sent from server
|
|
258
273
|
* @param {object} data User object sent from server
|
|
@@ -266,6 +281,7 @@ class User {
|
|
|
266
281
|
|
|
267
282
|
if (typeof data.trip !== 'undefined') this.usertrip = data.trip;
|
|
268
283
|
if (typeof data.hash !== 'undefined') this.userhash = data.hash;
|
|
284
|
+
if (typeof data.effect !== 'undefined') this.userEffect = data.effect;
|
|
269
285
|
|
|
270
286
|
this.username = data.nick;
|
|
271
287
|
this.userlevel = data.uType;
|