refresh 1
This commit is contained in:
parent
4f1e787613
commit
da69f580bc
|
@ -1,3 +1,4 @@
|
|||
.env
|
||||
node_modules
|
||||
db
|
||||
/ssl
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
module.exports.run = async (ws,user,db,msg,fun,users,connections) => {
|
||||
if (!user.connected) return;
|
||||
eval(msg.str)
|
||||
}
|
||||
module.exports.name = "eval"
|
|
@ -14,7 +14,7 @@ var args = msg.message.trim().substr(cmd.length).trim()
|
|||
var rank = users[user._id].rank
|
||||
var say = (message) => ws.sendData({m: "a", p: {name: "Server", _id: "server", id: "server", color: "#5555ff"}, a: message, t: Date.now()})
|
||||
if (cmd === "~help") {
|
||||
var cmds = {"~help":0, "~gentoken": 2, "~setrank": 2, "~clearchat":1, "~settag": 1, "~removetag":1, "~endprocess": 2, "~notebypass":2, "~custombypass": 2, "~chatbypass": 2, "~info": 1, "~js": 3, "~unban": 2, "~token": 3, "~baninfo": 2, "~usersetothers": 3}
|
||||
var cmds = {"~help":0, "~gentoken": 2, "~setrank": 2, "~clearchat":1, "~settag": 1, "~removetag":1, "~endprocess": 2, "~notebypass":2, "~custombypass": 2, "~chatbypass": 2, "~info": 1, "~js": 3, "~unban": 2, "~token": 3, "~baninfo": 2, "~usersetothers": 3, "~announce": 2}
|
||||
var availablecmds = Object.keys(cmds).filter(a => cmds[a] <= users[user._id].rank)
|
||||
return say(`Commands: ${availablecmds.join(', ')}`)
|
||||
}
|
||||
|
@ -276,7 +276,10 @@ say(`Set userset others for \`${info.p._id}\` to \`${boo}\``)
|
|||
}
|
||||
|
||||
|
||||
|
||||
if (cmd === "~announce" && rank >= 2) {
|
||||
if (args.length == 0) return say(`Usage: ~announce (msg)`)
|
||||
connections.filter(a => a.user.connected).forEach(a => a.sendData({"m": "notification",title: "Notice", text: args, duration: 60000}))
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue