mirror of
https://github.com/ergochat/ergo.git
synced 2024-11-22 20:09:41 +01:00
add persistent flag for channels
This commit is contained in:
parent
5930445313
commit
de5538f5d5
@ -166,7 +166,7 @@ func (channel *Channel) Part(client *Client, message string) {
|
|||||||
}
|
}
|
||||||
channel.Quit(client)
|
channel.Quit(client)
|
||||||
|
|
||||||
if channel.IsEmpty() {
|
if !channel.flags[Persistent] && channel.IsEmpty() {
|
||||||
channel.server.channels.Remove(channel)
|
channel.server.channels.Remove(channel)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -296,7 +296,7 @@ func (channel *Channel) applyMode(client *Client, change *ChannelModeChange) boo
|
|||||||
}
|
}
|
||||||
client.RplEndOfMaskList(change.mode, channel)
|
client.RplEndOfMaskList(change.mode, channel)
|
||||||
|
|
||||||
case Moderated, NoOutside, OpOnlyTopic, Private:
|
case Moderated, NoOutside, OpOnlyTopic, Persistent, Private:
|
||||||
return channel.applyModeFlag(client, change.mode, change.op)
|
return channel.applyModeFlag(client, change.mode, change.op)
|
||||||
|
|
||||||
case Key:
|
case Key:
|
||||||
|
@ -223,6 +223,7 @@ const (
|
|||||||
Moderated ChannelMode = 'm' // flag
|
Moderated ChannelMode = 'm' // flag
|
||||||
NoOutside ChannelMode = 'n' // flag
|
NoOutside ChannelMode = 'n' // flag
|
||||||
OpOnlyTopic ChannelMode = 't' // flag
|
OpOnlyTopic ChannelMode = 't' // flag
|
||||||
|
Persistent ChannelMode = 'P' // flag
|
||||||
Private ChannelMode = 'p' // flag
|
Private ChannelMode = 'p' // flag
|
||||||
Quiet ChannelMode = 'q' // flag
|
Quiet ChannelMode = 'q' // flag
|
||||||
ReOp ChannelMode = 'r' // flag
|
ReOp ChannelMode = 'r' // flag
|
||||||
|
Loading…
Reference in New Issue
Block a user