mirror of
https://github.com/ergochat/ergo.git
synced 2025-12-20 02:00:11 -08:00
send initial nick message to source client
This commit is contained in:
parent
0e07b29010
commit
aac0efebee
4 changed files with 13 additions and 8 deletions
|
|
@ -48,7 +48,7 @@ func NewServer(config *Config) *Server {
|
|||
func (server *Server) receiveCommands(commands <-chan Command) {
|
||||
for command := range commands {
|
||||
if DEBUG_SERVER {
|
||||
log.Printf("%s → %s : %s", command.Client(), server, command)
|
||||
log.Printf("%s → %s %s", command.Client(), server, command)
|
||||
}
|
||||
client := command.Client()
|
||||
client.Touch()
|
||||
|
|
@ -205,7 +205,9 @@ func (m *NickCommand) HandleServer(s *Server) {
|
|||
c.nick = m.nickname
|
||||
}
|
||||
reply := RplNick(c, m.nickname)
|
||||
for iclient := range c.InterestedClients() {
|
||||
iclients := c.InterestedClients()
|
||||
iclients.Add(c)
|
||||
for iclient := range iclients {
|
||||
iclient.Reply(reply)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue