Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CommandShell/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "CommandShell",
"version": "1.2",
"version": "1.3",
"description": "Framework for chat commands",
"authors": "manveti",
"roll20userid": "503018",
Expand Down
10 changes: 9 additions & 1 deletion CommandShell/shell.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,18 @@ var Shell = Shell || {
if ((input.length <= 0) || (input.charAt(0) != '!')){
return sendChat(speakingAs, input);
}
var playerId = null;
if (speakingAs.indexOf("player|") == 0){
playerId = speakingAs.substring(7);
}
function processCommand(msgs){
var doSend = true;
for (var i = 0; i < msgs.length; i++){
if (Shell.handleApiMessage(msgs[i])){
var msg = _.clone(msgs[i]);
if (playerId){
msg.playerid = playerId;
}
if (Shell.handleApiMessage(msg)){
doSend = false;
}
}
Expand Down
3 changes: 3 additions & 0 deletions cron/cron.js
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,9 @@ var cron = cron || {
return cron.showHelp(msg.who, tokens[0]);
}
var args = {};
if ((msg.playerid) || (msg.playerid != "API")){
args['from'] = "player|" + msg.playerid;
}
var getArg = null;
var doList = false;
var doRemove = false;
Expand Down
2 changes: 1 addition & 1 deletion cron/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cron",
"version": "0.6",
"version": "0.7",
"description": "Schedule (possibly recurring) commands to run at some point in the future.",
"authors": "manveti",
"roll20userid": "503018",
Expand Down