Merge pull request #280 from glowing-bear/fixnickspeak

Fix bug where updateNickSpeak would fail on lines without a prefix
l-merge-prefix cordova-0.0.4
Tor Hveem 11 years ago
commit b06f6f8589
  1. 4
      js/models.js

@ -92,6 +92,10 @@ models.service('models', ['$rootScope', '$filter', function($rootScope, $filter)
var updateNickSpeak = function(line) {
// Try to find nick from prefix
var prefix = line.prefix;
if (prefix.length === 0) {
// some scripts produce lines without a prefix
return;
}
var nick = prefix[prefix.length - 1].text;
// Action / me, find the nick as the first word of the message
if (nick === " *") {

Loading…
Cancel
Save