3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-11-10 22:19:31 +01:00

add persistent flag for channels

This commit is contained in:
Jeremy Latt 2014-02-25 10:04:59 -08:00
parent 5930445313
commit de5538f5d5
2 changed files with 3 additions and 2 deletions

View File

@ -166,7 +166,7 @@ func (channel *Channel) Part(client *Client, message string) {
}
channel.Quit(client)
if channel.IsEmpty() {
if !channel.flags[Persistent] && channel.IsEmpty() {
channel.server.channels.Remove(channel)
}
}
@ -296,7 +296,7 @@ func (channel *Channel) applyMode(client *Client, change *ChannelModeChange) boo
}
client.RplEndOfMaskList(change.mode, channel)
case Moderated, NoOutside, OpOnlyTopic, Private:
case Moderated, NoOutside, OpOnlyTopic, Persistent, Private:
return channel.applyModeFlag(client, change.mode, change.op)
case Key:

View File

@ -223,6 +223,7 @@ const (
Moderated ChannelMode = 'm' // flag
NoOutside ChannelMode = 'n' // flag
OpOnlyTopic ChannelMode = 't' // flag
Persistent ChannelMode = 'P' // flag
Private ChannelMode = 'p' // flag
Quiet ChannelMode = 'q' // flag
ReOp ChannelMode = 'r' // flag