From 86134ba72fbcb58e4e27d76ad96f9bd3e795e8da Mon Sep 17 00:00:00 2001 From: Mattias Erming Date: Mon, 25 Aug 2014 02:50:08 -0700 Subject: [PATCH] Trigger event when sending messages --- package.json | 2 +- src/plugins/inputs/msg.js | 11 +++-------- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/package.json b/package.json index eec6f481..1b86ce48 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "shout", "description": "A web IRC client", - "version": "0.10.6", + "version": "0.10.7", "author": "Mattias Erming", "preferGlobal": true, "bin": { diff --git a/src/plugins/inputs/msg.js b/src/plugins/inputs/msg.js index 9606cdc9..ecb979a4 100644 --- a/src/plugins/inputs/msg.js +++ b/src/plugins/inputs/msg.js @@ -27,15 +27,10 @@ module.exports = function(network, chan, cmd, args) { irc.send(target, text); if (target == chan.name && typeof chan !== "undefined") { - var msg = new Msg({ - type: Msg.Type.MESSAGE, + irc.emit("message", { from: irc.me, - text: text - }); - chan.messages.push(msg); - client.emit("msg", { - chan: chan.id, - msg: msg + to: chan.name, + message: text }); } };