chore: document and add RFC1459, RFC2812 and IRCv3 commands

* also rename ChannelIndex to ActiveChannelIndex
This commit is contained in:
2022-01-21 03:23:02 +02:00
parent 2edc007022
commit 26deca05d9
5 changed files with 280 additions and 126 deletions
+2 -2
View File
@@ -36,7 +36,7 @@ type SidePanelState struct {
func (s *SidePanelState) getHeader() string {
usersCount := 0
if len(s.Client.Channels) != 0 {
usersCount = len(s.Client.Channels[s.Client.ChannelIndex].Users)
usersCount = len(s.Client.Channels[s.Client.ActiveChannelIndex].Users)
}
separator := strings.Repeat("—", s.Viewport.Width) + "\n"
header := fmt.Sprintf("Users in this channel (%d)\n", usersCount) + separator
@@ -48,7 +48,7 @@ func (s *SidePanelState) getLatestNicks() []string {
nicks := make([]string, 0)
if len(s.Client.Channels) != 0 {
for nick, user := range s.Client.Channels[s.Client.ChannelIndex].Users {
for nick, user := range s.Client.Channels[s.Client.ActiveChannelIndex].Users {
_nick := user.Prefix + nick
nicks = append(nicks, _nick)
}