|
@@ -70,6 +70,15 @@ exp.info = function(callback) {
|
|
|
});
|
|
|
};
|
|
|
|
|
|
+// set model type to value of *slim*
|
|
|
+exp.set_slim = function(rid, userId, slim, callback) {
|
|
|
+ logging.debug(rid, "setting slim for ", userId, "to " + slim);
|
|
|
+ // store userId in lower case if not null
|
|
|
+ userId = userId && userId.toLowerCase();
|
|
|
+
|
|
|
+ redis.hmset(userId, ["a", Number(slim)], callback);
|
|
|
+};
|
|
|
+
|
|
|
// sets the timestamp for +userId+
|
|
|
// if +temp+ is true, the timestamp is set so that the record will be outdated after 60 seconds
|
|
|
// these 60 seconds match the duration of Mojang's rate limit ban
|
|
@@ -134,7 +143,7 @@ exp.get_details = function(userId, callback) {
|
|
|
details = {
|
|
|
skin: data.s === "" ? null : data.s,
|
|
|
cape: data.c === "" ? null : data.c,
|
|
|
- slim: data.a === 1,
|
|
|
+ slim: data.a === "1",
|
|
|
time: Number(data.t)
|
|
|
};
|
|
|
}
|