mirror of
https://github.com/node-red/node-red-nodes.git
synced 2025-03-01 10:37:43 +00:00
Slight tweak to Wake on Lan (WOL) node
This commit is contained in:
@@ -20,7 +20,7 @@ var chk = /^([0-9A-F]{2}[:-]){5}([0-9A-F]{2})$/;
|
||||
|
||||
function WOLnode(n) {
|
||||
RED.nodes.createNode(this,n);
|
||||
this.mac = n.mac
|
||||
this.mac = n.mac.trim();
|
||||
var node = this;
|
||||
|
||||
this.on("input", function(msg) {
|
||||
@@ -32,7 +32,7 @@ function WOLnode(n) {
|
||||
if (error) { node.warn(error); }
|
||||
});
|
||||
}
|
||||
else { node.warn("WOL: bad mac address "+mac); }
|
||||
else { node.warn('WOL: bad mac address "'+mac+'"'); }
|
||||
}
|
||||
else { node.warn("WOL: no mac address specified"); }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user