Mark channel info as complete on RPL_ENDOFNAMES

This commit is contained in:
Simon Ser 2020-02-06 21:43:22 +01:00
parent 5988d10a0b
commit 3f2e08b949
No known key found for this signature in database
GPG key ID: 0FDE7BE0E88F5E48

View file

@ -19,6 +19,7 @@ type upstreamChannel struct {
TopicTime time.Time
Status channelStatus
Members map[string]membership
complete bool
}
type upstreamConn struct {
@ -158,7 +159,15 @@ func (c *upstreamConn) handleMessage(msg *irc.Message) error {
ch.Members[nick] = membership
}
case irc.RPL_ENDOFNAMES:
// TODO
if len(msg.Params) < 2 {
return newNeedMoreParamsError(msg.Command)
}
ch, err := c.getChannel(msg.Params[1])
if err != nil {
return err
}
ch.complete = true
case irc.RPL_YOURHOST, irc.RPL_CREATED:
// Ignore
case irc.RPL_LUSERCLIENT, irc.RPL_LUSEROP, irc.RPL_LUSERUNKNOWN, irc.RPL_LUSERCHANNELS, irc.RPL_LUSERME: