Skip to content

Commit

Permalink
Merge pull request Roll20#12 from Lithl/master
Browse files Browse the repository at this point in the history
Fix logic/syntax bug & update version
  • Loading branch information
SteveKoontz committed Jan 15, 2015
2 parents 5cb5a69 + 9c8b5e3 commit a08216e
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Exalted Successes/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"authors": "Brian Shields",
"roll20userid": "235259",
"dependencies": {
"Interpreted sendChat": "2.0"
"Interpreted sendChat": "2.1"
},
"modifies": {
"message": "write"
Expand Down
6 changes: 3 additions & 3 deletions Interpreted sendChat/Interpreted sendChat.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ var bshields = bshields || {};
bshields.sendChat = (function() {
'use strict';

var version = 2.0;
var version = 2.1;

function interpretedSendChat(chatMsg, message) {
var who = chatMsg.who,
speaking = _.sortBy(filterObjs(function(obj) { return obj.get('type') === 'character' && obj.get('name').indexOf(who) >= 0; }),
function(chr) { return Math.abs(chr.get('name').toLowerCase().levenshteinDistance(who.toLowerCase()); })[0];
function(chr) { return chr.get('name').toLowerCase().levenshteinDistance(who.toLowerCase()); })[0];

sendChat(speaking ? 'character|' + speaking.id : 'player|' + chatMsg.playerid, message);
}

return interpretedSendChat;
}());
}());
2 changes: 1 addition & 1 deletion Interpreted sendChat/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Interpreted sendChat",
"version": "2.0",
"version": "2.1",
"description": "Provides a function for other scripts to use to assist in sending messages to the chat. This script is not intended to stand alone.",
"authors": "Brian Shields",
"roll20userid": "235259",
Expand Down
2 changes: 1 addition & 1 deletion Raise Count/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"roll20userid": "235259",
"dependencies": {
"splitArgs": "1.0",
"Interpreted sendChat": "2.0"
"Interpreted sendChat": "2.1"
},
"modifies": {
"message": "write"
Expand Down

0 comments on commit a08216e

Please sign in to comment.