Changeset 349 in code for trunk


Ignore:
Timestamp:
Jul 6, 2020, 8:59:34 AM (5 years ago)
Author:
contact
Message:

Make length check clearer in sendNames

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bridge.go

    r346 r349  
    4949                s := memberships.Format(dc) + dc.marshalEntity(ch.conn.network, nick)
    5050
    51                 if buf.Len() != 0 && maxLength < buf.Len()+1+len(s) {
     51                n := buf.Len() + 1 + len(s)
     52                if buf.Len() != 0 && n > maxLength {
    5253                        // There's not enough space for the next space + nick.
    5354                        dc.SendMessage(&irc.Message{
Note: See TracChangeset for help on using the changeset viewer.