mm_os 1.6.3 → 1.6.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -76,14 +76,23 @@ Plugin.prototype.chat = async function(from_user, to_user, group, content, type,
76
76
  Plugin.prototype.exec = function(name, method, option) {
77
77
  var ret = "";
78
78
  var lt = this.list;
79
- for (var i = 0, o; o = lt[i++];) {
80
- var name = o.config.name;
81
- if (o.config.state === 1 && name === name) {
82
- var func = o[method];
83
- if (func) {
84
- ret = func(option);
79
+ if (name) {
80
+ for (var i = 0, o; o = lt[i++];) {
81
+ var name = o.config.name;
82
+ if (o.config.state === 1 && name === name) {
83
+ if (o[method]) {
84
+ ret = o[method](option);
85
+ }
86
+ break;
87
+ }
88
+ }
89
+ } else {
90
+ for (var i = 0, o; o = lt[i++];) {
91
+ if (o.config.state === 1) {
92
+ if (o[method]) {
93
+ ret = o[method](option);
94
+ }
85
95
  }
86
- break;
87
96
  }
88
97
  }
89
98
  return ret;
@@ -151,7 +160,7 @@ if (!$.pool.plugin) {
151
160
  * @param {string} title 标题
152
161
  * @return {Object} 返回一个缓存类
153
162
  */
154
- $.plugin_admin = function (scope, title) {
163
+ $.plugin_admin = function(scope, title) {
155
164
  if (!scope) {
156
165
  scope = $.val.scope + '';
157
166
  }
@@ -161,4 +170,4 @@ $.plugin_admin = function (scope, title) {
161
170
  obj = $.pool.plugin[scope];
162
171
  }
163
172
  return obj;
164
- }
173
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mm_os",
3
- "version": "1.6.3",
3
+ "version": "1.6.4",
4
4
  "description": "这是超级美眉服务端框架,用于快速构建应用程序。",
5
5
  "main": "index.js",
6
6
  "scripts": {