send initial nick message to source client

This commit is contained in:
Jeremy Latt 2014-02-11 14:32:17 -08:00
parent 0e07b29010
commit aac0efebee
4 changed files with 13 additions and 8 deletions

View file

@ -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)
}