Make an empty MODE b reply for faster client's sync
This commit is contained in:
parent
f46c678ce0
commit
4f5fa51327
4
room.go
4
room.go
@ -140,6 +140,10 @@ func (room *Room) Processor(events <-chan ClientEvent) {
|
|||||||
client.Msg(fmt.Sprintf("324 %s %s %s", client.nickname, room.name, mode))
|
client.Msg(fmt.Sprintf("324 %s %s %s", client.nickname, room.name, mode))
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
if strings.HasPrefix(event.text, "b") {
|
||||||
|
client.ReplyNicknamed("368", room.name, "End of channel ban list")
|
||||||
|
continue
|
||||||
|
}
|
||||||
if strings.HasPrefix(event.text, "-k") || strings.HasPrefix(event.text, "+k") {
|
if strings.HasPrefix(event.text, "-k") || strings.HasPrefix(event.text, "+k") {
|
||||||
if _, subscribed := room.members[client]; !subscribed {
|
if _, subscribed := room.members[client]; !subscribed {
|
||||||
client.ReplyParts("442", room.name, "You are not on that channel")
|
client.ReplyParts("442", room.name, "You are not on that channel")
|
||||||
|
@ -198,8 +198,8 @@ func TestJoin(t *testing.T) {
|
|||||||
t.Fatal("left #bazenc log", r)
|
t.Fatal("left #bazenc log", r)
|
||||||
}
|
}
|
||||||
|
|
||||||
conn.inbound <- "MODE #barenc +b"
|
conn.inbound <- "MODE #barenc +i"
|
||||||
if r := <-conn.outbound; r != ":foohost 472 nick2 +b :Unknown MODE flag\r\n" {
|
if r := <-conn.outbound; r != ":foohost 472 nick2 +i :Unknown MODE flag\r\n" {
|
||||||
t.Fatal("unknown MODE flag", r)
|
t.Fatal("unknown MODE flag", r)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user