mirror of
https://github.com/ergochat/ergo.git
synced 2024-11-22 11:59:40 +01:00
commit
033022599b
@ -1287,12 +1287,24 @@ func (channel *Channel) SendSplitMessage(command string, minPrefixMode modes.Mod
|
||||
chname = fmt.Sprintf("%s%s", modes.ChannelModePrefixes[minPrefixMode], chname)
|
||||
}
|
||||
|
||||
if channel.flags.HasMode(modes.OpModerated) {
|
||||
channel.stateMutex.RLock()
|
||||
cuModes := channel.members[client]
|
||||
channel.stateMutex.RUnlock()
|
||||
if cuModes.HighestChannelUserMode() == modes.Mode(0) {
|
||||
// max(statusmsg_minmode, halfop)
|
||||
if minPrefixMode == modes.Mode(0) || minPrefixMode == modes.Voice {
|
||||
minPrefixMode = modes.Halfop
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// send echo-message
|
||||
rb.addEchoMessage(clientOnlyTags, details.nickMask, details.accountName, command, chname, message)
|
||||
|
||||
for _, member := range channel.Members() {
|
||||
if minPrefixMode != modes.Mode(0) && !channel.ClientIsAtLeast(member, minPrefixMode) {
|
||||
// STATUSMSG
|
||||
// STATUSMSG or OpModerated
|
||||
continue
|
||||
}
|
||||
|
||||
@ -1320,7 +1332,7 @@ func (channel *Channel) SendSplitMessage(command string, minPrefixMode modes.Mod
|
||||
}
|
||||
}
|
||||
|
||||
// #959: don't save STATUSMSG
|
||||
// #959: don't save STATUSMSG (or OpModerated)
|
||||
if minPrefixMode == modes.Mode(0) {
|
||||
channel.AddHistoryItem(history.Item{
|
||||
Type: histType,
|
||||
|
@ -56,6 +56,8 @@ Oragono supports the following channel modes:
|
||||
+C | Clients are blocked from sending CTCP messages in the channel.
|
||||
+u | Auditorium mode: JOIN, PART, QUIT, NAMES, and WHO are hidden
|
||||
hidden from unvoiced clients.
|
||||
+U | Op-moderated mode: messages from unprivileged clients are sent
|
||||
only to channel operators.
|
||||
|
||||
= Prefixes =
|
||||
|
||||
|
@ -23,7 +23,7 @@ var (
|
||||
SupportedChannelModes = Modes{
|
||||
BanMask, ChanRoleplaying, ExceptMask, InviteMask, InviteOnly, Key,
|
||||
Moderated, NoOutside, OpOnlyTopic, RegisteredOnly, RegisteredOnlySpeak,
|
||||
Secret, UserLimit, NoCTCP, Auditorium,
|
||||
Secret, UserLimit, NoCTCP, Auditorium, OpModerated,
|
||||
}
|
||||
)
|
||||
|
||||
@ -128,6 +128,7 @@ const (
|
||||
Secret Mode = 's' // flag
|
||||
UserLimit Mode = 'l' // flag arg
|
||||
NoCTCP Mode = 'C' // flag
|
||||
OpModerated Mode = 'U' // flag
|
||||
)
|
||||
|
||||
var (
|
||||
|
2
irctest
2
irctest
@ -1 +1 @@
|
||||
Subproject commit f0eb6e4e80669b7587ffd8802f20e0e5fef923b5
|
||||
Subproject commit 62197e4c4d54a5a7bbeefc21b545cfd17c7933b2
|
Loading…
Reference in New Issue
Block a user