mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
make IRC node handle RAW messages more cleanly.
This commit is contained in:
parent
8c8c9b13b9
commit
06e48e9cb1
@ -138,13 +138,15 @@ module.exports = function(RED) {
|
|||||||
|
|
||||||
node.on("input", function(msg) {
|
node.on("input", function(msg) {
|
||||||
if (Object.prototype.toString.call( msg.raw ) === '[object Array]') {
|
if (Object.prototype.toString.call( msg.raw ) === '[object Array]') {
|
||||||
var m = msg.raw;
|
node.log("RAW command:"+msg.raw);
|
||||||
for (var i = 0; i < 10; i++) {
|
node.ircclient.send.apply(node.ircclient,msg.raw);
|
||||||
if (typeof m[i] !== "string") { m[i] = ""; }
|
//var m = msg.raw;
|
||||||
m[i] = m[i].replace(/"/g, "");
|
//for (var i = 0; i < 10; i++) {
|
||||||
}
|
//if (typeof m[i] !== "string") { m[i] = ""; }
|
||||||
node.log("RAW command:"+m);
|
//m[i] = m[i].replace(/"/g, "");
|
||||||
node.ircclient.send(m[0],m[1],m[2],m[3],m[4],m[5],m[6],m[7],m[8],m[9]);
|
//}
|
||||||
|
//node.log("RAW command:"+m);
|
||||||
|
//node.ircclient.send(m[0],m[1],m[2],m[3],m[4],m[5],m[6],m[7],m[8],m[9]);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (msg._topic) { delete msg._topic; }
|
if (msg._topic) { delete msg._topic; }
|
||||||
|
Loading…
Reference in New Issue
Block a user