Selaa lähdekoodia

channel: Fix +m (moderated) and +R (registeredonly) channel modes, add note about opers overriding +m/+R

tags/v0.9.2-alpha
Daniel Oaks 6 vuotta sitten
vanhempi
commit
e3a0387cf5
2 muutettua tiedostoa jossa 4 lisäystä ja 2 poistoa
  1. 2
    0
      irc/channel.go
  2. 2
    2
      irc/modes.go

+ 2
- 0
irc/channel.go Näytä tiedosto

425
 	channel.membersMutex.RLock()
425
 	channel.membersMutex.RLock()
426
 	defer channel.membersMutex.RUnlock()
426
 	defer channel.membersMutex.RUnlock()
427
 
427
 
428
+	// server operators override nooutside, reggedonly, moderated etc.
429
+	// TODO(dan): there should probably instead be a SAPRIVMSG instead that forces this instead of doing it this way...
428
 	if client.flags[Operator] {
430
 	if client.flags[Operator] {
429
 		return true
431
 		return true
430
 	}
432
 	}

+ 2
- 2
irc/modes.go Näytä tiedosto

142
 
142
 
143
 	// SupportedChannelModes are the channel modes that we support.
143
 	// SupportedChannelModes are the channel modes that we support.
144
 	SupportedChannelModes = Modes{
144
 	SupportedChannelModes = Modes{
145
-		BanMask, ExceptMask, InviteMask, InviteOnly, Key, NoOutside,
146
-		OpOnlyTopic, Secret, UserLimit, ChanRoleplaying,
145
+		BanMask, ChanRoleplaying, ExceptMask, InviteMask, InviteOnly, Key,
146
+		Moderated, NoOutside, OpOnlyTopic, RegisteredOnly, Secret, UserLimit,
147
 	}
147
 	}
148
 	// supportedChannelModesString acts as a cache for when we introduce users
148
 	// supportedChannelModesString acts as a cache for when we introduce users
149
 	supportedChannelModesString = SupportedChannelModes.String()
149
 	supportedChannelModesString = SupportedChannelModes.String()

Loading…
Peruuta
Tallenna