Commit 425c47d7 authored by Family Friendly#0001's avatar Family Friendly#0001 💬

fix

parent b56ec051
......@@ -17,6 +17,7 @@ exports.help = function(args,u,mc) {
}
exports.infractions = function(args,u,mc,e) {
if(!e.excused.includes(u)) return mc.stdin.write(`/tellraw ${u} {"text":"you do not have access to this command..."}\n`)
if(!args[1]) return mc.stdin.write(`/tellraw ${u} {"text":"no user attatched!"}\n`);
if(!e.uin[args[1]]) return mc.stdin.write(`/tellraw ${u} {"text":"user \\"${args[1]}\\" does not have any infractions!"}\n`);
return mc.stdin.write(`/tellraw ${u} ["",{"text":"user "},{"text":"${u} (ip:${e.uin[args[1]].ip}) ","color":"gold"},{"text":"has "},{"text":"${e.uin[args[1]].infractions} ","color":"dark_red"},{"text":"infraction(s)!"}]\n`)
......
......@@ -37,6 +37,7 @@ if(data.includes("Done")) {
if(done) {
if(config.main.debug) console.log(data)
let user = data.match(/(?<=\<).+(?=\>)/)
user[0] = user[0].toLowerCase()
let chat = data.match(/(?<=\<.+\>\s).+/gi)
let ustring = data.match(/(?<=\[.+\]: ).+(?=\[.+\])|(?<=\[.+\]: .+\[\/).+(?=\])/gi)
if(ustring != null && ustring[0] != null && ustring[1] != null) {
......@@ -63,6 +64,7 @@ if(done) {
if(!userinf[user[0]]) userinf[user[0]] = {infractions:1, ip:"unknown"}
else userinf[user[0]].infractions++
mc.stdin.write(`/tellraw ${user[0]} ["",{"text":"${user[0]}","color":"aqua"},{"text":", the word \\"${wrdarr[i]}\\" is blacklisted. infraction added. "},{"text":"[${userinf[user[0]].infractions}/${config.config.maxinf}]","color":"dark_red"}]\n`)
mc.stdin.write(`/execute at ${user[0]} run summon lightningBolt\n`)
if(userinf[user[0]].infractions >= config.config.maxinf) {
let str = config.config.onReached;
str = str.replace(/@u|@inf/gi,(x) => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment