A couple of fixes after rebasing and updating framework
This commit is contained in:
parent
a01216fa4c
commit
db5fe00b60
@ -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();
|
||||
}
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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) {
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user