initialized .nickcurrent with .nick

fixes empty return of Nick() directly after initialising
This commit is contained in:
Julian Daube 2015-06-20 22:24:25 +02:00
parent 4f7b3d1c84
commit f9d88d1af1

17
irc.go
View File

@ -401,14 +401,15 @@ func IRC(nick, user string) *Connection {
}
irc := &Connection{
nick: nick,
user: user,
Log: log.New(os.Stdout, "", log.LstdFlags),
end: make(chan struct{}),
Version: VERSION,
KeepAlive: 4 * time.Minute,
Timeout: 1 * time.Minute,
PingFreq: 15 * time.Minute,
nick: nick,
nickcurrent: nick,
user: user,
Log: log.New(os.Stdout, "", log.LstdFlags),
end: make(chan struct{}),
Version: VERSION,
KeepAlive: 4 * time.Minute,
Timeout: 1 * time.Minute,
PingFreq: 15 * time.Minute,
}
irc.setupCallbacks()
return irc