Trigger event when sending messages

This commit is contained in:
Mattias Erming 2014-08-25 02:50:08 -07:00
parent 6be53fba43
commit 86134ba72f
2 changed files with 4 additions and 9 deletions

View File

@ -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": {

View File

@ -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
});
}
};