A couple of fixes after rebasing and updating framework

This commit is contained in:
Pavel Djundik 2016-03-15 11:59:36 +02:00 committed by Maxime Poulin
parent a01216fa4c
commit db5fe00b60
6 changed files with 8 additions and 16 deletions

View file

@ -32,9 +32,9 @@ function Msg(attr) {
self: false self: false
}, attr)); }, attr));
if (attr.time > 0) { if (this.time > 0) {
attr.time = new Date(attr.time); this.time = new Date(this.time);
} else { } else {
attr.time = new Date(); this.time = new Date();
} }
} }

View file

@ -19,7 +19,7 @@ exports.input = function(network, chan, cmd, args) {
irc.emit("action", { irc.emit("action", {
nick: irc.user.nick, nick: irc.user.nick,
target: chan.name, target: chan.name,
msg: text message: text
}); });
break; break;
} }

View file

@ -1,16 +1,8 @@
var _ = require("lodash"); var _ = require("lodash");
<<<<<<< fbbb3d20d287243d2c3c5525d86801f54f903603
exports.commands = ["msg", "say"]; exports.commands = ["msg", "say"];
exports.input = function(network, chan, cmd, args) { exports.input = function(network, chan, cmd, args) {
=======
module.exports = function(network, chan, cmd, args) {
if (cmd !== "say" && cmd !== "msg") {
return;
}
>>>>>>> Update commands
if (args.length === 0 || args[0] === "") { if (args.length === 0 || args[0] === "") {
return true; return true;
} }
@ -34,7 +26,7 @@ module.exports = function(network, chan, cmd, args) {
irc.emit("privmsg", { irc.emit("privmsg", {
nick: irc.user.nick, nick: irc.user.nick,
target: channel.name, target: channel.name,
msg: msg message: msg
}); });
} }

View file

@ -20,7 +20,7 @@ exports.input = function(network, chan, cmd, args) {
irc.emit("notice", { irc.emit("notice", {
nick: irc.user.nick, nick: irc.user.nick,
target: targetChan.name, target: targetChan.name,
msg: message message: message
}); });
return true; return true;

View file

@ -26,7 +26,7 @@ describe("Link plugin", function() {
}); });
this.irc.createMessage({ this.irc.createMessage({
msg: "http://localhost:9002/basic" message: "http://localhost:9002/basic"
}); });
this.irc.once("toggle", function(data) { this.irc.once("toggle", function(data) {

View file

@ -15,7 +15,7 @@ util.inherits(MockClient, EventEmitter);
MockClient.prototype.createMessage = function(opts) { MockClient.prototype.createMessage = function(opts) {
var message = _.extend({ var message = _.extend({
msg: "dummy message", message: "dummy message",
nick: "test-user", nick: "test-user",
target: "#test-channel" target: "#test-channel"
}, opts); }, opts);