Mark channel info as complete on RPL_ENDOFNAMES

git-svn-id: file:///srv/svn/repo/suika/trunk@25 f0ae65fe-ee39-954e-97ec-027ff2717ef4
This commit is contained in:
contact 2020-02-06 20:43:22 +00:00
parent de823814a6
commit 8fecd67730

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: