forked from External/ergo
DRY mode apply code
ParseUserModeChanges and ParseChannelModeChanges already validate that the modes are modifiable, so there's no need to repeat it here.
This commit is contained in:
parent
b426ba628a
commit
c279b2d14c
2 changed files with 16 additions and 16 deletions
|
|
@ -430,8 +430,10 @@ func (a ByCodepoint) Swap(i, j int) { a[i], a[j] = a[j], a[i] }
|
|||
func (a ByCodepoint) Less(i, j int) bool { return a[i] < a[j] }
|
||||
|
||||
func RplMyInfo() (param1, param2, param3 string) {
|
||||
userModes := make(Modes, len(SupportedUserModes))
|
||||
userModes := make(Modes, len(SupportedUserModes), len(SupportedUserModes)+1)
|
||||
copy(userModes, SupportedUserModes)
|
||||
// TLS is not in SupportedUserModes because it can't be modified
|
||||
userModes = append(userModes, TLS)
|
||||
sort.Sort(ByCodepoint(userModes))
|
||||
|
||||
channelModes := make(Modes, len(SupportedChannelModes)+len(ChannelUserModes))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue