Added optional alt-inclusion to channel-wide bans.
This commit is contained in:
parent
40c004795b
commit
756c42ceaa
2 changed files with 34 additions and 5 deletions
|
|
@ -633,6 +633,21 @@ userSchema.methods.changePassword = async function(passChange){
|
|||
|
||||
}
|
||||
|
||||
userSchema.methods.altCheck = async function(userDB){
|
||||
//Found alt flag
|
||||
let foundAlt = false;
|
||||
|
||||
for(alt in this.alts){
|
||||
//If we found a match
|
||||
if(this.alts[alt]._id.toString() == userDB._id.toString()){
|
||||
foundAlt = true;
|
||||
}
|
||||
}
|
||||
|
||||
//return the results
|
||||
return foundAlt;
|
||||
}
|
||||
|
||||
userSchema.methods.nuke = async function(pass){
|
||||
//Check we have a confirmation password
|
||||
if(pass == "" || pass == null){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue