tt
This commit is contained in:
@@ -17,16 +17,16 @@ func init() {
|
||||
}
|
||||
}
|
||||
|
||||
func (m *userManager) Add(cid int32, client *Client) {
|
||||
func (m *userManager) Add(uid int32, client *Client) {
|
||||
m.Lock()
|
||||
defer m.Unlock()
|
||||
m.userMap[cid] = client
|
||||
m.userMap[uid] = client
|
||||
}
|
||||
|
||||
func (m *userManager) Delete(cid int32) {
|
||||
func (m *userManager) Delete(uid int32) {
|
||||
m.Lock()
|
||||
defer m.Unlock()
|
||||
delete(m.userMap, cid)
|
||||
delete(m.userMap, uid)
|
||||
}
|
||||
|
||||
func (m *userManager) GetAll() map[int32]*Client {
|
||||
|
||||
Reference in New Issue
Block a user