From 2e3d643d0aaaebbca1b36aebbd802bf135a587c3 Mon Sep 17 00:00:00 2001 From: Guangcong Luo Date: Wed, 23 Dec 2015 06:46:17 -0500 Subject: [PATCH] Roombans by global auth always give popup Previously, roombans wouldn't give a popup when they were given to users not in the room. This makes it so roombans done by global auth still give the message. --- commands.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commands.js b/commands.js index 6ba15b9d1b..0a896ce235 100644 --- a/commands.js +++ b/commands.js @@ -888,7 +888,7 @@ exports.commands = { return this.errorReply("Room bans are not meant to be used in room " + room.id + "."); } if (room.bannedUsers[userid] && room.bannedIps[targetUser.latestIp]) return this.sendReply("User " + targetUser.name + " is already banned from room " + room.id + "."); - if (targetUser in room.users) { + if (targetUser in room.users || user.can('lock')) { targetUser.popup( "|html|

" + Tools.escapeHTML(user.name) + " has banned you from the room " + room.id + ".

" + (target ? "

Reason: " + Tools.escapeHTML(target) + "

" : "") + "

To appeal the ban, PM the staff member that banned you" + (room.auth ? " or a room owner.

" : ".

")