INNER CODE UNIT · Go
ok
GoMudEngine/GoMud · main.go:977
userObject, ok = uo.(*users.UserRecord)
if !ok {
mudlog.Error("UserObject type assertion failed", "connectionId", clientInput.ConnectionId)
connections.Remove(clientInput.ConnectionId)
break
}
// Remove it from shared state if no longer needed there
delete(sharedState, "UserObject")
} else {
// This shouldn't happen if the completion function worked correctly
mudlog.Error("Login process completed but UserObject not found in sharedState", "connectionId", clientInput.ConnectionId)
connections.Remove(clientInput.ConnectionId) // Disconnect problematic connection
break // Exit the read loop for this connection
}
// Remove the prompt handler (it signaled completion by returning true)
connDetails.RemoveInputHandler("LoginPromptHandler")
// Replace it with a regular echo handler.