don't wake up Connect() until after the MOTD
This commit is contained in:
parent
4992421a60
commit
4954891ab6
@ -225,15 +225,17 @@ func (irc *Connection) handleRplWelcome(e Event) {
|
|||||||
if len(e.Params) > 0 {
|
if len(e.Params) > 0 {
|
||||||
irc.currentNick = e.Params[0]
|
irc.currentNick = e.Params[0]
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (irc *Connection) handleRegistration(e Event) {
|
||||||
// wake up Connect() if applicable
|
// wake up Connect() if applicable
|
||||||
|
defer func() {
|
||||||
select {
|
select {
|
||||||
case irc.welcomeChan <- empty{}:
|
case irc.welcomeChan <- empty{}:
|
||||||
default:
|
default:
|
||||||
}
|
}
|
||||||
}
|
}()
|
||||||
|
|
||||||
func (irc *Connection) handleRegistration(e Event) {
|
|
||||||
irc.stateMutex.Lock()
|
irc.stateMutex.Lock()
|
||||||
defer irc.stateMutex.Unlock()
|
defer irc.stateMutex.Unlock()
|
||||||
|
|
||||||
@ -245,6 +247,7 @@ func (irc *Connection) handleRegistration(e Event) {
|
|||||||
// mark the isupport complete
|
// mark the isupport complete
|
||||||
irc.isupport = irc.isupportPartial
|
irc.isupport = irc.isupportPartial
|
||||||
irc.isupportPartial = nil
|
irc.isupportPartial = nil
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (irc *Connection) handleUnavailableNick(e Event) {
|
func (irc *Connection) handleUnavailableNick(e Event) {
|
||||||
|
Loading…
Reference in New Issue
Block a user