重建 VarCenter

This commit is contained in:
suwings 2018-04-02 23:39:56 +08:00
parent 7b703bfdd9
commit 14bd665920

View File

@ -1,11 +1,12 @@
var _VAR_LIST = {};
//全局用户 token 保存区
global.__MCSERVER_VAR_LIST__ = {};
module.exports.set = (key, value) => {
_VAR_LIST[key] = value;
global.__MCSERVER_VAR_LIST__[key] = value;
}
module.exports.get = (key, def = undefined) => {
return _VAR_LIST[key] || def;
return global.__MCSERVER_VAR_LIST__[key] || def;
}