Skip to content

Commit 3d0a72d

Browse files
committed
Fix --mod and --reset for ChatSetAttr
1 parent 2266d68 commit 3d0a72d

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

ChatSetAttr/1.1.4/ChatSetAttr.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -608,8 +608,8 @@ var chatSetAttr = chatSetAttr || (function () {
608608
setting = parseAttributes(_.chain(opts).omit(optsArray).keys().value(),
609609
opts.replace, fillInAttrs),
610610
deleteMode = (mode[1] === 'del');
611-
opts.mod = (mode[1] === 'mod');
612-
opts.reset = (mode[1] === 'reset');
611+
opts.mod = opts.mod || (mode[1] === 'mod');
612+
opts.reset = opts.reset || (mode[1] === 'reset');
613613
if (opts.evaluate && !playerIsGM(playerid) && !state.ChatSetAttr.playersCanEvaluate) {
614614
handleErrors(who, ['The --evaluate option is only available to the GM.']);
615615
return;

ChatSetAttr/ChatSetAttr.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -608,8 +608,8 @@ var chatSetAttr = chatSetAttr || (function () {
608608
setting = parseAttributes(_.chain(opts).omit(optsArray).keys().value(),
609609
opts.replace, fillInAttrs),
610610
deleteMode = (mode[1] === 'del');
611-
opts.mod = (mode[1] === 'mod');
612-
opts.reset = (mode[1] === 'reset');
611+
opts.mod = opts.mod || (mode[1] === 'mod');
612+
opts.reset = opts.reset || (mode[1] === 'reset');
613613
if (opts.evaluate && !playerIsGM(playerid) && !state.ChatSetAttr.playersCanEvaluate) {
614614
handleErrors(who, ['The --evaluate option is only available to the GM.']);
615615
return;

0 commit comments

Comments
 (0)