Added rankfighting to ban.

This commit is contained in:
rainbow napkin 2024-12-02 19:50:26 -05:00
parent b138b26f27
commit ef4894e409
6 changed files with 41 additions and 12 deletions

View file

@ -220,7 +220,7 @@ channelSchema.statics.reqPermCheck = function(perm, chanField = "chanName"){
}else{
//If not, prevent the request from going through and tell them why
res.status(401);
return res.send({error:`You do not have a high enough rank to access this resource.`});
return res.send({errors:[{type: "Unauthorized", msg: "You do not have a high enough rank to access this resource.", date: new Date()}]});
}
});
});

View file

@ -113,7 +113,7 @@ permissionSchema.statics.reqPermCheck = function(perm){
next();
}else{
res.status(401);
res.send({error:`You do not have a high enough rank to access this resource.`});
return res.send({errors:[{type: "Unauthorized", msg: "You do not have a high enough rank to access this resource.", date: new Date()}]});
}
}
}

View file

@ -280,7 +280,7 @@ userSchema.methods.nuke = async function(pass){
var oldUser = await module.exports.userModel.deleteOne(this);
if(oldUser){
await this.killAllSessions("This account has been deleted. So long, and thanks for all the fish! <3");
await this.killAllSessions("If you're seeing this, your account has been deleted. So long, and thanks for all the fish! <3");
}else{
throw new Error("Server Error: Unable to delete account! Please report this error to your server administrator, and with timestamp.");
}