Fixed topic command
This commit is contained in:
parent
b5f85b422a
commit
57f4071f27
|
@ -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,
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 15d97807956b2e78f654e47586abf1f9e20ccf2a
|
||||
Subproject commit 5b023edd59244e3b8520d13f10785742e6c4b034
|
Loading…
Reference in New Issue