3
0
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:
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 return
} }
if channel.members[client] != nil {
// already joined, no message?
return
}
client.channels.Add(channel) client.channels.Add(channel)
channel.members.Add(client) channel.members.Add(client)
if len(channel.members) == 1 { if len(channel.members) == 1 {