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
}, attr));
if (attr.time > 0) {
attr.time = new Date(attr.time);
if (this.time > 0) {
this.time = new Date(this.time);
} 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", {
nick: irc.user.nick,
target: chan.name,
msg: text
message: text
});
break;
}

View file

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

View file

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

View file

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

View file

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