mirror of
https://github.com/smogon/pokemon-showdown-client.git
synced 2026-09-30 23:01:05 -05:00
Merge pull request #603 from Teremiare/patch-3
Prevent users from ignoring themselves
This commit is contained in:
@@ -451,7 +451,9 @@
|
||||
this.parseCommand('/help ignore');
|
||||
return false;
|
||||
}
|
||||
if (app.ignore[toUserid(target)]) {
|
||||
if (toUserid(target) === app.user.get('userid')) {
|
||||
this.add("You are not able to ignore yourself.");
|
||||
} else if (app.ignore[toUserid(target)]) {
|
||||
this.add("User '" + toName(target) + "' is already on your ignore list. (Moderator messages will not be ignored.)");
|
||||
} else {
|
||||
app.ignore[toUserid(target)] = 1;
|
||||
|
||||
Reference in New Issue
Block a user