diff --git a/chat-plugins/scavengers.js b/chat-plugins/scavengers.js index bf69e0d7ea..67f965e0e7 100644 --- a/chat-plugins/scavengers.js +++ b/chat-plugins/scavengers.js @@ -617,6 +617,7 @@ let commands = { * Leaderboard Point Distribution Editing */ setblitz: function (target, room, user) { + if (room.id !== 'scavengers') return this.errorReply("This command can only be used in the scavenger room."); if (!this.can("mute", null, room)) return false; // perms for viewing only if (!target) return this.sendReply(`The points rewarded for winning official hunts is: ${(room.blitzPoints || DEFAULT_BLITZ_POINTS)}`); @@ -635,6 +636,7 @@ let commands = { }, setpoints: function (target, room, user) { + if (room.id !== 'scavengers') return this.errorReply("This command can only be used in the scavenger room."); if (!this.can("mute", null, room)) return false; // perms for viewing only if (!target) return this.sendReply(`The points rewarded for winning official hunts is: ${(room.winPoints || DEFAULT_POINTS).map((p, i) => `(${(i + 1)}) ${p}`).join(', ')}`); @@ -658,6 +660,7 @@ let commands = { */ huntcount: 'huntlogs', huntlogs: function (target, room, user) { + if (room.id !== 'scavengers') return this.errorReply("This command can only be used in the scavenger room."); if (!this.can('mute', null, room)) return false; if (target === 'reset') { @@ -669,7 +672,14 @@ let commands = { } HostLeaderboard.visualize().then(ladder => { - this.sendReply(`|raw|
${ladder.map(entry => ``).join('')}
RankNamePoints
${entry.rank}${Chat.escapeHTML(entry.name)}${entry.points}
`); + this.sendReply(`|raw|
${ladder.map(entry => { + let userid = toId(entry.name); + + let auth = room.auth && room.auth[userid] ? room.auth[userid] : Users.usergroups[userid] ? Users.usergroups[userid].charAt(0) : " "; + let color = room.auth && userid in room.auth ? 'inherit' : 'gray'; + + return ``; + }).join('')}
RankNamePoints
${entry.rank}${auth}${Chat.escapeHTML(entry.name)}${entry.points}
`); }); }, };