mirror of
https://github.com/smogon/pokemon-showdown-client.git
synced 2026-09-30 14:52:36 -05:00
Support old player rank in battle ignores as well (#877)
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user