MCPcopy Create free account
hub / github.com/GoMudEngine/GoMud / GetByConnectionId

Function GetByConnectionId

internal/users/users.go:181–190  ·  view source on GitHub ↗
(connectionId connections.ConnectionId)

Source from the content-addressed store, hash-verified

179}
180
181func GetByConnectionId(connectionId connections.ConnectionId) *UserRecord {
182 userManagerMu.RLock()
183 defer userManagerMu.RUnlock()
184
185 if userId, ok := userManager.Connections[connectionId]; ok {
186 return userManager.Users[userId]
187 }
188
189 return nil
190}
191
192// CopyoverReconnectUser takes over an existing session for a user who is
193// reconnecting after a copyover. The caller must have already validated a

Callers 3

mainFunction · 0.92
trySystemCommandFunction · 0.92
LogOutUserByConnectionIdFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected