Skip to content
This repository was archived by the owner on Jul 17, 2020. It is now read-only.

Commit 85927c8

Browse files
author
Zirak
committed
reverted fucktarded experimental changes to cmd.exec which messed everything up.
1 parent 5bf997d commit 85927c8

File tree

3 files changed

+7
-47
lines changed

3 files changed

+7
-47
lines changed

master.js

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1075,29 +1075,9 @@ bot.Command = function ( cmd ) {
10751075
});
10761076

10771077
cmd.exec = function () {
1078-
var args = arguments,
1079-
self = this,
1080-
ret;
1081-
10821078
this.invoked += 1;
10831079

1084-
if (this.format && this.logic) {
1085-
if (this.async) {
1086-
args.push(function () {
1087-
self.format.apply(self, arguments);
1088-
});
1089-
1090-
this.logic.apply(this, args);
1091-
}
1092-
else {
1093-
ret = this.format(this.logic.apply(this, args));
1094-
}
1095-
}
1096-
else {
1097-
ret = this.fun.apply( this.thisArg, arguments );
1098-
}
1099-
1100-
return ret;
1080+
return this.fun.apply( this.thisArg, arguments );
11011081
};
11021082

11031083
cmd.del = function () {

master.min.js

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

source/bot.js

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -368,29 +368,9 @@ bot.Command = function ( cmd ) {
368368
});
369369

370370
cmd.exec = function () {
371-
var args = arguments,
372-
self = this,
373-
ret;
374-
375371
this.invoked += 1;
376372

377-
if (this.format && this.logic) {
378-
if (this.async) {
379-
args.push(function () {
380-
self.format.apply(self, arguments);
381-
});
382-
383-
this.logic.apply(this, args);
384-
}
385-
else {
386-
ret = this.format(this.logic.apply(this, args));
387-
}
388-
}
389-
else {
390-
ret = this.fun.apply( this.thisArg, arguments );
391-
}
392-
393-
return ret;
373+
return this.fun.apply( this.thisArg, arguments );
394374
};
395375

396376
cmd.del = function () {

0 commit comments

Comments
 (0)