mirror of
https://github.com/skylord123/node-red-contrib-gamedig.git
synced 2025-04-10 08:03:08 -06:00
Up version to 1.1.5
- Fixed server_type not being set correctly after last update - Added status messages to node
This commit is contained in:
parent
3fdd0c1539
commit
4770cfdc53
@ -11,7 +11,7 @@ module.exports = function(RED) {
|
||||
node.on('input', function(msg) {
|
||||
|
||||
if(node.server_type) {
|
||||
msg.host = node.server_type;
|
||||
msg.server_type = node.server_type;
|
||||
}
|
||||
|
||||
if(node.host) {
|
||||
@ -36,7 +36,8 @@ module.exports = function(RED) {
|
||||
if (msg.payload === msg.halt_if) {
|
||||
return null;
|
||||
}
|
||||
node.send(msg);
|
||||
node.status({fill:"green",shape:"dot",text: 'Online ' + msg.data.players.length + ' players' });
|
||||
node.send(msg);
|
||||
}).catch(function(error) {
|
||||
msg.payload = 'offline';
|
||||
msg.data = {
|
||||
@ -45,7 +46,8 @@ module.exports = function(RED) {
|
||||
if (msg.payload === msg.halt_if) {
|
||||
return null;
|
||||
}
|
||||
node.send(msg);
|
||||
node.status({fill:"red", shape:"dot", text: 'Offline'});
|
||||
node.send(msg);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user