initialized .nickcurrent with .nick
fixes empty return of Nick() directly after initialising
This commit is contained in:
parent
4f7b3d1c84
commit
f9d88d1af1
17
irc.go
17
irc.go
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user