From f9d88d1af185e520993b8a94edbb0ede9fc34226 Mon Sep 17 00:00:00 2001 From: Julian Daube Date: Sat, 20 Jun 2015 22:24:25 +0200 Subject: [PATCH] initialized .nickcurrent with .nick fixes empty return of Nick() directly after initialising --- irc.go | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/irc.go b/irc.go index 229fe61..56d7c07 100644 --- a/irc.go +++ b/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