diff --git a/package.json b/package.json index 5925a3c..19f2137 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "shout", "description": "A web IRC client", - "version": "0.17.1", + "version": "0.18.0", "author": "Mattias Erming", "preferGlobal": true, "bin": { diff --git a/src/plugins/inputs/msg.js b/src/plugins/inputs/msg.js index e998c7e..6b8e7da 100644 --- a/src/plugins/inputs/msg.js +++ b/src/plugins/inputs/msg.js @@ -21,9 +21,12 @@ module.exports = function(network, chan, cmd, args) { } var text = args.join(" "); irc.send(target, text); - irc.emit("message", { - from: irc.me, - to: target, - message: text - }); + var channel = _.find(network.channels, {name: target}); + if (typeof channel !== "undefined") { + irc.emit("message", { + from: irc.me, + to: channel.name, + message: text + }); + } };