init: add workspace files
This commit is contained in:
22
world/cmd/comm/systask.js
Normal file
22
world/cmd/comm/systask.js
Normal file
@@ -0,0 +1,22 @@
|
||||
|
||||
this.inherits(COMMAND);
|
||||
this.command = "systask";
|
||||
this.regex = /(\w+)\s+(\w+)?/;
|
||||
this.enter = function (me, arg, par) {
|
||||
if (!arg) return false;
|
||||
var task = TASK.GET(arg);
|
||||
if (!task) return false;
|
||||
if (me.user_level < 5) {
|
||||
let cmds = task.allow_commands;
|
||||
if (!cmds || !cmds[par])
|
||||
return false;
|
||||
}
|
||||
var func = task[par];
|
||||
if (!func) return;
|
||||
func.call(task, me);
|
||||
}
|
||||
|
||||
const ALLOW_COMMANDS = {
|
||||
bm: true,
|
||||
reward: true
|
||||
};
|
||||
Reference in New Issue
Block a user