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{
|
irc := &Connection{
|
||||||
nick: nick,
|
nick: nick,
|
||||||
user: user,
|
nickcurrent: nick,
|
||||||
Log: log.New(os.Stdout, "", log.LstdFlags),
|
user: user,
|
||||||
end: make(chan struct{}),
|
Log: log.New(os.Stdout, "", log.LstdFlags),
|
||||||
Version: VERSION,
|
end: make(chan struct{}),
|
||||||
KeepAlive: 4 * time.Minute,
|
Version: VERSION,
|
||||||
Timeout: 1 * time.Minute,
|
KeepAlive: 4 * time.Minute,
|
||||||
PingFreq: 15 * time.Minute,
|
Timeout: 1 * time.Minute,
|
||||||
|
PingFreq: 15 * time.Minute,
|
||||||
}
|
}
|
||||||
irc.setupCallbacks()
|
irc.setupCallbacks()
|
||||||
return irc
|
return irc
|
||||||
|
Loading…
Reference in New Issue
Block a user