|
@@ -19,9 +19,14 @@ function get_hash(url) {
|
|
// gets the skin for +userId+ with +profile+
|
|
// gets the skin for +userId+ with +profile+
|
|
// uses +cache_details+ to determine if the skin needs to be downloaded or can be taken from cache
|
|
// uses +cache_details+ to determine if the skin needs to be downloaded or can be taken from cache
|
|
// face and face+helm images are extracted and stored to files
|
|
// face and face+helm images are extracted and stored to files
|
|
-// callback: error, skin hash
|
|
|
|
|
|
+// callback: error, skin hash, callback
|
|
function store_skin(rid, userId, profile, cache_details, callback) {
|
|
function store_skin(rid, userId, profile, cache_details, callback) {
|
|
networking.get_skin_info(rid, userId, profile, function(err, url, slim) {
|
|
networking.get_skin_info(rid, userId, profile, function(err, url, slim) {
|
|
|
|
+ if (!err && userId.length > 16) {
|
|
|
|
+ // updating username with model info from uuid details
|
|
|
|
+ cache.set_slim(rid, profile.name, slim);
|
|
|
|
+ }
|
|
|
|
+
|
|
if (!err && url) {
|
|
if (!err && url) {
|
|
var skin_hash = get_hash(url);
|
|
var skin_hash = get_hash(url);
|
|
if (cache_details && cache_details.skin === skin_hash) {
|
|
if (cache_details && cache_details.skin === skin_hash) {
|