Make hidden avatars last through into the next PS session (#870)

This commit is contained in:
Charlie Kobayashi
2017-02-22 00:44:43 -05:00
committed by Guangcong Luo
parent 055cc4adff
commit 05d450fe4f

View File

@@ -868,9 +868,12 @@
case 'avatar':
var parts = target.split(',');
var avatar = parseInt(parts[0], 10);
var avatarString = toId(parts[0]);
var avatar = parseInt(avatarString, 10);
if (avatar) {
Tools.prefs('avatar', avatar);
} else if (['bw2elesa', 'teamrocket', 'yellow', 'zinnia', 'clemont'].indexOf(avatarString) > -1) { // custom avatar exceptions
Tools.prefs('avatar', '#' + avatarString);
}
return text; // Send the /avatar command through to the server.