commit e94e0f6
delthas
·
2022-12-23 17:48:51 +0000 UTC
parent 9a8d331
Only show one connected message per reconnection
1 files changed,
+7,
-1
+7,
-1
1@@ -149,6 +149,7 @@ type Session struct {
2
3 pendingChannels map[string]time.Time // set of join requests stamps for channels.
4
5+ receivedISupport bool
6 receivedUserMode bool
7 }
8
9@@ -722,7 +723,12 @@ func (s *Session) handleMessageRegistered(msg Message, playback bool) (Event, er
10 return nil, msg.errNotEnoughParams(3)
11 }
12 s.updateFeatures(msg.Params[1 : len(msg.Params)-1])
13- return RegisteredEvent{}, nil
14+ if !s.receivedISupport {
15+ // notify only on first RPL_ISUPPORT
16+ s.receivedISupport = true
17+ return RegisteredEvent{}, nil
18+ }
19+ return nil, nil
20 case rplWhoreply, rplWhospecialreply:
21 var nick, host, flags, username string
22 var err error