Trigger event when sending messages
This commit is contained in:
parent
6be53fba43
commit
86134ba72f
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "shout",
|
"name": "shout",
|
||||||
"description": "A web IRC client",
|
"description": "A web IRC client",
|
||||||
"version": "0.10.6",
|
"version": "0.10.7",
|
||||||
"author": "Mattias Erming",
|
"author": "Mattias Erming",
|
||||||
"preferGlobal": true,
|
"preferGlobal": true,
|
||||||
"bin": {
|
"bin": {
|
||||||
|
@ -27,15 +27,10 @@ module.exports = function(network, chan, cmd, args) {
|
|||||||
irc.send(target, text);
|
irc.send(target, text);
|
||||||
|
|
||||||
if (target == chan.name && typeof chan !== "undefined") {
|
if (target == chan.name && typeof chan !== "undefined") {
|
||||||
var msg = new Msg({
|
irc.emit("message", {
|
||||||
type: Msg.Type.MESSAGE,
|
|
||||||
from: irc.me,
|
from: irc.me,
|
||||||
text: text
|
to: chan.name,
|
||||||
});
|
message: text
|
||||||
chan.messages.push(msg);
|
|
||||||
client.emit("msg", {
|
|
||||||
chan: chan.id,
|
|
||||||
msg: msg
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user