Skip to content
Snippets Groups Projects
Commit a62399e2 authored by mcmlxxix's avatar mcmlxxix
Browse files

fix module database r/w access control

parent fb7274e5
No related branches found
No related tags found
No related merge requests found
......@@ -458,7 +458,7 @@ engine = new (function() {
var modules=this.file.iniGetAllObjects();
this.file.close();
for each(var m in modules) {
this.modules[m.name.toUpperCase()]=new Module(m.name,m.dir,m.auth);
this.modules[m.name.toUpperCase()]=new Module(m.name,m.dir,m.read,m.write);
log(LOG_DEBUG,"loaded module: " + m.name);
}
}
......@@ -573,6 +573,7 @@ engine = new (function() {
}
break;
}
log("packet operation: " + packet.oper + " module r/w: " + module.read + "/" + module.write);
return true;
}
......@@ -584,13 +585,14 @@ engine = new (function() {
}
/* module data */
function Module(name, dir, auth) {
function Module(name, dir, read, write) {
this.online = true;
this.name = name;
this.dir = dir;
this.queue = undefined;
this.commands = {};
this.auth = auth;
this.read = read;
this.write = write;
this.db;
this.init = function() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment