mirror of
https://github.com/ergochat/ergo.git
synced 2024-12-22 18:52:41 +01:00
don't allow double-joining
This commit is contained in:
parent
1486411db1
commit
52ffc77d8d
@ -97,6 +97,11 @@ func (channel *Channel) Join(client *Client, key string) {
|
||||
return
|
||||
}
|
||||
|
||||
if channel.members[client] != nil {
|
||||
// already joined, no message?
|
||||
return
|
||||
}
|
||||
|
||||
client.channels.Add(channel)
|
||||
channel.members.Add(client)
|
||||
if len(channel.members) == 1 {
|
||||
|
Loading…
Reference in New Issue
Block a user