Skip to content

Commit

Permalink
Hide blacklisted user cursors
Browse files Browse the repository at this point in the history
  • Loading branch information
7PH committed Mar 17, 2024
1 parent 3c67a7f commit 7940538
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/server/plugins/games/global/CursorPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { UserController } from '../../../skychat/UserController';
import { Session } from '../../../skychat/Session';
import { RoomManager } from '../../../skychat/RoomManager';
import { BinaryMessageTypes } from '../../../../api/BinaryMessageTypes';
import { BlacklistPlugin } from '../../core/global/BlacklistPlugin';

/**
* Handle cursor events
Expand Down Expand Up @@ -69,6 +70,10 @@ export class CursorPlugin extends GlobalPlugin {
if (!UserController.getUserPluginData(conn.session.user, this.commandName)) {
continue;
}
// If target user has blacklister the sender
if (BlacklistPlugin.hasBlacklisted(conn.session.user, user.username)) {
continue;
}
// If identifier is to be ignored
if (identifierIgnoreList && identifierIgnoreList.includes(conn.session.identifier)) {
continue;
Expand Down

0 comments on commit 7940538

Please sign in to comment.