Added basic ignore/unignore functionality

This commit is contained in:
rainbow napkin 2026-11-08 21:01:01 -05:00
parent 999fae91b7
commit b80f82b9f2
6 changed files with 139 additions and 1 deletions

View file

@ -196,6 +196,26 @@ class userList{
]);
if(user.user != "Tokebot" && user.user != this.client.user.user){
let ignored = false;
//For each douchebag in the ignored users list
for(const douchebag of this.client.user.ignored){
if(douchebag.user == user.user){
/* Normally I abhor making if statements to set booleans, but this only need to happen when its true
Plus I also needed to put the break statement somewhere
The fucked thing is the break statement isnt necissary with the if statement, but without it it becomes necissary
But it cant be used without the if statement, making the task of reducing linecount for this definition a fucking sisyphean nightmare */
ignored = true;
break;
}
}
if(ignored){
menuMap.set("Unignore", ()=>{this.client.chatBox.transmit(`!unignore ${user.user}`);});
}else{
menuMap.set("Ignore", ()=>{this.client.chatBox.transmit(`!ignore ${user.user}`);});
}
if(this.client.user.permMap.chan.get("kickUser")){
menuMap.set("Kick", ()=>{this.client.chatBox.transmit(`!kick ${user.user}`);});
}