feat: anon switch

This commit is contained in:
cha0s 2020-12-14 15:59:56 -06:00
parent fd4a2be361
commit bf87733ac1

View File

@ -46,6 +46,12 @@ export default (User, latus) => class UserReddichat extends User {
} }
async isBannedFrom(channel) { async isBannedFrom(channel) {
if (
latus.config['%reddichatNoAnonymous']
&& '/r/anonymous' === renderChannel(channel)
) {
return true;
}
return -1 !== (await this.bannedFrom).indexOf(renderChannel(channel)); return -1 !== (await this.bannedFrom).indexOf(renderChannel(channel));
} }