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

don't allow double-joining

This commit is contained in:
Jeremy Latt 2014-02-20 18:56:13 -08:00
parent 1486411db1
commit 52ffc77d8d

View File

@ -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 {