3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-12-22 18:52:41 +01:00

don't give operator to the first person to enter an empty persistent channel

This commit is contained in:
Jeremy Latt 2014-02-27 20:42:12 -08:00
parent f17855fce9
commit 8c8d371ae2

View File

@ -145,10 +145,8 @@ func (channel *Channel) Join(client *Client, key string) {
client.channels.Add(channel)
channel.members.Add(client)
if len(channel.members) == 1 {
if !channel.flags[Persistent] {
if !channel.flags[Persistent] && (len(channel.members) == 1) {
channel.members[client][ChannelCreator] = true
}
channel.members[client][ChannelOperator] = true
}