Fixed topic command

This commit is contained in:
Mattias Erming 2014-04-06 20:04:11 +02:00
parent b5f85b422a
commit 57f4071f27
2 changed files with 7 additions and 9 deletions

View File

@ -138,10 +138,11 @@ function input(json) {
break;
case "topic":
if (client && args[1]) {
var str = "TOPIC " + args[1];
if (args[2]) {
str += " :" + args.slice(2).join(" ");
var chan = channel.get("name");
if (client) {
var str = "TOPIC " + chan;
if (args[1]) {
str += " :" + args.slice(1).join(" ");
}
client.write(str);
}
@ -290,10 +291,7 @@ function event(event, data) {
case "topic":
var chan = channels.findWhere({name: data[0].channel});
var from = data[0].nick;
if (from == this.get("client").me) {
from = data[0].channel;
}
var from = data[0].nick || chan.get("name");
chan.addMessage({
from: from,
message: data[0].topic,

2
node_modules/slate-irc generated vendored

@ -1 +1 @@
Subproject commit 15d97807956b2e78f654e47586abf1f9e20ccf2a
Subproject commit 5b023edd59244e3b8520d13f10785742e6c4b034