Support old player rank in battle ignores as well (#877)

This commit is contained in:
asgdf
2017-03-01 11:44:52 +01:00
committed by Guangcong Luo
parent 9590c47d11
commit fdd89ebdf6
2 changed files with 3 additions and 3 deletions

View File

@@ -6276,8 +6276,8 @@ var Battle = (function () {
var name = args[1].slice(0, pipeIndex);
var rank = name.charAt(0);
if (this.ignoreSpects && (rank === ' ' || rank === '+')) break;
if (this.ignoreOpponent && rank === '\u2606' && toUserid(name) !== app.user.get('userid')) break;
if (window.app && app.ignore && app.ignore[toUserid(name)] && (rank === ' ' || rank === '+' || rank === '\u2606')) break;
if (this.ignoreOpponent && (rank === '\u2605' || rank === '\u2606') && toUserid(name) !== app.user.get('userid')) break;
if (window.app && app.ignore && app.ignore[toUserid(name)] && (rank === ' ' || rank === '+' || rank === '\u2605' || rank === '\u2606')) break;
var message = args[1].slice(pipeIndex + 1);
var isHighlighted = window.app && app.rooms && app.rooms[this.roomid].getHighlight(message);
var parsedMessage = Tools.parseChatMessage(message, name, '', isHighlighted);

View File

@@ -1261,7 +1261,7 @@
toggleIgnoreSpects: function (e) {
this.battle.ignoreSpects = !!e.currentTarget.checked;
this.battle.add('Spectators ' + (this.battle.ignoreSpects ? '' : 'no longer ') + 'ignored.');
var $messages = $('.battle-log').find('.chat').has('small').not(':contains(\u2606)');
var $messages = $('.battle-log').find('.chat').has('small').not(':contains(\u2605), :contains(\u2606)');
if (!$messages.length) return;
if (this.battle.ignoreSpects) {
$messages.hide();