Add /dynmap sendtoweb command, and published API for sending web messages

This commit is contained in:
Mike Primm 2011-10-23 05:53:15 +08:00 committed by mikeprimm
parent f80cfee32c
commit 36d8a701e0
4 changed files with 64 additions and 6 deletions

View file

@ -97,10 +97,11 @@ componentconstructors['chatbox'] = function(dynmap, configuration) {
.appendTo(messageRow);
}
var playerNameContainer = $('<span/>')
.addClass('messagetext')
.text(' '+message.name+': ');
var playerNameContainer = '';
if(message.name) {
playerNameContainer = $('<span/>').addClass('messagetext').text(' '+message.name+': ');
}
var playerMessageContainer = $('<span/>')
.addClass('messagetext')
.text(message.text);