mirror of
https://github.com/ergochat/ergo.git
synced 2025-12-20 10:10:08 -08:00
Send Names reply in multiple messages.
This commit is contained in:
parent
0001131095
commit
f133f3691d
8 changed files with 235 additions and 133 deletions
|
|
@ -48,7 +48,6 @@ func NewClient(server *Server, conn net.Conn) *Client {
|
|||
|
||||
func (c *Client) readConn(recv <-chan string) {
|
||||
for str := range recv {
|
||||
|
||||
m, err := ParseCommand(str)
|
||||
if err != nil {
|
||||
if err == NotEnoughArgsError {
|
||||
|
|
@ -59,7 +58,7 @@ func (c *Client) readConn(recv <-chan string) {
|
|||
continue
|
||||
}
|
||||
|
||||
m.SetClient(c)
|
||||
m.SetBase(c)
|
||||
c.server.commands <- m
|
||||
}
|
||||
}
|
||||
|
|
@ -69,7 +68,7 @@ func (c *Client) writeConn(write chan<- string, replies <-chan Reply) {
|
|||
if DEBUG_CLIENT {
|
||||
log.Printf("%s ← %s : %s", c, reply.Source(), reply)
|
||||
}
|
||||
write <- reply.Format(c)
|
||||
reply.Format(c, write)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue